Hi.
I have a firmware developed in Keil3 using a Cygnus Tools ARM 3.3.1.
I "upgraded" to Keil5 using GNU Tools ARM Embedded 4.7 2013q3.
I am using optimization level 2 (O2).
In my main.c file i have the following lines:
struct stFLASH_Geral FLASH_Geral
__attribute__ ((section(".Param_FLASH")));
struct stFLASH_Puxos FLASH_Puxos[KP_NumMaxPuxos]
__attribute__ ((section(".Param_FLASH")));
struct stFLASH_Extru FLASH_Extru[KP_NumMaxExtru_TOTAL]
__attribute__ ((section(".Param_FLASH")));
struct stFLASH_Conta FLASH_Conta[KP_NumMaxCont]
__attribute__ ((section(".Param_FLASH")));
struct stFLASH_Enrol FLASH_Enrol[KP_NumMaxEnrol]
__attribute__ ((section(".Param_FLASH")));
struct stFLASH_Cabec FLASH_Cabec[KP_NumMaxCabec]
__attribute__ ((section(".Param_FLASH")));
struct stFLASH_Energia FLASH_Energia
__attribute__ ((section(".UNID_SYSCOM_CPU")));
struct stFLASH_IO FLASH_IO
__attribute__ ((section(".UNID_SYSCOM_CPU")));
struct stFLASH_LVEL_CPU FLASH_LVEL_CPU[KP_NumLVEL_CPU]
__attribute__ ((section(".UNID_SYSCOM_CPU")));
struct stFLASH_PM_CPU FLASH_PM_CPU[KP_NumPM_CPU]
__attribute__ ((section(".UNID_SYSCOM_CPU")));
When i compile with Keil3 on my .map file i get:
.Param_FLASH 0x0007a000 0x1628
*(.Param_FLASH)
.Param_FLASH 0x0007a000 0x1628 .\object\main_contgrav.o
0x0007b468 FLASH_Enrol
0x0007a000 FLASH_Geral
0x0007a160 FLASH_Extru
0x0007b3a8 FLASH_Conta
0x0007a088 FLASH_Puxos
0x0007b568 FLASH_Cabec
UNID_SYSCOM_CPU
0x0007bee4 0x11c
*(.UNID_SYSCOM_CPU)
.UNID_SYSCOM_CPU
0x0007bee4 0x11c .\object\main_contgrav.o
0x0007bf50 FLASH_LVEL_CPU
0x0007beec FLASH_IO
0x0007bee4 FLASH_Energia
0x0007bff0 FLASH_PM_CPU
When i compile with Keil5 on my .map file i get:
.Param_FLASH 0x0007a000 0x1628
*(.Param_FLASH)
.Param_FLASH 0x0007a000 0x1628 ./object/main_contgrav.o
0x0007a000 FLASH_Geral
0x0007a088 FLASH_Cabec
0x0007a148 FLASH_Enrol
0x0007a248 FLASH_Conta
0x0007a308 FLASH_Extru
0x0007b550 FLASH_Puxos
UNID_SYSCOM_CPU
0x0007bee4 0x11c
*(.UNID_SYSCOM_CPU)
.UNID_SYSCOM_CPU
0x0007bee4 0x11c ./object/main_contgrav.o
0x0007bee4 FLASH_PM_CPU
0x0007bef4 FLASH_LVEL_CPU
0x0007bf94 FLASH_IO
0x0007bff8 FLASH_Energia
If you look closely to the addresses, in Keil3 the structures are
mapped in the order that i declared/attributed them.
In keil5 it changes the order. It mapped the first one and then the
rest it puts in reverse order.
Why is that?
I need it to be like in Keil3.
Do i have to set anything in the options for the target?
Thank you in advance.
Best regards.
Marco