]> begriffs open source - cmsis/commit
rtos: rtx5: ARMCC5: move the variables in .bss.os section to ZI section
authorTero Jääskö <tero.jaasko@arm.com>
Mon, 20 Aug 2018 11:08:35 +0000 (14:08 +0300)
committerJonatan Antoni <jonatan.antoni@arm.com>
Thu, 6 Sep 2018 08:53:46 +0000 (10:53 +0200)
commitfe408eb0d64ddb2d1480d8a47f9b766bd75f5dba
tree40bb297af5ad79c1a601b517bcb1592479dfb810
parentaeeda7136f5a12eaf8277e4d3d264eabd003351d
rtos: rtx5: ARMCC5: move the variables in .bss.os section to ZI section

The thread stacks and other large variables in rtx_lib.c were directed
to .bss.os section, which puts them to zero initialized section in GCC,
but on ARMC5 they were put to data section which consumes precious ROM.

In reality the data section compression may make this a NOP change,
but it will at least make the total result statistics now more reliable.

Effects of this PR on the output of mbed compile of one application:
--8<--8<--
> --- memory_before_bss_change.txt 2018-06-18 16:45:51.928844313 +0300
> +++ memory_after_bss_change.txt 2018-06-18 16:57:27.753532437 +0300
> @@ -5,6 +5,9 @@
>  +----------------------------------------------------------+--------+-------+-------+
>  | Module                                                   |  .text | .data |  .bss |
>  +----------------------------------------------------------+--------+-------+-------+
> @@ -366,7 +369,7 @@
>  | mbed-os/rtos/TARGET_CORTEX/rtx5/RTX/Source/rtx_kernel.o  |    801 |   164 |     0 |
> -| mbed-os/rtos/TARGET_CORTEX/rtx5/RTX/Source/rtx_lib.o     |    406 |  2117 |     0 |
> +| mbed-os/rtos/TARGET_CORTEX/rtx5/RTX/Source/rtx_lib.o     |    406 |     1 |  2116 |
>  | mbed-os/rtos/TARGET_CORTEX/rtx5/RTX/Source/rtx_memory.o  |    260 |     0 |     0 |
> @@ -412,9 +415,9 @@
> -| Subtotals                                                | 163559 |  3380 | 15168 |
> +| Subtotals                                                | 163559 |  1264 | 17284 |
>  +----------------------------------------------------------+--------+-------+-------+
>  Total Static RAM memory (data + bss): 18548 bytes
> -Total Flash memory (text + data): 166939 bytes
> +Total Flash memory (text + data): 164823 bytes
CMSIS/Core/Include/cmsis_armcc.h
CMSIS/Core/Include/cmsis_armclang.h
CMSIS/Core/Include/cmsis_compiler.h
CMSIS/Core/Include/cmsis_gcc.h
CMSIS/Core/Include/cmsis_iccarm.h
CMSIS/Core_A/Include/cmsis_armcc.h
CMSIS/Core_A/Include/cmsis_armclang.h
CMSIS/Core_A/Include/cmsis_compiler.h
CMSIS/Core_A/Include/cmsis_gcc.h
CMSIS/Core_A/Include/cmsis_iccarm.h