MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / writeScript

Function writeScript

libraries/AP_HAL_ESP32/profile/LinkerScriptGenerator.kt:57–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 }
56
57 fun writeScript() {
58 var excl = listOf( "_ZN12NavEKF2_core15readRangeFinderEv",
59 "_ZN12NavEKF2_core18SelectRngBcnFusionEv","_ZN12NavEKF2_core14readRngBcnDataEv")
60
61 var lst = ArrayList(addressToFunction.values.filter { it.count > 5000 && !excl.contains(it.symbol) })
62 lst.sortWith(kotlin.Comparator { o1, o2 -> o2.count - o1.count })
63
64 var s = 0
65 for (a in lst) {
66 System.out.format(
67 "0x%016x\t%8d\t%8d\t%s:%s\n",
68 a.address,
69 a.size,
70 a.count,
71 a.place,
72 a.symbol
73 )
74 s += a.size
75 }
76 FileOutputStream(scriptFileName).use {
77 for (a in lst) {
78 it.write(String.format("%s:%s\n", a.place, a.symbol).toByteArray())
79 }
80 }
81 System.out.format("total: %d\n", s)
82 }
83 parseMap()
84 parseProfile()
85 writeScript()

Callers 1

generateLinkerScriptFunction · 0.70

Calls 5

filterMethod · 0.80
containsMethod · 0.80
formatMethod · 0.45
useMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected