New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSP430FR5994 — Large Arrays in FRAM Error #49

Open
rei-vilo opened this Issue Dec 26, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@rei-vilo
Member

rei-vilo commented Dec 26, 2017

THE MSP430FR5994 provides 256 KB of FRAM, of which 262,144 bytes are continuous (Main: code memory 043FFFh–004000h, cf. MSP430FR5994 , 6.15 Memory Map Table 6-41. Memory Organization).

How to declare two arrays in R/W mode of 30,000 bytes each?

uint8_t frameOld[30000] __attribute__ ((section(".text"))); // PLACE_IN_FRAM;
uint8_t frameNew[30000] __attribute__ ((section(".text"))); // PLACE_IN_FRAM;

The previous code throws errors at linking, typical of memory overflow.

/Users/ReiVilo/Library/Energia15/packages/energia/tools/msp430-gcc/4.6.5/bin/../lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld: /var/folders/px/cyfvtr757lqg0yp_cv9j79jh0000gn/T/arduino_build_291843/FRAM_EPD.ino.elf section '.text' will not fit in region 'rom'
/Users/ReiVilo/Library/Energia15/packages/energia/tools/msp430-gcc/4.6.5/bin/../lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld: section .vectors loaded at [000000000000ff80,000000000000ffff] overlaps section .text loaded at [0000000000004400,0000000000019e83]
/Users/ReiVilo/Library/Energia15/packages/energia/tools/msp430-gcc/4.6.5/bin/../lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld: region 'rom' overflowed by 55586 bytes
/Users/ReiVilo/Library/Energia15/packages/energia/tools/msp430-gcc/4.6.5/bin/../lib/gcc/msp430/4.6.3/mcpu-430x/mmpy-16/libcrt0.a(_copy_data.o): In function '__do_copy_data':
/Users/rwessels/mspgcc/BUILD/gcc/gcc/../../../gcc/gcc/config/msp430/crt0.S:195: relocation truncated to fit: R_MSP430_16_BYTE against symbol '__data_load_start' defined in ABS section in /var/folders/px/cyfvtr757lqg0yp_cv9j79jh0000gn/T/arduino_build_291843/FRAM_EPD.ino.elf
...

Does memory.x at ~/Library/Energia15/packages/energia/tools/msp430-gcc/4.6.5/msp430/lib/ldscripts/msp430fr5994/memory.x need to be customised, and how?

Thank you!

@rei-vilo

This comment has been minimized.

Member

rei-vilo commented May 31, 2018

Might be related to #63

@rei-vilo

This comment has been minimized.

Member

rei-vilo commented Oct 6, 2018

See Using FRAM above 0x00010000 on the 43oh forum.

@rei-vilo

This comment has been minimized.

Member

rei-vilo commented Oct 27, 2018

See https://github.com/energia/msp430-lg-core/blob/new_compiler/extras/readme.txt for support of MSP-GCC 7.3.1.24 with large arrays in FRAM.

Tested successfully on macOS with minor adaptations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment