wygonski 0 Posted October 6, 2018 Share Posted October 6, 2018 (Apologies for posting both here and on TI E2E forum) I am not able to use upper FRAM above 0x0001000 on MSP430 in Energia for an existing project, I am using latest Energia release E20 which uses latest version of gcc compiler 4.6.6. My goal is to 1) get the linker to locate two initialized data arrays in upper FRAM on MSP430FR5994 or MSP430FR5969 and 2) read that data as a lookup table using the Energia program. I have used the following attribute to map the arrays to upper FRAM: const unsigned char __attribute__((section(".fartext"))) Program_Data_IC_1[5120]= { 0xFF, 0xF2, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0xE2, 0x01, ... However, any code access to the array gives the build error relocation truncated to fit: R_MSP430_16_BYTE against `no symbol' which I believe is due to trying to access upper FRAM with a 16-bit pointer. So I tried modifying Energia's platform.txt to use large memory model: compiler.mlarge_flag=-mlarge but building in Energia E20 gave the error: cc1plus.exe: error: unrecognized command line option '-mlarge' exit status 1 Error compiling for board MSP-EXP430FR5994LP. I also tried using TI's GNU 7.3.1 (Mitto Systems) compiler in CCS 8.1 but I got errors building the Energia core library that is needed. Is there any suggestion as to how to accomplish using upper FRAM in this way? Thanks in advance, John Quote Link to post Share on other sites
Rei Vilo 695 Posted October 6, 2018 Share Posted October 6, 2018 I posted a similar question at the Energia GitHub repository: MSP430FR5994 — Large Arrays in FRAM Error. Quote Link to post Share on other sites
wygonski 0 Posted October 7, 2018 Author Share Posted October 7, 2018 Thanks for the reply. In your post you mentioned CCS includes MSP430 GCC v7.3.1. Did you have success building Energia projects in CCS with that compiler selection? Quote Link to post Share on other sites
wygonski 0 Posted October 7, 2018 Author Share Posted October 7, 2018 I am seeing in this post Energia support for MSP430FR5994 LaunchPad? that support has been added in Energia for the MSP430FR5994. This would work for me if I could utilize Upper FRAM on that chip. I have Energia E20 installed, and presumably I need to use -mlarge option for extended addressing to get to upper FRAM. How do I get Energia to use a compiler other than GCC 4.6.3? Quote Link to post Share on other sites
Rei Vilo 695 Posted October 9, 2018 Share Posted October 9, 2018 I posted a similar question at the Energia GitHub repository: Support for GCC MSP430 6.4.0.32? #63. Quote Link to post Share on other sites
jcR 6 Posted October 16, 2018 Share Posted October 16, 2018 "support has been added in Energia for the MSP430FR5994" but Serial1 is not working, and and even more unfortunate, the available I / O still does not support interrupt handling. I mentioned these problems since May 2018, Energia1.8.7E20 is available and the same problems are still unresolved. It is difficult to try to work with a chip that is very poorly supported by the ENERGIA teams. Sorry for this reminder, but please try to do something! I develloped a simple Lora gateway (Wifi+GSM/GPRS) from this launchpad and the results are good despite these difficulties of programming!! Jamesgrr 1 Quote Link to post Share on other sites
Jamesgrr 1 Posted October 24, 2018 Share Posted October 24, 2018 That LoRaWAN Gateway is awesome. Would love to see the source for all this. Quote Link to post Share on other sites
Rei Vilo 695 Posted October 27, 2018 Share Posted October 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. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.