mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-19 23:28:32 -04:00
84f399ec3c
It both reduces flash size and move symbols to read-only sections. The scheduler_tasks table is one known not to be in read-only section before due to the FastDelegate implementation. Before and after this patch: APMrover2 $ size APMrover2.elf{.old,} text data bss dec hex filename 611406 4832 40920 657158 a0706 APMrover2.elf.old 609686 4824 38936 653446 9f886 APMrover2.elf APMrover2 $ nm -C APMrover2.elf{.old,} |grep tasks 0000000000696f80 B Rover::scheduler_tasks 000000000047c440 R Rover::scheduler_tasks As can be seen above, now the scheduler_tasks symbol is in a read-only data section and in all of them we decreased the total size. For APM2 we have a similar situation, but the table was already in text section because it was using plain C pointers: APMrover2 $ size APMrover2.elf{.old,} text data bss dec hex filename 189518 1038 3494 194050 2f602 APMrover2.elf.old 189216 1038 3480 193734 2f4c6 APMrover2.elf APMrover2 $ nm -C APMrover2.elf{.old,} |grep tasks 00001f92 T Rover::scheduler_tasks 00001f8a T Rover::scheduler_tasks |
||
---|---|---|
.. | ||
examples | ||
utility | ||
AnalogIn.h | ||
AP_HAL_Boards.h | ||
AP_HAL_Macros.h | ||
AP_HAL_Namespace.h | ||
AP_HAL.h | ||
GPIO.h | ||
HAL.h | ||
I2CDriver.h | ||
RCInput.h | ||
RCOutput.h | ||
Scheduler.h | ||
Semaphores.h | ||
SPIDriver.h | ||
Storage.h | ||
UARTDriver.cpp | ||
UARTDriver.h | ||
Util.cpp | ||
Util.h |