Other Parts Discussed in Thread:SYSBIOS, SFRA
CMD文件如下:
MEMORY
{
BEGIN : origin = 0x00080000, length = 0x00000002
BOOT_RSVD : origin = 0x00000002, length = 0x00000126
BOOT_RSVD_SYSBIOS: origin = 0x00000128, length = 0x00000080
RESET : origin = 0x003FFFC0, length = 0x00000002
/* RAM blocks */
/* Dedicated RAM (CPU only) */
RAMM0 : origin = 0x00000200, length = 0x00000400 /* on-chip RAM block M0 */
RAMM1 : origin = 0x00000600, length = 0x00000400 /* on-chip RAM block M1 */
/* Local shared RAM (CPU, HIC, BGCRC) */
RAMLS4 : origin = 0x0000A000, length = 0x00001300 /* on-chip RAM block LS4 */
// RAMLS5 : origin = 0x0000AE00, length = 0x00000010 /* on-chip RAM block LS5 */
RAMLS6_7 : origin = 0x0000B300, length = 0x00001300 /* on-chip RAM block LS6 */
// RAMLS7 : origin = 0x0000B800, length = 0x00000800 /* on-chip RAM block LS7 */
/* Global shared RAM (CPU, HIC, DMA) */
RAMGS0 : origin = 0x0000C600, length = 0x00000200 /* on-chip RAM block GS0 */
/* Flash sectors */
/* BANK 0 */
FLASH_BANK0_SEC0 : origin = 0x080002, length = 0x000FFE /* on-chip Flash */
FLASH_BANK0_SEC1 : origin = 0x081000, length = 0x005A00 /* on-chip Flash */
FLASH_BANK0_SEC2 : origin = 0x086A00, length = 0x000100 /* on-chip Flash */
FLASH_BANK0_SEC3 : origin = 0x086B00, length = 0x000100 /* on-chip Flash */
FLASH_BANK0_SEC4 : origin = 0x086C00, length = 0x000100 /* on-chip Flash */
FLASH_BANK0_SEC5 : origin = 0x086D00, length = 0x000100 /* on-chip Flash */
FLASH_BANK0_SEC6 : origin = 0x086E00, length = 0x000100 /* on-chip Flash */
// FLASH_BANK0_SEC7 : origin = 0x087000, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC8 : origin = 0x087000, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC9 : origin = 0x088000, length = 0x005100 /* on-chip Flash */
FLASH_BANK0_SEC10 : origin = 0x08D100, length = 0x000100 /* on-chip Flash */
FLASH_BANK0_SEC11 : origin = 0x08D200, length = 0x000100 /* on-chip Flash */
FLASH_BANK0_SEC12 : origin = 0x08D300, length = 0x000100 /* on-chip Flash */
FLASH_BANK0_SEC13 : origin = 0x08D400, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC14 : origin = 0x08E400, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC15 : origin = 0x08F400, length = 0x000B00 /* on-chip Flash */
BOOTROM : origin = 0x003F0000, length = 0x00008000
BOOTROM_EXT : origin = 0x003F8000, length = 0x00007FC0
}
SECTIONS
{
GROUP
{
.TI.ramfunc
ramfuncs
}
LOAD = FLASH_BANK0_SEC1,
RUN = RAMLS4,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(4)
codestart : > BEGIN
.text : > FLASH_BANK0_SEC1, ALIGN(4)
.cinit : > FLASH_BANK0_SEC1, ALIGN(4)
.init_array : > FLASH_BANK0_SEC1, ALIGN(4)
.switch : > FLASH_BANK0_SEC1, ALIGN(4)
.const : > FLASH_BANK0_SEC1, ALIGN(4)
.reset : > RESET TYPE = DSECT
.data : > RAMM0
.stack : > RAMM1
.bss : > RAMLS6_7
.sysmem : > RAMM0
.const : > FLASH_BANK0_SEC1
ramgs0 : > RAMGS0
SFRA_F32_Data : > RAMLS6_7, ALIGN = 64
FPUmathTables : > FLASH_BANK0_SEC1
.scratchpad : > RAMLS6_7
controlVariables : > RAMLS6_7
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
Susan Yang:
请问您使用的是哪款芯片?若是可以的话,请私信一下整个工程,谢谢
,
DSP应用:
280025,工程加密发不出去,一般是什么原因不会装载到指定的 内存,编译器自动分配
,
Susan Yang:
请您参考一下例程中使用的cmd文件。警告表示链接器正在使用某种默认算法在内存中创建和分配“ ramfuncs”输出节,因为链接器命令文件中未明确分配它们。最好通过将节添加到链接器命令文件中的SECTIONS指令中,将节显式分配给适当的内存区域,如下所示
MEMORY {BEGIN: origin = 0x080000, length = 0x000002BOOT_RSVD: origin = 0x00000002, length = 0x00000126RAMM0: origin = 0x00000128, length = 0x000002D8RAMM1: origin = 0x00000400, length = 0x000003F8/* on-chip RAM block M1 */ // RAMM1_RSVD: origin = 0x000007F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" *//* RAMLS4: origin = 0x0000A000, length = 0x00000800RAMLS5: origin = 0x0000A800, length = 0x00000800RAMLS6: origin = 0x0000B000, length = 0x00000800RAMLS7: origin = 0x0000B800, length = 0x00000800*//* Combining all the LS RAMs */RAMLS4567: origin = 0x0000A000, length = 0x00002000RAMGS0: origin = 0x0000C000, length = 0x000007F8 // RAMGS0_RSVD: origin = 0x0000C7F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" *///FLASHBANK1: origin = 0x00080000, length = 0x0000FFF0 //FLASH_BANK1_RSVD : origin = 0x0008FFF0, length = 0x00000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */BOOTROM: origin = 0x003F0000, length = 0x00008000BOOTROM_EXT: origin = 0x003F8000, length = 0x00007FC0RESET: origin = 0x003FFFC0, length = 0x00000002/* Flash sectors *//* BANK 0 */FLASH_BANK0_SEC0: origin = 0x080002, length = 0x000FFE /* on-chip Flash */FLASH_BANK0_SEC1: origin = 0x081000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC2: origin = 0x082000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC3: origin = 0x083000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC4: origin = 0x084000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC5: origin = 0x085000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC6: origin = 0x086000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC7: origin = 0x087000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC8: origin = 0x088000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC9: origin = 0x089000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC10 : origin = 0x08A000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC11 : origin = 0x08B000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC12 : origin = 0x08C000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC13 : origin = 0x08D000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC14 : origin = 0x08E000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC15 : origin = 0x08F000, length = 0x000FF0 /* on-chip Flash */ // FLASH_BANK0_SEC15_RSVD: origin = 0x08FFF0, length = 0x000010/* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */}SECTIONS {codestart: > BEGIN, ALIGN(8).text: >> FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC4,ALIGN(8).cinit: > FLASH_BANK0_SEC1,ALIGN(8).switch: > FLASH_BANK0_SEC1,ALIGN(8).reset: > RESET,TYPE = DSECT /* not used, */.stack: > RAMM1.init_array: > FLASH_BANK0_SEC1,ALIGN(8).bss: > RAMLS4567.bss:output: > RAMLS4567.bss:cio: > RAMGS0.const: > FLASH_BANK0_SEC1,ALIGN(8).data: > RAMLS4567.sysmem: > RAMLS4567ramgs0 : > RAMGS0/*Allocate IQ math areas: */IQmath: > RAMLS4567IQmathTables: > RAMLS4567.TI.ramfunc: LOAD = FLASH_BANK0_SEC1,RUN = RAMGS0,LOAD_START(RamfuncsLoadStart),LOAD_SIZE(RamfuncsLoadSize),LOAD_END(RamfuncsLoadEnd),RUN_START(RamfuncsRunStart),RUN_SIZE(RamfuncsRunSize),RUN_END(RamfuncsRunEnd),ALIGN(8)} /* //=========================================================================== // End of file. //=========================================================================== */
,
DSP应用:
这样写入不会报警
#ifdef __cplusplus
#pragma CODE_SECTION(".TI.ramfunc");
#else
#pragma CODE_SECTION(CopyData, ".TI.ramfunc");
#endif
,
Susan Yang:
如我之前所说“最好通过将节添加到链接器命令文件中的SECTIONS指令中,将节显式分配给适当的内存区域”
目前您测试是什么情况?