Hello all,
my MSP430 project (MSP430F5310, CCSv6) will have the feature to be reprogrammed via a bus line which it is connected to. I have written some code to compress and encrypt the data, using the .txt file as an input.
Uncompressing the data requires a certain buffer in RAM[1] (configurable, 4 kB would be a good size). During the decompression, no other function (except I2C access) is running. Simply declaring a 4kB buffer will not fit into RAM (even when declared static).
So, I need some way to detect a space in RAM which I can use for my buffer while the decompression routine is running. Accessing an arbitrary memory location is not an issue, finding the right one is the harder part. I can of course manually check the map file and try to find my way around .bss and .data, then hard-code the address into the routine. I would however prefer a way which involves less manual (i.e. error-prone) interaction.
I am also not sure which memory locations (except for the stack) I should better avoid in order not to mess with rts430x_lc_sd_eabi.lib and the like.
Any good ideas?
Max
[1] I am using a slightly modified LZ77, which uses the already decompressed data as its dictionary. I could also use the data which has already been written to flash, but this is difficult as my routines support non-continuous data in the .txt file.