Quantcast
Viewing all articles
Browse latest Browse all 63778

Forum Post: stack inside FRAM on MSP430 (Ink_msp430fr6989.cmd)

Hey everyone, I am working on a new project and I would like everything, main code, variables, stack, etc to be inside the FRAM on the MSP430FR6989 . Currently, if I put all the of the variables in FRAM it works fine. I can follow the arrays into a spot in FRAM, but I cannot follow variables into FRAM (I'm 90% sure it just sits inside the stack pointer, which is inside SRAM). If I put .stack as going into FRAM it will compile and run on code composer, but then it will go into boot_special.c and not properly run the code, all without me even running the program. It'll go into this section in boot_special: /*****************************************************************************/ /* C_INT00_NOINIT_NOEXIT_MPU_INIT() - Specialized version of _c_int00 that */ /* initializes the FRAM memory protection */ /* unit and does not perform auto */ /* initialization and calls abort */ /* directly. */ /*****************************************************************************/ #pragma CLINK(_c_int00_noinit_noargs_noexit_mpu) CSTART_DECL _c_int00_noinit_noargs_noexit_mpu() { STACK_INIT(); __mpu_init(); _system_pre_init(); main(0); abort(); } and then go into pre_init.c I'm just currently messing around with the linker command file (Ink_ msp430fr6989 .cmd) and changing everything to FRAM vs. RAM GROUP(SIGNATURE_SHAREDMEMORY) { .ipesignature : {} /* IPE Signature */ .jtagpassword : {} /* JTAG Password */ } > IPESIGNATURE .bss : {} > FRAM /* Global & static vars */ .data : {} > FRAM /* Global & static vars */ .TI.noinit : {} > FRAM /* For #pragma noinit */ .stack : {} > FRAM (HIGH) /* Software system stack */ .tinyram : {} > TINYRAM /* Tiny RAM */ .infoA : {} > INFOA /* MSP430 INFO FRAM Memory segments */ .infoB : {} > INFOB .infoC : {} > INFOC .infoD : {} > INFOD normally .bss, .data, .TI.noinit, and .stack are all RAM and not FRAM. I would think the desire to put the stack in the FRAM would not be uncommon, and that it would work. I'm actually sure it'll work because in the Best Practices for FRAM that I see all over ( www.ti.com/.../slaa628.pdf) in section 3 it says you can place stacks inside FRAM. I am still somewhat new to the more assembly level programming stuff, so I would appreciate any help in getting the stack inside the FRAM, or any method of simply putting variables, constants, and main executable code inside of FRAM and out of normal RAM.

Viewing all articles
Browse latest Browse all 63778

Trending Articles