TI中文支持网
TI专业的中文技术问题搜集分享网站

关于F28377D FLASH问题

各位好,在实现用户编写的BOOTLOADER的过程中,发现关于FLASH的两个问题,具体如下:

1、开始的引导位置问题。在编写CMD文件过程中,如果   BEGIN从扇区A\B开始,程序正常运行,但是将   BEGIN从扇区E开始,则程序无法实现引导?

   BEGIN            : origin = 0x088000, length = 0x000002

2、当完成用户APP的FLASH烧写后,在扇区B烧写了一个状态值,然后跳转到用户APP,程序正常执行,但是当板子重新上电后,在读取扇区B的状态值时,会导致DSP复位,程序重新执行,读取扇区C不存在该问题。查看FLASH的值,扇区B\C均烧写正常(不知啥原因,附不上图片)。

主程序如下:

uint32_t main(void)
{
	Uint16 *Flash_ptr;
	//SCIA Flush
	while (!SciaRegs.SCICTL2.bit.TXEMPTY) {
	}
// Step 1. Initialize System Control:
// Enable Peripheral Clocks
// This example function is found in the F2837xD_SysCtrl.c file.
	InitSysCtrl(); //PLL activates

// Step 2. Initialize GPIO:
// This example function is found in the F2837xD_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
	InitGpio();
	// For this example, only init the pins for the SCI-A port.
	//  GPIO_SetupPinMux() - Sets the GPxMUX1/2 and GPyMUX1/2 register bits
	//  GPIO_SetupPinOptions() - Sets the direction and configuration of the GPIOS
	// These functions are found in the F2837xD_Gpio.c file.
	GPIO_SetupPinMux(28, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(28, GPIO_INPUT, GPIO_PUSHPULL);
	GPIO_SetupPinMux(29, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(29, GPIO_OUTPUT, GPIO_ASYNC);
/*// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
	DINT;*/

// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the F2837xD_PieCtrl.c file.InitPieCtrl();

// Disable CPU interrupts and clear all CPU interrupt flags:
	IER = 0x0000;
	IFR = 0x0000;InitIpc();
	InitFlash();//  Gain pump semaphoreSeizeFlashPump();

	EALLOW;
	SciaRegs.SCIFFTX.all = 0x8000;
	scia_fifo_init();// Initialize the SCI FIFO
	scia_init();  // Initialize SCI for echoback
	SCI_SendStatus("\n\n\r Communication kernel received and executing.");
	SCI_SendStatus("\n\r Type 'a' to relock baud-rate: ");
	SCIA_AutobaudLock();
	EDIS;
	SCI_SendStatus("\n\n\r*** baud-rate relocked ***");
	
	SCI_SendStatus("\n\r Processor is unlocked.");

	Flash_ptr = 0x82000;/* check for update the App */
//if(m_Calibration_Parameter.u16_Calibration_Status == 0x0011)
	if(*Flash_ptr == 0x0011)

	{		SCI_SendStatus("\n\r  ***** Start to implement APP ****** \n\r");		(*AppCode)();}/* Implement the Kernel */else{	/* implement the CKFA */SCI_SendStatus("\n\r  ***** Start to implement Bootloader ****** \n\r");cBootloader();}
	while (1) {
	}
}
 
麻烦群里的朋友,帮忙答疑一下,万分感谢。

 

 

 

 

Clack Tung:

回复 Eric Ma:

那么为什么设置在扇区B,程序照样运行?

各位好,在实现用户编写的BOOTLOADER的过程中,发现关于FLASH的两个问题,具体如下:

1、开始的引导位置问题。在编写CMD文件过程中,如果   BEGIN从扇区A\B开始,程序正常运行,但是将   BEGIN从扇区E开始,则程序无法实现引导?

   BEGIN            : origin = 0x088000, length = 0x000002

2、当完成用户APP的FLASH烧写后,在扇区B烧写了一个状态值,然后跳转到用户APP,程序正常执行,但是当板子重新上电后,在读取扇区B的状态值时,会导致DSP复位,程序重新执行,读取扇区C不存在该问题。查看FLASH的值,扇区B\C均烧写正常(不知啥原因,附不上图片)。

主程序如下:

uint32_t main(void)
{
	Uint16 *Flash_ptr;
	//SCIA Flush
	while (!SciaRegs.SCICTL2.bit.TXEMPTY) {
	}
// Step 1. Initialize System Control:
// Enable Peripheral Clocks
// This example function is found in the F2837xD_SysCtrl.c file.
	InitSysCtrl(); //PLL activates

// Step 2. Initialize GPIO:
// This example function is found in the F2837xD_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
	InitGpio();
	// For this example, only init the pins for the SCI-A port.
	//  GPIO_SetupPinMux() - Sets the GPxMUX1/2 and GPyMUX1/2 register bits
	//  GPIO_SetupPinOptions() - Sets the direction and configuration of the GPIOS
	// These functions are found in the F2837xD_Gpio.c file.
	GPIO_SetupPinMux(28, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(28, GPIO_INPUT, GPIO_PUSHPULL);
	GPIO_SetupPinMux(29, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(29, GPIO_OUTPUT, GPIO_ASYNC);
/*// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
	DINT;*/

// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the F2837xD_PieCtrl.c file.InitPieCtrl();

// Disable CPU interrupts and clear all CPU interrupt flags:
	IER = 0x0000;
	IFR = 0x0000;InitIpc();
	InitFlash();//  Gain pump semaphoreSeizeFlashPump();

	EALLOW;
	SciaRegs.SCIFFTX.all = 0x8000;
	scia_fifo_init();// Initialize the SCI FIFO
	scia_init();  // Initialize SCI for echoback
	SCI_SendStatus("\n\n\r Communication kernel received and executing.");
	SCI_SendStatus("\n\r Type 'a' to relock baud-rate: ");
	SCIA_AutobaudLock();
	EDIS;
	SCI_SendStatus("\n\n\r*** baud-rate relocked ***");
	
	SCI_SendStatus("\n\r Processor is unlocked.");

	Flash_ptr = 0x82000;/* check for update the App */
//if(m_Calibration_Parameter.u16_Calibration_Status == 0x0011)
	if(*Flash_ptr == 0x0011)

	{		SCI_SendStatus("\n\r  ***** Start to implement APP ****** \n\r");		(*AppCode)();}/* Implement the Kernel */else{	/* implement the CKFA */SCI_SendStatus("\n\r  ***** Start to implement Bootloader ****** \n\r");cBootloader();}
	while (1) {
	}
}
 
麻烦群里的朋友,帮忙答疑一下,万分感谢。

 

 

 

 

Eric Ma:

回复 Clack Tung:

你这个应该是带仿真器的情况吧。你断开仿真器试试。

ERIC

各位好,在实现用户编写的BOOTLOADER的过程中,发现关于FLASH的两个问题,具体如下:

1、开始的引导位置问题。在编写CMD文件过程中,如果   BEGIN从扇区A\B开始,程序正常运行,但是将   BEGIN从扇区E开始,则程序无法实现引导?

   BEGIN            : origin = 0x088000, length = 0x000002

2、当完成用户APP的FLASH烧写后,在扇区B烧写了一个状态值,然后跳转到用户APP,程序正常执行,但是当板子重新上电后,在读取扇区B的状态值时,会导致DSP复位,程序重新执行,读取扇区C不存在该问题。查看FLASH的值,扇区B\C均烧写正常(不知啥原因,附不上图片)。

主程序如下:

uint32_t main(void)
{
	Uint16 *Flash_ptr;
	//SCIA Flush
	while (!SciaRegs.SCICTL2.bit.TXEMPTY) {
	}
// Step 1. Initialize System Control:
// Enable Peripheral Clocks
// This example function is found in the F2837xD_SysCtrl.c file.
	InitSysCtrl(); //PLL activates

// Step 2. Initialize GPIO:
// This example function is found in the F2837xD_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
	InitGpio();
	// For this example, only init the pins for the SCI-A port.
	//  GPIO_SetupPinMux() - Sets the GPxMUX1/2 and GPyMUX1/2 register bits
	//  GPIO_SetupPinOptions() - Sets the direction and configuration of the GPIOS
	// These functions are found in the F2837xD_Gpio.c file.
	GPIO_SetupPinMux(28, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(28, GPIO_INPUT, GPIO_PUSHPULL);
	GPIO_SetupPinMux(29, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(29, GPIO_OUTPUT, GPIO_ASYNC);
/*// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
	DINT;*/

// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the F2837xD_PieCtrl.c file.InitPieCtrl();

// Disable CPU interrupts and clear all CPU interrupt flags:
	IER = 0x0000;
	IFR = 0x0000;InitIpc();
	InitFlash();//  Gain pump semaphoreSeizeFlashPump();

	EALLOW;
	SciaRegs.SCIFFTX.all = 0x8000;
	scia_fifo_init();// Initialize the SCI FIFO
	scia_init();  // Initialize SCI for echoback
	SCI_SendStatus("\n\n\r Communication kernel received and executing.");
	SCI_SendStatus("\n\r Type 'a' to relock baud-rate: ");
	SCIA_AutobaudLock();
	EDIS;
	SCI_SendStatus("\n\n\r*** baud-rate relocked ***");
	
	SCI_SendStatus("\n\r Processor is unlocked.");

	Flash_ptr = 0x82000;/* check for update the App */
//if(m_Calibration_Parameter.u16_Calibration_Status == 0x0011)
	if(*Flash_ptr == 0x0011)

	{		SCI_SendStatus("\n\r  ***** Start to implement APP ****** \n\r");		(*AppCode)();}/* Implement the Kernel */else{	/* implement the CKFA */SCI_SendStatus("\n\r  ***** Start to implement Bootloader ****** \n\r");cBootloader();}
	while (1) {
	}
}
 
麻烦群里的朋友,帮忙答疑一下,万分感谢。

 

 

 

 

Clack Tung:

回复 Eric Ma:

嗯,可能原来我是在仿真器跑过,重新验证了下确实不行,谢谢您。

另外有两个问题请教您一下:

1、扇区B无法作为数据区,而扇区D却可以,他们有何区别?

我通过FLASHAPI函数在扇区B成功烧写了一些数据,在仿真器上可以成功运行,当重新上电读取扇区B的数据,则DSP复位重启了,而扇区D则不存在该现象.

2、28377D有两核,那么CMD配置库函数只要存同一个地方即可还是两个需要存储?

我两个核都需要用到F021_API_F2837xD_FPU32.lib和c28x_fpu_dsp_library.lib等多个库函数,那么在CMD配置时,库是存在同一个扇区吗?CPU1和CPU2中对于库的存储配置是相同的?

万分感谢。

各位好,在实现用户编写的BOOTLOADER的过程中,发现关于FLASH的两个问题,具体如下:

1、开始的引导位置问题。在编写CMD文件过程中,如果   BEGIN从扇区A\B开始,程序正常运行,但是将   BEGIN从扇区E开始,则程序无法实现引导?

   BEGIN            : origin = 0x088000, length = 0x000002

2、当完成用户APP的FLASH烧写后,在扇区B烧写了一个状态值,然后跳转到用户APP,程序正常执行,但是当板子重新上电后,在读取扇区B的状态值时,会导致DSP复位,程序重新执行,读取扇区C不存在该问题。查看FLASH的值,扇区B\C均烧写正常(不知啥原因,附不上图片)。

主程序如下:

uint32_t main(void)
{
	Uint16 *Flash_ptr;
	//SCIA Flush
	while (!SciaRegs.SCICTL2.bit.TXEMPTY) {
	}
// Step 1. Initialize System Control:
// Enable Peripheral Clocks
// This example function is found in the F2837xD_SysCtrl.c file.
	InitSysCtrl(); //PLL activates

// Step 2. Initialize GPIO:
// This example function is found in the F2837xD_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
	InitGpio();
	// For this example, only init the pins for the SCI-A port.
	//  GPIO_SetupPinMux() - Sets the GPxMUX1/2 and GPyMUX1/2 register bits
	//  GPIO_SetupPinOptions() - Sets the direction and configuration of the GPIOS
	// These functions are found in the F2837xD_Gpio.c file.
	GPIO_SetupPinMux(28, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(28, GPIO_INPUT, GPIO_PUSHPULL);
	GPIO_SetupPinMux(29, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(29, GPIO_OUTPUT, GPIO_ASYNC);
/*// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
	DINT;*/

// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the F2837xD_PieCtrl.c file.InitPieCtrl();

// Disable CPU interrupts and clear all CPU interrupt flags:
	IER = 0x0000;
	IFR = 0x0000;InitIpc();
	InitFlash();//  Gain pump semaphoreSeizeFlashPump();

	EALLOW;
	SciaRegs.SCIFFTX.all = 0x8000;
	scia_fifo_init();// Initialize the SCI FIFO
	scia_init();  // Initialize SCI for echoback
	SCI_SendStatus("\n\n\r Communication kernel received and executing.");
	SCI_SendStatus("\n\r Type 'a' to relock baud-rate: ");
	SCIA_AutobaudLock();
	EDIS;
	SCI_SendStatus("\n\n\r*** baud-rate relocked ***");
	
	SCI_SendStatus("\n\r Processor is unlocked.");

	Flash_ptr = 0x82000;/* check for update the App */
//if(m_Calibration_Parameter.u16_Calibration_Status == 0x0011)
	if(*Flash_ptr == 0x0011)

	{		SCI_SendStatus("\n\r  ***** Start to implement APP ****** \n\r");		(*AppCode)();}/* Implement the Kernel */else{	/* implement the CKFA */SCI_SendStatus("\n\r  ***** Start to implement Bootloader ****** \n\r");cBootloader();}
	while (1) {
	}
}
 
麻烦群里的朋友,帮忙答疑一下,万分感谢。

 

 

 

 

Eric Ma:

回复 Clack Tung:

1. 都可以做数据区,其实无所谓page0, page1, 这个概念是老一代C28x沿用的,现在可以不区分。 

你的问题难确认,你需要自己单步调试,看在哪里导致程序跑飞。

2. 两个内核都非常独立,都有各自的memory和CMD,双核的是两个工程,用的CMD基本一样。

每个核都需要那个库的,你把CPU2当成CPU1还调试即可。区别在于CPU2一般是由CPU1来引导启动。

ERIC

各位好,在实现用户编写的BOOTLOADER的过程中,发现关于FLASH的两个问题,具体如下:

1、开始的引导位置问题。在编写CMD文件过程中,如果   BEGIN从扇区A\B开始,程序正常运行,但是将   BEGIN从扇区E开始,则程序无法实现引导?

   BEGIN            : origin = 0x088000, length = 0x000002

2、当完成用户APP的FLASH烧写后,在扇区B烧写了一个状态值,然后跳转到用户APP,程序正常执行,但是当板子重新上电后,在读取扇区B的状态值时,会导致DSP复位,程序重新执行,读取扇区C不存在该问题。查看FLASH的值,扇区B\C均烧写正常(不知啥原因,附不上图片)。

主程序如下:

uint32_t main(void)
{
	Uint16 *Flash_ptr;
	//SCIA Flush
	while (!SciaRegs.SCICTL2.bit.TXEMPTY) {
	}
// Step 1. Initialize System Control:
// Enable Peripheral Clocks
// This example function is found in the F2837xD_SysCtrl.c file.
	InitSysCtrl(); //PLL activates

// Step 2. Initialize GPIO:
// This example function is found in the F2837xD_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
	InitGpio();
	// For this example, only init the pins for the SCI-A port.
	//  GPIO_SetupPinMux() - Sets the GPxMUX1/2 and GPyMUX1/2 register bits
	//  GPIO_SetupPinOptions() - Sets the direction and configuration of the GPIOS
	// These functions are found in the F2837xD_Gpio.c file.
	GPIO_SetupPinMux(28, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(28, GPIO_INPUT, GPIO_PUSHPULL);
	GPIO_SetupPinMux(29, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(29, GPIO_OUTPUT, GPIO_ASYNC);
/*// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
	DINT;*/

// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the F2837xD_PieCtrl.c file.InitPieCtrl();

// Disable CPU interrupts and clear all CPU interrupt flags:
	IER = 0x0000;
	IFR = 0x0000;InitIpc();
	InitFlash();//  Gain pump semaphoreSeizeFlashPump();

	EALLOW;
	SciaRegs.SCIFFTX.all = 0x8000;
	scia_fifo_init();// Initialize the SCI FIFO
	scia_init();  // Initialize SCI for echoback
	SCI_SendStatus("\n\n\r Communication kernel received and executing.");
	SCI_SendStatus("\n\r Type 'a' to relock baud-rate: ");
	SCIA_AutobaudLock();
	EDIS;
	SCI_SendStatus("\n\n\r*** baud-rate relocked ***");
	
	SCI_SendStatus("\n\r Processor is unlocked.");

	Flash_ptr = 0x82000;/* check for update the App */
//if(m_Calibration_Parameter.u16_Calibration_Status == 0x0011)
	if(*Flash_ptr == 0x0011)

	{		SCI_SendStatus("\n\r  ***** Start to implement APP ****** \n\r");		(*AppCode)();}/* Implement the Kernel */else{	/* implement the CKFA */SCI_SendStatus("\n\r  ***** Start to implement Bootloader ****** \n\r");cBootloader();}
	while (1) {
	}
}
 
麻烦群里的朋友,帮忙答疑一下,万分感谢。

 

 

 

 

Clack Tung:

回复 Eric Ma:

"每个核都需要那个库的,你把CPU2当成CPU1还调试即可。"不好意思没明白这句意思。

我是这样理解的:两个核都是独立,因此,当CPU1和CPU2同时需要一个库的时候,仍然需要分别存储(如果需要在RAM运行,也得分别拷贝)。虽然是一个芯片,但是两个核独立,库函数无法只存储在一个存储器上,这样也造成冗余,浪费了FLASH资源。其实28377D虽然FLASH相对于28335升级了一倍,但相对一个核而言,分到的存储区其实也和28335一样的。此外,个人感觉28377的设计上很多是从ARM那边移植过来的,跟原本的C2000的设计有很大不同,例如原本C2000芯片在存储区上简单明了的说明Boot-to-Flash Entry Point,28377的手册搞得特细,感觉很隐晦,同时在28377的系统底层驱动程序相对于其他C2000芯片,占用了较大程序空间。

各位好,在实现用户编写的BOOTLOADER的过程中,发现关于FLASH的两个问题,具体如下:

1、开始的引导位置问题。在编写CMD文件过程中,如果   BEGIN从扇区A\B开始,程序正常运行,但是将   BEGIN从扇区E开始,则程序无法实现引导?

   BEGIN            : origin = 0x088000, length = 0x000002

2、当完成用户APP的FLASH烧写后,在扇区B烧写了一个状态值,然后跳转到用户APP,程序正常执行,但是当板子重新上电后,在读取扇区B的状态值时,会导致DSP复位,程序重新执行,读取扇区C不存在该问题。查看FLASH的值,扇区B\C均烧写正常(不知啥原因,附不上图片)。

主程序如下:

uint32_t main(void)
{
	Uint16 *Flash_ptr;
	//SCIA Flush
	while (!SciaRegs.SCICTL2.bit.TXEMPTY) {
	}
// Step 1. Initialize System Control:
// Enable Peripheral Clocks
// This example function is found in the F2837xD_SysCtrl.c file.
	InitSysCtrl(); //PLL activates

// Step 2. Initialize GPIO:
// This example function is found in the F2837xD_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
	InitGpio();
	// For this example, only init the pins for the SCI-A port.
	//  GPIO_SetupPinMux() - Sets the GPxMUX1/2 and GPyMUX1/2 register bits
	//  GPIO_SetupPinOptions() - Sets the direction and configuration of the GPIOS
	// These functions are found in the F2837xD_Gpio.c file.
	GPIO_SetupPinMux(28, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(28, GPIO_INPUT, GPIO_PUSHPULL);
	GPIO_SetupPinMux(29, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(29, GPIO_OUTPUT, GPIO_ASYNC);
/*// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
	DINT;*/

// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the F2837xD_PieCtrl.c file.InitPieCtrl();

// Disable CPU interrupts and clear all CPU interrupt flags:
	IER = 0x0000;
	IFR = 0x0000;InitIpc();
	InitFlash();//  Gain pump semaphoreSeizeFlashPump();

	EALLOW;
	SciaRegs.SCIFFTX.all = 0x8000;
	scia_fifo_init();// Initialize the SCI FIFO
	scia_init();  // Initialize SCI for echoback
	SCI_SendStatus("\n\n\r Communication kernel received and executing.");
	SCI_SendStatus("\n\r Type 'a' to relock baud-rate: ");
	SCIA_AutobaudLock();
	EDIS;
	SCI_SendStatus("\n\n\r*** baud-rate relocked ***");
	
	SCI_SendStatus("\n\r Processor is unlocked.");

	Flash_ptr = 0x82000;/* check for update the App */
//if(m_Calibration_Parameter.u16_Calibration_Status == 0x0011)
	if(*Flash_ptr == 0x0011)

	{		SCI_SendStatus("\n\r  ***** Start to implement APP ****** \n\r");		(*AppCode)();}/* Implement the Kernel */else{	/* implement the CKFA */SCI_SendStatus("\n\r  ***** Start to implement Bootloader ****** \n\r");cBootloader();}
	while (1) {
	}
}
 
麻烦群里的朋友,帮忙答疑一下,万分感谢。

 

 

 

 

Eric Ma:

回复 Clack Tung:

如果这个库函数存在ROM中,那么直接调用也行。否则就每个核都要添加该库,因为两个核都是独立的。

你说F28377的手册搞得特细,既然细就不会隐晦啊。

你指的驱动程序是什么?那些占用程序资源?bootloader 都是放在ROM的。

至于其他外设,如果是增强型的,功能强大了,配置寄存器自然会增加。

ERIC

各位好,在实现用户编写的BOOTLOADER的过程中,发现关于FLASH的两个问题,具体如下:

1、开始的引导位置问题。在编写CMD文件过程中,如果   BEGIN从扇区A\B开始,程序正常运行,但是将   BEGIN从扇区E开始,则程序无法实现引导?

   BEGIN            : origin = 0x088000, length = 0x000002

2、当完成用户APP的FLASH烧写后,在扇区B烧写了一个状态值,然后跳转到用户APP,程序正常执行,但是当板子重新上电后,在读取扇区B的状态值时,会导致DSP复位,程序重新执行,读取扇区C不存在该问题。查看FLASH的值,扇区B\C均烧写正常(不知啥原因,附不上图片)。

主程序如下:

uint32_t main(void)
{
	Uint16 *Flash_ptr;
	//SCIA Flush
	while (!SciaRegs.SCICTL2.bit.TXEMPTY) {
	}
// Step 1. Initialize System Control:
// Enable Peripheral Clocks
// This example function is found in the F2837xD_SysCtrl.c file.
	InitSysCtrl(); //PLL activates

// Step 2. Initialize GPIO:
// This example function is found in the F2837xD_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
	InitGpio();
	// For this example, only init the pins for the SCI-A port.
	//  GPIO_SetupPinMux() - Sets the GPxMUX1/2 and GPyMUX1/2 register bits
	//  GPIO_SetupPinOptions() - Sets the direction and configuration of the GPIOS
	// These functions are found in the F2837xD_Gpio.c file.
	GPIO_SetupPinMux(28, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(28, GPIO_INPUT, GPIO_PUSHPULL);
	GPIO_SetupPinMux(29, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(29, GPIO_OUTPUT, GPIO_ASYNC);
/*// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
	DINT;*/

// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the F2837xD_PieCtrl.c file.InitPieCtrl();

// Disable CPU interrupts and clear all CPU interrupt flags:
	IER = 0x0000;
	IFR = 0x0000;InitIpc();
	InitFlash();//  Gain pump semaphoreSeizeFlashPump();

	EALLOW;
	SciaRegs.SCIFFTX.all = 0x8000;
	scia_fifo_init();// Initialize the SCI FIFO
	scia_init();  // Initialize SCI for echoback
	SCI_SendStatus("\n\n\r Communication kernel received and executing.");
	SCI_SendStatus("\n\r Type 'a' to relock baud-rate: ");
	SCIA_AutobaudLock();
	EDIS;
	SCI_SendStatus("\n\n\r*** baud-rate relocked ***");
	
	SCI_SendStatus("\n\r Processor is unlocked.");

	Flash_ptr = 0x82000;/* check for update the App */
//if(m_Calibration_Parameter.u16_Calibration_Status == 0x0011)
	if(*Flash_ptr == 0x0011)

	{		SCI_SendStatus("\n\r  ***** Start to implement APP ****** \n\r");		(*AppCode)();}/* Implement the Kernel */else{	/* implement the CKFA */SCI_SendStatus("\n\r  ***** Start to implement Bootloader ****** \n\r");cBootloader();}
	while (1) {
	}
}
 
麻烦群里的朋友,帮忙答疑一下,万分感谢。

 

 

 

 

Clack Tung:

回复 Eric Ma:

以controlsuite中的GPIO翻转为例,28377的代码量相对于28335的代码量就增加了快一倍,而这个主要耗费系统FLASH资源的是系统的底层驱动,如下红色字体部分。

 output                                  attributes/ section   page    origin      length       input sections ——–  —-  ———-  ———-   —————- codestart *          0    00320000    00000002                       00320000    00000002     DSP2833x_CodeStartBranch.obj (codestart)

.text      0    00320002    00000564                       00320002    00000316     DSP2833x_DefaultIsr.obj (.text:retain)                   00320318    000000f8     DSP2833x_SysCtrl.obj (.text)                   00320410    00000083     Example_2833xGpioToggle.obj (.text)                   00320493    00000046     rts2800_fpu32.lib : boot.obj (.text)                   003204d9    00000028     DSP2833x_PieCtrl.obj (.text)                   00320501    00000022     DSP2833x_PieVect.obj (.text)                   00320523    00000019     rts2800_fpu32.lib : args_main.obj (.text)                   0032053c    00000019                       : exit.obj (.text)                   00320555    00000009                       : _lock.obj (.text)                   0032055e    00000008     DSP2833x_CodeStartBranch.obj (.text) output                                  attributes/ section   page    origin      length       input sections ——–  —-  ———-  ———-   —————- codestart *          0    00082000    00000002                       00082000    00000002     F2837xD_CodeStartBranch.obj (codestart)

.text      0    00084000    00000c31                       00084000    00000585     F2837xD_DefaultISR.obj (.text:retain)                   00084585    000002c0     F2837xD_SysCtrl.obj (.text)                   00084845    0000024a     F2837xD_Gpio.obj (.text)                   00084a8f    00000093     GpioToggle.obj (.text)                   00084b22    00000046     rts2800_fpu32.lib : boot.obj (.text)                   00084b68    00000028     F2837xD_PieCtrl.obj (.text)                   00084b90    00000028     F2837xD_PieVect.obj (.text)                   00084bb8    0000001e     rts2800_fpu32.lib : memcpy.obj (.text)                   00084bd6    00000019                       : args_main.obj (.text)                   00084bef    00000019                       : exit.obj (.text)                   00084c08    00000018                       : ll_aox.obj (.text)                   00084c20    00000009                       : _lock.obj (.text)                   00084c29    00000008     F2837xD_CodeStartBranch.obj (.text)

 非常感谢您的耐心和专业的解答。

 

 

 

各位好,在实现用户编写的BOOTLOADER的过程中,发现关于FLASH的两个问题,具体如下:

1、开始的引导位置问题。在编写CMD文件过程中,如果   BEGIN从扇区A\B开始,程序正常运行,但是将   BEGIN从扇区E开始,则程序无法实现引导?

   BEGIN            : origin = 0x088000, length = 0x000002

2、当完成用户APP的FLASH烧写后,在扇区B烧写了一个状态值,然后跳转到用户APP,程序正常执行,但是当板子重新上电后,在读取扇区B的状态值时,会导致DSP复位,程序重新执行,读取扇区C不存在该问题。查看FLASH的值,扇区B\C均烧写正常(不知啥原因,附不上图片)。

主程序如下:

uint32_t main(void)
{
	Uint16 *Flash_ptr;
	//SCIA Flush
	while (!SciaRegs.SCICTL2.bit.TXEMPTY) {
	}
// Step 1. Initialize System Control:
// Enable Peripheral Clocks
// This example function is found in the F2837xD_SysCtrl.c file.
	InitSysCtrl(); //PLL activates

// Step 2. Initialize GPIO:
// This example function is found in the F2837xD_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
	InitGpio();
	// For this example, only init the pins for the SCI-A port.
	//  GPIO_SetupPinMux() - Sets the GPxMUX1/2 and GPyMUX1/2 register bits
	//  GPIO_SetupPinOptions() - Sets the direction and configuration of the GPIOS
	// These functions are found in the F2837xD_Gpio.c file.
	GPIO_SetupPinMux(28, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(28, GPIO_INPUT, GPIO_PUSHPULL);
	GPIO_SetupPinMux(29, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(29, GPIO_OUTPUT, GPIO_ASYNC);
/*// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
	DINT;*/

// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the F2837xD_PieCtrl.c file.InitPieCtrl();

// Disable CPU interrupts and clear all CPU interrupt flags:
	IER = 0x0000;
	IFR = 0x0000;InitIpc();
	InitFlash();//  Gain pump semaphoreSeizeFlashPump();

	EALLOW;
	SciaRegs.SCIFFTX.all = 0x8000;
	scia_fifo_init();// Initialize the SCI FIFO
	scia_init();  // Initialize SCI for echoback
	SCI_SendStatus("\n\n\r Communication kernel received and executing.");
	SCI_SendStatus("\n\r Type 'a' to relock baud-rate: ");
	SCIA_AutobaudLock();
	EDIS;
	SCI_SendStatus("\n\n\r*** baud-rate relocked ***");
	
	SCI_SendStatus("\n\r Processor is unlocked.");

	Flash_ptr = 0x82000;/* check for update the App */
//if(m_Calibration_Parameter.u16_Calibration_Status == 0x0011)
	if(*Flash_ptr == 0x0011)

	{		SCI_SendStatus("\n\r  ***** Start to implement APP ****** \n\r");		(*AppCode)();}/* Implement the Kernel */else{	/* implement the CKFA */SCI_SendStatus("\n\r  ***** Start to implement Bootloader ****** \n\r");cBootloader();}
	while (1) {
	}
}
 
麻烦群里的朋友,帮忙答疑一下,万分感谢。

 

 

 

 

Eric Ma:

回复 Clack Tung:

你可以对比一下那几个函数的区别,在我看来,F2837x功能比较强大,资源比较多,GPIO, ISR都比F28335多,初始化自然会多一些代码。而非F2837X因为其他原因浪费代码空间。

ERIC

各位好,在实现用户编写的BOOTLOADER的过程中,发现关于FLASH的两个问题,具体如下:

1、开始的引导位置问题。在编写CMD文件过程中,如果   BEGIN从扇区A\B开始,程序正常运行,但是将   BEGIN从扇区E开始,则程序无法实现引导?

   BEGIN            : origin = 0x088000, length = 0x000002

2、当完成用户APP的FLASH烧写后,在扇区B烧写了一个状态值,然后跳转到用户APP,程序正常执行,但是当板子重新上电后,在读取扇区B的状态值时,会导致DSP复位,程序重新执行,读取扇区C不存在该问题。查看FLASH的值,扇区B\C均烧写正常(不知啥原因,附不上图片)。

主程序如下:

uint32_t main(void)
{
	Uint16 *Flash_ptr;
	//SCIA Flush
	while (!SciaRegs.SCICTL2.bit.TXEMPTY) {
	}
// Step 1. Initialize System Control:
// Enable Peripheral Clocks
// This example function is found in the F2837xD_SysCtrl.c file.
	InitSysCtrl(); //PLL activates

// Step 2. Initialize GPIO:
// This example function is found in the F2837xD_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
	InitGpio();
	// For this example, only init the pins for the SCI-A port.
	//  GPIO_SetupPinMux() - Sets the GPxMUX1/2 and GPyMUX1/2 register bits
	//  GPIO_SetupPinOptions() - Sets the direction and configuration of the GPIOS
	// These functions are found in the F2837xD_Gpio.c file.
	GPIO_SetupPinMux(28, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(28, GPIO_INPUT, GPIO_PUSHPULL);
	GPIO_SetupPinMux(29, GPIO_MUX_CPU1, 1);
	GPIO_SetupPinOptions(29, GPIO_OUTPUT, GPIO_ASYNC);
/*// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
	DINT;*/

// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the F2837xD_PieCtrl.c file.InitPieCtrl();

// Disable CPU interrupts and clear all CPU interrupt flags:
	IER = 0x0000;
	IFR = 0x0000;InitIpc();
	InitFlash();//  Gain pump semaphoreSeizeFlashPump();

	EALLOW;
	SciaRegs.SCIFFTX.all = 0x8000;
	scia_fifo_init();// Initialize the SCI FIFO
	scia_init();  // Initialize SCI for echoback
	SCI_SendStatus("\n\n\r Communication kernel received and executing.");
	SCI_SendStatus("\n\r Type 'a' to relock baud-rate: ");
	SCIA_AutobaudLock();
	EDIS;
	SCI_SendStatus("\n\n\r*** baud-rate relocked ***");
	
	SCI_SendStatus("\n\r Processor is unlocked.");

	Flash_ptr = 0x82000;/* check for update the App */
//if(m_Calibration_Parameter.u16_Calibration_Status == 0x0011)
	if(*Flash_ptr == 0x0011)

	{		SCI_SendStatus("\n\r  ***** Start to implement APP ****** \n\r");		(*AppCode)();}/* Implement the Kernel */else{	/* implement the CKFA */SCI_SendStatus("\n\r  ***** Start to implement Bootloader ****** \n\r");cBootloader();}
	while (1) {
	}
}
 
麻烦群里的朋友,帮忙答疑一下,万分感谢。

 

 

 

 

Clack Tung:

回复 Eric Ma:

谢谢您的解答,我做了一个bootloader,利用扇区B存储数据,区分是否已经下载过程序,但是第一次运行正常(挂着仿真器),第二次重新上电后(脱机运行),bootloader程序均正常,等到读取扇区B的数据判断时,DSP就复位了(执行到红色字体部分,可以看到串口输出了: Processor is unlocked),而利用扇区D则不存在此问题,麻烦您帮忙看看(已采用word格式粘贴,格式仍然无法对齐)。

主程序:

uint32_t main(void) {  Uint16 *Flash_ptr;  //SCIA Flush  while (!SciaRegs.SCICTL2.bit.TXEMPTY) {  } // Step 1. Initialize System Control: // Enable Peripheral Clocks // This example function is found in the F2837xD_SysCtrl.c file.  InitSysCtrl(); //PLL activates

// Step 2. Initialize GPIO: // This example function is found in the F2837xD_Gpio.c file and // illustrates how to set the GPIO to it's default state.  InitGpio();  // For this example, only init the pins for the SCI-A port.  //  GPIO_SetupPinMux() – Sets the GPxMUX1/2 and GPyMUX1/2 register bits  //  GPIO_SetupPinOptions() – Sets the direction and configuration of the GPIOS  // These functions are found in the F2837xD_Gpio.c file.  GPIO_SetupPinMux(28, GPIO_MUX_CPU1, 1);  GPIO_SetupPinOptions(28, GPIO_INPUT, GPIO_PUSHPULL);  GPIO_SetupPinMux(29, GPIO_MUX_CPU1, 1);  GPIO_SetupPinOptions(29, GPIO_OUTPUT, GPIO_ASYNC); /*// Step 3. Clear all interrupts and initialize PIE vector table: // Disable CPU interrupts  DINT;*/

// Initialize the PIE control registers to their default state. // The default state is all PIE interrupts disabled and flags // are cleared. // This function is found in the F2837xD_PieCtrl.c file.     InitPieCtrl();

// Disable CPU interrupts and clear all CPU interrupt flags:  IER = 0x0000;  IFR = 0x0000;

// Initialize the PIE vector table with pointers to the shell Interrupt // Service Routines (ISR). // This will populate the entire table, even if the interrupt // is not used in this example.  This is useful for debug purposes. // The shell ISR routines are found in F2837xD_DefaultIsr.c. // This function is found in F2837xD_PieVect.c. //    InitPieVectTable(); /*  InitCpuTimers();   // For this example, only initialize the Cpu Timers     // Configure CPU-Timer 0, 1, and 2 to interrupt every second:     // 200MHz CPU Freq, 5ms Period (in uSeconds)     ConfigCpuTimer(&CpuTimer0, 200, 5000);     // To ensure precise timing, use write-only instructions to write to the entire register. Therefore, if any     // of the configuration bits are changed in ConfigCpuTimer and InitCpuTimers (in F2837xD_cputimervars.h), the     // below settings must also be updated.     CpuTimer0Regs.TCR.all = 0x4000; // Use write-only instruction to set TSS bit = 0     // Enable global Interrupts and higher priority real-time debug events:     EINT;  // Enable Global interrupt INTM     ERTM;  // Enable Global realtime interrupt DBGM */

    InitIpc();  InitFlash();    //  Gain pump semaphore     SeizeFlashPump();

 

//  Init_Flash_Sectors();

 /*read CCNF0 register to check if SCI is enabled or not*/ //     if((DevCfgRegs.DC8.bit.SCI_A != 0x01)) //     { //      return 0xFFFFFFFF; //     }  EALLOW;  SciaRegs.SCIFFTX.all = 0x8000;  scia_fifo_init();    // Initialize the SCI FIFO  scia_init();  // Initialize SCI for echoback  SCI_SendStatus("\n\n\r Communication kernel received and executing.");  SCI_SendStatus("\n\r Type 'a' to relock baud-rate: ");  SCIA_AutobaudLock();  EDIS;  SCI_SendStatus("\n\n\r*** baud-rate relocked ***");  /*——————————————————————   Unlock the CSM.   If the API functions are going to run in unsecured RAM   then the CSM must be unlocked in order for the flash   API functions to access the flash.

  If the flash API functions are executed from secure memory   (L0-L3) then this step is not required.   ——————————————————————*/  SCI_SendStatus("\n\r Processor is unlocked.");

 // Example_MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);  // Copy the Flash API functions to SARAM //    Example_MemCopy(&F021_API_F2837xD_LoadStart, &F021_API_F2837xD_LoadEnd, &F021_API_F2837xD_RunStart); //    memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);  Flash_ptr = 0x86000;     /* check for update the App */ //    if(m_Calibration_Parameter.u16_Calibration_Status == 0x0011)  if(*Flash_ptr == 0x0011)

 {     SCI_SendStatus("\n\r  ***** Start to implement APP ****** \n\r");     (*AppCode)();     }    /* Implement the Kernel */     else     { /* implement the CKFA */      SCI_SendStatus("\n\r  ***** Start to implement Bootloader ****** \n\r");      cBootloader();     }  while (1) {  }

}

 bootloader的CMD:

MEMORY { PAGE 0:    /* Program Memory */           /* Memory (RAM/FLASH) blocks can be moved to PAGE1 for data allocation */           /* BEGIN is used for the "boot to Flash" bootloader mode   */

   BEGIN            : origin = 0x080000, length = 0x000002    RAMM0            : origin = 0x000122, length = 0x0002DE    RAMD0            : origin = 0x00B000, length = 0x000800    RAMLS03          : origin = 0x008000, length = 0x001800    RAMGS14          : origin = 0x01A000, length = 0x001000    RAMGS15          : origin = 0x01B000, length = 0x001000    RESET            : origin = 0x3FFFC0, length = 0x000002    /* Flash sectors */    FLASHA           : origin = 0x080002, length = 0x001FFE /* on-chip Flash */    FLASHB           : origin = 0x082000, length = 0x002000 /* on-chip Flash */    FLASHC           : origin = 0x084000, length = 0x002000 /* on-chip Flash */ //   FLASHD           : origin = 0x086000, length = 0x002000 /* on-chip Flash */    FLASHE           : origin = 0x088000, length = 0x008000 /* on-chip Flash */    FLASHF           : origin = 0x090000, length = 0x008000 /* on-chip Flash */    FLASHG           : origin = 0x098000, length = 0x008000 /* on-chip Flash */    FLASHH           : origin = 0x0A0000, length = 0x008000 /* on-chip Flash */    FLASHI           : origin = 0x0A8000, length = 0x008000 /* on-chip Flash */    FLASHJ           : origin = 0x0B0000, length = 0x008000 /* on-chip Flash */    FLASHK           : origin = 0x0B8000, length = 0x002000 /* on-chip Flash */    FLASHL           : origin = 0x0BA000, length = 0x002000 /* on-chip Flash */    FLASHM           : origin = 0x0BC000, length = 0x002000 /* on-chip Flash */    FLASHN           : origin = 0x0BE000, length = 0x002000 /* on-chip Flash */

PAGE 1 :   /* Data Memory */          /* Memory (RAM/FLASH) blocks can be moved to PAGE0 for program allocation */

    BOOT_RSVD       : origin = 0x000002, length = 0x000120     /* Part of M0, BOOT rom will use this for stack */  RAMM1           : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */     RAMD1           : origin = 0x00B800, length = 0x000800     RAMLS3           : origin = 0x009800, length = 0x000800     RAMLS4        : origin = 0x00A000, length = 0x000800     RAMLS5      : origin = 0x00A800, length = 0x000800

// RAMGS0          : origin = 0x00C000, length = 0x001000  RAMGS1          : origin = 0x00D000, length = 0x001000  RAMGS2          : origin = 0x00E000, length = 0x001000  RAMGS3          : origin = 0x00F000, length = 0x001000  RAMGS4          : origin = 0x010000, length = 0x001000  RAMGS5          : origin = 0x011000, length = 0x001000  RAMGS6          : origin = 0x012000, length = 0x001000  RAMGS7          : origin = 0x013000, length = 0x001000  RAMGS8          : origin = 0x014000, length = 0x001000  RAMGS9          : origin = 0x015000, length = 0x001000  RAMGS10         : origin = 0x016000, length = 0x001000  RAMGS11         : origin = 0x017000, length = 0x001000  RAMGS12         : origin = 0x018000, length = 0x001000  RAMGS13         : origin = 0x019000, length = 0x001000

    RAMBUFF1        : origin = 0x00C000, length = 0x000800     /* on-chip RAM block L3 First 2KW */     RAMBUFF2     : origin = 0x00C800, length = 0x000800   /* on-chip RAM block L3 First 2kW*/ //    FLASHB          : origin = 0x082000, length = 0x002000    FLASHD           : origin = 0x086000, length = 0x002000    CPU2TOCPU1RAM   : origin = 0x03F800, length = 0x000400    CPU1TOCPU2RAM   : origin = 0x03FC00, length = 0x000400 }

SECTIONS {    /* Allocate program areas: */    .cinit              : > FLASHE      PAGE = 0    .pinit              : > FLASHE,     PAGE = 0    .text               : >> FLASHE      PAGE = 0    codestart           : > BEGIN PAGE = 0     GROUP     {         ramfuncs         { -l F021_API_F2837xD_FPU32.lib}

    } LOAD = FLASHE,       RUN  = RAMLS03,       LOAD_START(_RamfuncsLoadStart),       LOAD_SIZE(_RamfuncsLoadSize),       LOAD_END(_RamfuncsLoadEnd),       RUN_START(_RamfuncsRunStart),       RUN_SIZE(_RamfuncsRunSize),       RUN_END(_RamfuncsRunEnd),       PAGE = 0

   /* Allocate uninitalized data sections: */    .stack              : > RAMM1       PAGE = 1    .ebss               : > RAMLS5      PAGE = 1    .esysmem            : > RAMLS5      PAGE = 1

   /* Initalized sections go in Flash */    .econst             : > FLASHE       PAGE = 0    .switch             : > FLASHE      PAGE = 0

   .reset              : > RESET,     PAGE = 0, TYPE = DSECT /* not used, */

   /* The following section definitions are required when using the IPC API Drivers */     GROUP : > CPU1TOCPU2RAM, PAGE = 1     {         PUTBUFFER         PUTWRITEIDX         GETREADIDX     }

    GROUP : > CPU2TOCPU1RAM, PAGE = 1     {         GETBUFFER :    TYPE = DSECT         GETWRITEIDX :  TYPE = DSECT         PUTREADIDX :   TYPE = DSECT     }     BlockTransferBuffer1: > RAMBUFF1  PAGE = 1 ,fill = 0x0000    BlockTransferBuffer2: > RAMBUFF2  PAGE = 1 ,fill = 0x0000    sCalibration_Parameter    : > FLASHD,     PAGE = 1 }

/* //=========================================================================== // End of file. //=========================================================================== */

 

APP的 CMD:

MEMORY { PAGE 0 :  /* Program Memory */           /* Memory (RAM/FLASH) blocks can be moved to PAGE1 for data allocation */           /* BEGIN is used for the "boot to Flash" bootloader mode   */    BEGIN            : origin = 0x084000, length = 0x000002 

   RAMM0            : origin = 0x000122, length = 0x0002DE    RAMD0            : origin = 0x00B000, length = 0x000800

   RAMLS4        : origin = 0x00A000, length = 0x000800    RAMGS14          : origin = 0x01A000, length = 0x001000    RAMGS15          : origin = 0x01B000, length = 0x001000    RESET            : origin = 0x3FFFC0, length = 0x000002       /* Flash sectors */    FLASHA           : origin = 0x080000, length = 0x002000 /* on-chip Flash */    FLASHB           : origin = 0x082000, length = 0x002000 /* on-chip Flash */    FLASHC           : origin = 0x084002, length = 0x001FFE /* on-chip Flash */    // FLASHD           : origin = 0x086000, length = 0x002000 /* on-chip Flash */    FLASHE           : origin = 0x088000, length = 0x008000 /* on-chip Flash */    FLASHF           : origin = 0x090000, length = 0x008000 /* on-chip Flash */    FLASHG           : origin = 0x098000, length = 0x008000 /* on-chip Flash */    FLASHH           : origin = 0x0A0000, length = 0x008000 /* on-chip Flash */    FLASHI           : origin = 0x0A8000, length = 0x008000 /* on-chip Flash */    FLASHJ           : origin = 0x0B0000, length = 0x008000 /* on-chip Flash */    FLASHK           : origin = 0x0B8000, length = 0x002000 /* on-chip Flash */    FLASHL           : origin = 0x0BA000, length = 0x002000 /* on-chip Flash */    FLASHM           : origin = 0x0BC000, length = 0x002000 /* on-chip Flash */    FLASHN           : origin = 0x0BE000, length = 0x002000 /* on-chip Flash */  

PAGE 1 : /* Data Memory */          /* Memory (RAM/FLASH) blocks can be moved to PAGE0 for program allocation */

   BOOT_RSVD       : origin = 0x000002, length = 0x000120     /* Part of M0, BOOT rom will use this for stack */    RAMM1           : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */    RAMD1           : origin = 0x00B800, length = 0x000800

   RAMLS03          : origin = 0x008000, length = 0x001800    RAMLS3           : origin = 0x009800, length = 0x000800    RAMLS5      : origin = 0x00A800, length = 0x000800

   RAMGS0      : origin = 0x00C000, length = 0x001000    RAMGS1          : origin = 0x00D000, length = 0x001000    RAMGS2          : origin = 0x00E000, length = 0x001000    RAMGS3          : origin = 0x00F000, length = 0x001000    RAMGS4          : origin = 0x010000, length = 0x001000    RAMGS5          : origin = 0x011000, length = 0x001000    RAMGS6          : origin = 0x012000, length = 0x001000    RAMGS7          : origin = 0x013000, length = 0x001000    RAMGS8          : origin = 0x014000, length = 0x001000    RAMGS9          : origin = 0x015000, length = 0x001000    RAMGS10         : origin = 0x016000, length = 0x001000    RAMGS11         : origin = 0x017000, length = 0x001000    RAMGS12         : origin = 0x018000, length = 0x001000    RAMGS13         : origin = 0x019000, length = 0x001000

//   FLASHB           : origin = 0x082000, length = 0x002000 /* on-chip Flash */    FLASHD           : origin = 0x086000, length = 0x002000 /* on-chip Flash */

      CPU2TOCPU1RAM   : origin = 0x03F800, length = 0x000400    CPU1TOCPU2RAM   : origin = 0x03FC00, length = 0x000400 }

SECTIONS {    /* Allocate program areas: */    .cinit              : > FLASHC      PAGE = 0, ALIGN(4)    .pinit              : > FLASHC,     PAGE = 0, ALIGN(4)    .text               : > FLASHC      PAGE = 0, ALIGN(4)    codestart           : > BEGIN       PAGE = 0, ALIGN(4)    ramfuncs            : LOAD = FLASHC,                          RUN = RAMLS4,                          LOAD_START(_RamfuncsLoadStart),                          LOAD_SIZE(_RamfuncsLoadSize),                          LOAD_END(_RamfuncsLoadEnd),                          RUN_START(_RamfuncsRunStart),                          RUN_SIZE(_RamfuncsRunSize),                          RUN_END(_RamfuncsRunEnd),                          PAGE = 0, ALIGN(4)

          /* Allocate uninitalized data sections: */    .stack              : > RAMM1        PAGE = 1    .ebss               : > RAMLS3       PAGE = 1    .esysmem            : > RAMLS3       PAGE = 1

   /* Initalized sections go in Flash */    .econst             : > FLASHC      PAGE = 0, ALIGN(4)    .switch             : > FLASHC      PAGE = 0, ALIGN(4)       .reset              : > RESET,     PAGE = 0, TYPE = DSECT /* not used, */

      /* The following section definitions are required when using the IPC API Drivers */     GROUP : > CPU1TOCPU2RAM, PAGE = 1     {         PUTBUFFER         PUTWRITEIDX         GETREADIDX     }         GROUP : > CPU2TOCPU1RAM, PAGE = 1     {         GETBUFFER :    TYPE = DSECT         GETWRITEIDX :  TYPE = DSECT         PUTREADIDX :   TYPE = DSECT     }        }

/* //=========================================================================== // End of file. //=========================================================================== */

赞(0)
未经允许不得转载:TI中文支持网 » 关于F28377D FLASH问题
分享到: 更多 (0)