This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I am developing with large data memory requirement, ~=50KB of RAM.
IDE: CCS V6.1, Full License.
- Silicon version: mspx
- code memory model: large
- data memory model: large
- near_data: global.
- runtime model options (Advanced Options): checked large data memory model.
the rest, default.
Here are the observations
--------------------------------------------------------------------------------
when total variables size <10kB
In EABI(ELF) mode, compiles successfully, and run.
In Legacy COFF mode, it complains about ""#10204-D could not resolve index library "libmath.a" to a compatible library".
Therefore EABI(ELF) may be the preferred choice for small memory model.
---------------------------------------------------------------------------------
When total variables > ~10kB (i.e. 24kB)
In EABI(ELF) mode, compile warnings
#10015-D output file "msp430f665x_uscia0_spi_09(Large DMA).out" cannot be loaded and run on a target system
#17003-D relocation from function "DMA_ISR" to symbol "bNewData" overflowed; the 20-bit relocated address 0xf47bb is too large to encode in the 16-bit field (type = 'R_MSP430X_ABS16' (15), file = "./LargeDMA.obj", offset = 0x00000022, section = ".text:_isr:DMA_ISR") LargeDMA.c /msp430f665x_uscia0_spi_09(Large DMA) line 238
#17003 relocation from function "imageSPThread" to symbol "bNewData" overflowed; the 20-bit relocated address 0xf47bb is too large to encode in the 16-bit field (type = 'R_MSP430X_ABS16' (15), file = "./LargeDMA.obj", offset = 0x00000012, section = ".text:imageSPThread") LargeDMA.c /msp430f665x_uscia0_spi_09(Large DMA)
The program is able to load, but refuse to launch.
MSP430: Loading complete. There were 1966 (code) and 16 (data) bytes written to FLASH/FRAM. The expected RAM usage is 23906 (uninitialized data + stack) bytes.
In Legacy COFF mode, Compile warnings. In addition to the #10015-D and #17003-D warnings, the libmath.a warning appears.
#10204-D could not resolve index library "libmath.a" to a compatible library msp430f665x_uscia0_spi_09(Large DMA)
However the program load and seems able to execute.
There were 1648 (code) and 114 (data) bytes written to FLASH/FRAM. The expected RAM usage is 0 (uninitialized data + stack) bytes.
===========================================================================
Which model shall I use?
Is there any settings that I need to change? How to remove the #17003-D warnings. Looks dangerous and may results in unknown behaviour.
I think it may be better to use EABI(ELF) model, as the libmath.a is not supported in Legacy COFF. At least, I can't remove/justify this warning.
Appreciate your advice.
Thanks and regards,
Shanguo
The ‘near data’ option doesn’t specify the size of the memory but the location of the memory, in this case the lower 64K.
But your memory is split up into sectors and has only 18KB in the low-64K region, all other in the upper 20-bit address space.
**Attention** This is a public forum