This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Strange RAM usage on F28027

Hi Folks

Im using the flash API to store some non-volatile data.

Im moving some sections around in RAM to allow me to store data that is to be written to flash. The data is a simple long integer (int32_t or dword) array, declared as follows:

#define PROFILE_SIZE 64

#pragma DATA_SECTION (profile0, 'FLASH_WRITE_Section');
int32_t profile0[PROFILE_SIZE] = {0};

My project .CMD file has the following for the relevant section:

SECTIONS
{
	FLASH_WRITE_Section	: > RAMM0	PAGE = 1
	/* Other sections here also for different RAM e.g. dataRAM or RAMM1... */
}

With PROFILE_SIZE set to 64 dwords this sees the expected size of FLASH_WRITE_Section of 128 words.

However if I add another array to the same section with a size of just 1, the section size balloons up to 192 words, making the memory allocation fail!!  (RAMM0 also contains 768 words of stack)

Where are the extra 62 words coming from?

Thanks