Hi,
This is an issue that I have been observing for some time now and just found the cause: the program would crash if I use --symdebug:none, no matter the level of optimization, etc. It turned out that if I refrain from moving to RAM any of the multiplication and division modules the problem does not manifest at all. I can still move to RAM other modules like lib_rtti or lib_newhandler without any problem.
The issue then manifests when I add, for example, the following line to the project's .cmd linker file (having of course defined those sections already, where I load most of my my application too) and try --symdebug:none:
.text:rts430x.lib_mul16 : { rts*.lib<mult16_f5hw.obj>(.text) } load = FLASH_CODE_RAM, run = HIGH_RAM
This happens also with mul32, div16s, div16u, div32s, and div32u.
The important thing here is that if I leave --symdebug:dwarf everything is peachy. Below are a few related lines of the .map files obtained for different cases:
1) Loaded into RAM, --symdebug:dwarf (works):
.text:rts430x.lib_mul16
* 0 0001a202 00000016 RUN ADDR = 000f4202
0001a202 00000016 rts430x_lc_rd_eabi_eh.lib : mult16_f5hw.obj (.text)
2) Loaded into RAM, --symdebug:none (does not work)
.text:rts430x.lib_mul16
* 0 0001a158 00000016 RUN ADDR = 000f420c
0001a158 00000016 rts430x_lc_rd_eabi_eh.lib : mult16_f5hw.obj (.text)
3) Kept in Flash (works with and without symbols):
00011d9e 00000016 rts430x_lc_rd_eabi_eh.lib : div16u.obj (.text)
00011db4 00000016 : mult16_f5hw.obj (.text)
I would like to know the reason why this happens and if there is a way to have the math modules loaded into RAM while having the debug symbols removed.
Thanks,
Pibe
PS: C++ project on MSP430F5659, exception handling enabled, RTOS.