Tool/software: TI C/C++ Compiler
I'm writing an application that will require nearly all of the resources available on the msp430fr5969.
I'm using the MSP430 GCC provided by Mitto Systems. When I compile with -mcode-region=none and -mdata-region=none, the application overflows the bss section and I get an error. When I compile with -mcode-region=either and -mdata-region=either, the application works fine. According to the GCC User Guide, this is because the compiler shifts the overflowing section to the upper memory region (HIFRAM) which starts at 0x10000.
However, my application consistently hangs during c startup (crt0_start or crt0_init_bss). During my investigation, I found that there are problems in writing to HIFRAM even though the linker sets the write attribute. From msp430fr5969.ld provided by the msp430-gcc package:
HIFRAM (rxw) : ORIGIN = 0x00010000, LENGTH = 0x00003FFF
To test the write functionality, I used the blink.c example (which has been working consistently) and added in some writes to HIFRAM. I found that certain memory locations do not seem to be writable and in some cases trying to write causes errors. Here are the writes I tried and the results of those writes:
*(volatile uint16_t *) (0x10000) = 0xFACE; // does not write
*(volatile uint16_t *) (0x10002) = 0xFACE; // does not write
//*(volatile uint16_t *) (0x11000) = 0xFACE; MSP430 Error :Could not single step device
*(volatile uint16_t *) (0x11F00) = 0xFACE; // writes normally
*(volatile uint16_t *) (0x11F02) = 0xFACE; // writes normally
*(volatile uint16_t *) (0x12B00) = 0xFACE; // does not write
*(volatile uint16_t *) (0x13FD2) = 0xFACE; // does not write