我使用的芯片是cy8c6247系列。
我这边想把ram_common改大点。默认的256字节不够用。
我在app0和app1中的4个.ld文件分别设置了如下位置:
ram_common (rwx) : ORIGIN = 0x08000000, LENGTH = 0x0400
ram_app0_core0 (rwx) : ORIGIN = 0x08000400, LENGTH = 0x1C00
ram_app0_core1 (rwx) : ORIGIN = 0x08002000, LENGTH = 0x45800
ram_app1_core0 (rwx) : ORIGIN = 0x08000400, LENGTH = 0x23C00
ram_app1_core1 (rwx) : ORIGIN = 0x08024000, LENGTH = 0x23800
图片是默认的配置:
我现在发现我如果增加ram_common,我的app0就无法正常跳转到app1了。 就是我感觉__cy_app_id这个变量的赋值不正确了。
请问这个ram_common是否可以更改。 如果可以更改,那么更改以后是不是还有一些位置需要重新配置。 希望能帮忙指导一下。 非常非常感谢!
已解决! 转到解答。
我在CE216767基础上修改了ram_common的长度,并没有发现跳转app1有问题。ram的分配如下 -
ram_common (rwx) : ORIGIN = 0x08000000, LENGTH = 0x0400
/* note: all the ram_appX_core0 regions has to be 0x100 aligned */
/* and the ram_appX_core1 regions has to be 0x400 aligned */
/* as they contain Interrupt Vector Table Remapped at the start */
ram_app0_core0 (rwx) : ORIGIN = 0x08000400, LENGTH = 0x7C00
ram_app0_core1 (rwx) : ORIGIN = 0x08008000, LENGTH = 0x8000
ram_app1_core0 (rwx) : ORIGIN = 0x08000400, LENGTH = 0x7C00
ram_app1_core1 (rwx) : ORIGIN = 0x08008000, LENGTH = 0x8000
你可以先尽量保持原来的ram分配不变,看只更改ram_common有什么影响。
我在CE216767基础上修改了ram_common的长度,并没有发现跳转app1有问题。ram的分配如下 -
ram_common (rwx) : ORIGIN = 0x08000000, LENGTH = 0x0400
/* note: all the ram_appX_core0 regions has to be 0x100 aligned */
/* and the ram_appX_core1 regions has to be 0x400 aligned */
/* as they contain Interrupt Vector Table Remapped at the start */
ram_app0_core0 (rwx) : ORIGIN = 0x08000400, LENGTH = 0x7C00
ram_app0_core1 (rwx) : ORIGIN = 0x08008000, LENGTH = 0x8000
ram_app1_core0 (rwx) : ORIGIN = 0x08000400, LENGTH = 0x7C00
ram_app1_core1 (rwx) : ORIGIN = 0x08008000, LENGTH = 0x8000
你可以先尽量保持原来的ram分配不变,看只更改ram_common有什么影响。
能否掉点后在试一次。 或者在app1里面发送Cy_Bootload_ExecuteApp(0); 跳转到app0命令。 看看能否跳转到app0.
我测试的时候用仿真器烧录进去是可以进入app1的。 但是我发送Cy_Bootload_ExecuteApp(0);命令后就无法跳转到app0. 但是app1一直可以跑。 然后我掉电以后。 重新上电, 我的app0就无法进入app1了。
非常感谢。 是我配置文件的时候需要rebuild。 没有clear and build导致的。 我重新编译一下可以了。 多谢多谢。