Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Storing / Reading variables from FLASH on a TM4C123 MC

$
0
0

Hello and nice to meet you all, I'm Jaime and I'm totally new to this forums.

I've come here after searching for plenty of time how am I supposed to store and read variables from the FLASH memory. My situation is as follows.

I'm currently developing a simple project which requires about 64 KB of memory to store data read from an SD Card. These stored memory, although mostly ROM after written with the data obtained from the SD Card,  has to be used and can be modified by various functions, hence this is a global variable.

The problem is that the TMC123 has only 32 KB of SRAM, and no matter what I do, I can't use the .CMD file to modify where the data is saved since different problems arise.

As of right now, I've tried the following with the respective results:

1) Standard configuration: Results in a compilation error since memory available for BSS_GROUP or DATA_GROUP is over 117 KB

2) Placing .BSS on FLASH: Results in a successful compilation, but provides the error on debug "cannot load from non-primitive location" with a FaultISR(). According to my debugging sessions, this happens when i try to pass on the address of a data type (FATFS for those who know about the FATFS library). I assume this happens because FLASH is read-only (?), but here's one of the things I'm not sure about.

3) Placing .DATA on FLASH: Results in a successful compilation and provides no direct error, but certain data appears to be corrupted or missing, since functions from the FATFS library that work (Have been previously tested once and before on various different programs) stop working overall.

Now, Im not really sure what am I supposed to do. Is FLASH read only? If not, how do I write and read from it? is there any special way? I hope someone can help me.

Thanks!


Viewing all articles
Browse latest Browse all 262198

Trending Articles