关于更改ram_common的问题请教

公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JeHa_3912621
Level 3
Level 3
25 replies posted 10 replies posted 10 questions asked

我使用的芯片是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

图片是默认的配置:

pastedImage_0.png

我现在发现我如果增加ram_common,我的app0就无法正常跳转到app1了。  就是我感觉__cy_app_id这个变量的赋值不正确了。

请问这个ram_common是否可以更改。 如果可以更改,那么更改以后是不是还有一些位置需要重新配置。 希望能帮忙指导一下。 非常非常感谢!

0 点赞
1 解答
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

我在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有什么影响。

在原帖中查看解决方案

0 点赞
4 回复数
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

我在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有什么影响。

0 点赞

能否掉点后在试一次。 或者在app1里面发送Cy_Bootload_ExecuteApp(0);    跳转到app0命令。 看看能否跳转到app0.

我测试的时候用仿真器烧录进去是可以进入app1的。 但是我发送Cy_Bootload_ExecuteApp(0);命令后就无法跳转到app0. 但是app1一直可以跑。 然后我掉电以后。 重新上电, 我的app0就无法进入app1了。

0 点赞
lock attach
Attachments are accessible only for community members.
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

掉电没有发现问题,app1都可以正常启动,由app1回到app0也没有问题.

附件为测试工程.

0 点赞

非常感谢。 是我配置文件的时候需要rebuild。 没有clear and  build导致的。 我重新编译一下可以了。 多谢多谢。

0 点赞