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.

TMS320F280025C-Q1: cannot use #pragma DATA_SECTION(symbol, "section name") to save a string into flash

Part Number: TMS320F280025C-Q1


Hi,TI.

    I am using F280025C-Q1. I want to save a sting like "0123456789" into flash by using #pragma DATA_SECTION(symbol, "section name"), but it did not work.

1st,I change the file 28002x_generic_flash_lnk.cmd as follows:

MEMORY
{
......
/* Flash sectors */
/* BANK 0 */
......

FLASH_SAVE_INFO : origin = 0x085000, length = 0x001000 /* array storage flash */
......
}

SECTIONS
{

......

InfoSection : > FLASH_SAVE_INFO, ALIGN(8) /* Array storage section */

......
}

2nd, I use this two command in main.c as follows:

#include "driverlib.h"
#include "device.h"
#include "board.h"

#pragma DATA_SECTION(info_array,"InfoSection");
const char info_array[10] = "0123456789";

Last, I change the project properties that pre-define _FLASH symbol and switch it to CPU1_FLASH.

However, I can not find the string "0123456789" at 0x085000 address when I open the hex file. 

Then, I open the map file and still can not find the info_array symbol.

However, it did work exactly when I use the same method on F280049 and F28027. 

So why?Why it did not work on F280025C using the same method?

My CCS version is 11.1.0.00011. The compiler cersion is TI v21.6.0.LTS.