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.

再使用库函数分配GSRAM下载程序时出现C28xx_CPU2: Error setting the GSxMSEL register for Flash operations

void main(void)

{
int16_t i;
float error;

Device_init(); // Initialize device clock and peripherals
MemCfg_setGSRAMMasterSel((MEMCFG_SECT_GS10),MEMCFG_GSRAMMASTER_CPU2);
//MemCfg_setGSRAMMasterSel((MEMCFG_SECT_GS12 |MEMCFG_SECT_GS13 | MEMCFG_SECT_GS14 | MEMCFG_SECT_GS15),MEMCFG_GSRAMMASTER_CPU2);

#ifdef _STANDALONE
#ifdef _FLASH
Device_bootCPU2(C1C2_BROM_BOOTMODE_BOOT_FROM_FLASH); // Send boot command to allow the CPU2 application to begin execution
#else
Device_bootCPU2(C1C2_BROM_BOOTMODE_BOOT_FROM_RAM); // Send boot command to allow the CPU2 application to begin execution
#endif
#endif

编译程序时没有异常但是下载程序时出现错误C28xx_CPU2: Error setting the GSxMSEL register for Flash operations

我分配GSRAM12,GSRAM13,GSRAM14,GSRAM15的时候没有出现这种报警,但是当我分配GSRAM9,GSRAM10,GSRAM11时会出现错误!

实在不明白这个时为什么?

 

  • #if defined(__TI_EABI__)
    .init_array : > FLASHB, PAGE = 0, ALIGN(8)
    .bss : > RAMGS2, PAGE = 1
    .bss:output : > RAMGS2, PAGE = 1
    .bss:cio : > RAMGS2, PAGE = 1
    .data : > RAMGS3, PAGE = 1
    .sysmem : > RAMGS4, PAGE = 1
    .const : > FLASHF, PAGE = 0, ALIGN(8)
    #else
    .pinit : > FLASHB, PAGE = 0, ALIGN(8)
    .ebss : >> RAMGS2, PAGE = 1
    .cio : > RAMGS2, PAGE = 1
    .esysmem : > RAMGS4, PAGE = 1
    .econst : >> FLASHF PAGE = 0, ALIGN(8)
    #endif

    另外我想问下,我能否将.bss、.data 放置到GSRAM中!
  • 您可以看一下

    相关链接

    另外您使用的是哪款芯片?若是可以的话,请您私信一下工程,谢谢

  • 你好,我用的是28379D,我没有工程师的私信,能否给下我工程师的私信!
  • 点击我的头像,到主页面,右上角点击 “连接”,发送私信,以附件形式添加工程就可以了
  • 我将工程文件以及问题描述都发送给你了!你接收下!
  • 已经收到了您的私信,请问您给出的工程是已经编译通过的吗?我这边编译的话,有很多错误

    另外需要注意

    1 当您尝试在CPU2上下载代码时,请确保CPU1已连接并暂停

    2 当需要在线调试CPU2时,请确保CPU1正在运行。

  • 另外关于调试,请参考之前用户的分享

    blog.csdn.net/.../84328254
  • 我是使用的是CCS10,编译完以后没有任何错误!,但当我用load按钮下载CPU1的程序时出现了C28xx_CPU2: Error setting the GSxMSEL register for Flash operations。
    上述问题是我再添加后边这条语句后出现的!MemCfg_setGSRAMMasterSel((MEMCFG_SECT_GS10),MEMCFG_GSRAMMASTER_CPU2);
  • 好的,我再去看一下为何会出现错误
  • 我发现在对CPU1工程debug时,先下载CPU1程序,然后执行CPU2的flash擦除操作时不会出现上述的错误提示。但是当我用“debug按钮”旁边的“下载按钮”下载程序CPU1时,先下载CPU1程序,然后执行CPU2的flash擦除操作时会出现上述提示的错误!会不会是CCS本身的BUG啊?
  • 有些不太明白您的描述。两者都是烧录到RAM?还是flash?
  • 我找到问题点了!

    CCS完成CPU1程序烧录以后会对CPU2擦除FLASH,另外会烧写一些配置!但是在对CPU2擦除的时候CPU1会复位执行程序!CPU1会操作GSxMSEL寄存器,但是这个寄存器在CPU2的FLASH操作的时候是不允许写的!所以会报错!

    在CPU1分配GSRAM之前进行延时操作,在下载CPU1程序并擦除CPU2的flash时报错消失了!同样的!debug的时候CCS下载CPU1程序的时候不管怎么样都不会出现这个报错!那是因为下载完CPU1程序的时候仿真器是连接CPU1的,CPU1此时不执行程序,所以这个应该是CCS10离线下载时本来就有的一个BUG。

  • 谢谢您的详细反馈!另外在E2E上也有相同的问题,您也可以参考一下

    e2e.ti.com/.../851914

    Make sure to check for CCS updates and install any updates that are available.

    Can you try the below steps? I want to make sure that CPU1 is not disconnected.

    1) Launch the target configuration from the Target configurations window (View -> Target Configurations -> Right click on the F28377D ccxml -> Launch selected configuration)

    2) Connect to CPU1 and then to CPU2 (In the debug window, select the C28xx_CPU1, right click -> Connect Target. Do the same thing for C28xx_CPU2).

    3) Reset CPU1 and then CPU2 (Select C28xx_CPU1, then in the debug window menu -> Run -> Reset -> CPU reset. Do this for C28xx_CPU2)

    4) Load the code in CPU2 (Select C28xx_CPU2 and then in the debug window menu click on "Run" -> Load -> Load program and choose the .out file that you want to load in to CPU2)