Part Number: MSP430FR5994
Tool/software: Code Composer Studio
Hello,
I am trying to implement algorithms which are written in MATLAB to work on a MSP430. I use the MATLAB Coder for C code generation. The problem is, that these MATLAB functions' variables take up a lot of space on the uC. In the settings of the coder, I can choose between static or dynamic allocation of variable sized arrays. So, either the .sysmem or the .bss portion of the memory get really big. That leaves me two options for the memory on the MSP430:
1. move the heap (.sysmem) to FRAM2
2. move .bss (and maybe .data) to FRAM2
For option 1, I tried different alterations of the .cmd file, but non of them worked. I think my understanding of that file is not that well to modify it in a correct way.
For option 2, I just put FRAM2 instead of RAM in the .cmd file, but an error occurs:
#17003-D relocation from function "activity_recognition" to symbol "activity_not_empty" overflowed; the 18-bit relocated address 0x25a73 is too large to encode in the 16-bit field (type = 'R_MSP430X_ABS16' (15)
.bss : {} > FRAM2 /* Global & static vars */
.data : {} > RAM /* Global & static vars */
.TI.noinit : {} > RAM /* For #pragma noinit */
.stack : {} > RAM (HIGH) /* Software system stack */
I also changed the data model from restriced to large, but this doesn't do anything.
Can someone provide working code for either or both of the options? I'm also not sure which of them is the better way to do it.
Thanks,
Andrea


