完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好论坛成员,
我正在尝试在RAM上实现一个功能但我没有在st Refrences上找到任何东西。 我在freescale中找到了这个例子,但是spcstudio无法编译代码。 __declspec(section''。text_in_ram'') static void EnterStandbyFromSRAM(void) { / *快速关闭IRC * / ME.STANDBY0.B.IRCON = 0; / *在DRUN中保持闪烁电源* / ME.DRUN.B.DFLAON = 0b01; ME.DRUN.B.CFLAON = 0b01; / *配置从备份SRAM快速唤醒* / RGM.STDBY.R = 0x0080; ME.MCTL.R = 0xD0005AF0; / *输入STANDBY0模式&关键* / ME.MCTL.R = 0xD000A50F; / *输入STANDBY0模式&倒钥匙* / / *建议在请求后调查S_MTRANS * / / * STOP,HALT或STANDBY模式* / 而(1 == ME.GS.B.S_MTRANS) { } } 谢谢 最好的祝福 Nazerian Vanima 以上来自于谷歌翻译 以下为原文 Hello Forum members, I am trying to implement a Function On RAM But i did not find any thing on st Refrences. I found this example in freescale but spcstudio can not compile the code . __declspec(section ''.text_in_ram'') static void EnterStandbyFromSRAM(void) { /* Switch off the IRC fast */ ME.STANDBY0.B.IRCON = 0; /* keep flashes power off in DRUN */ ME.DRUN.B.DFLAON = 0b01; ME.DRUN.B.CFLAON = 0b01; /* configure fast wakeup from backup SRAM */ RGM.STDBY.R = 0x0080; ME.MCTL.R = 0xD0005AF0; /* Enter STANDBY0 Mode & Key */ ME.MCTL.R = 0xD000A50F; /* Enter STANDBY0 Mode & Inverted Key */ /* it is recommended to poll S_MTRANS after requesting */ /* STOP, HALT or STANDBY modes */ while(1 == ME.GS.B.S_MTRANS) { } } Thanks Best Regards Nazerian Vanima |
|
相关推荐
7个回答
|
|
你好Vanima,
首先声明你的section属性: 更新你的application.ld: 就我而言,该功能在RAM中很好。 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Vanima , first declare your section attribute :
update your application.ld :
In my case , the function is well in RAM. Best regards Erwan |
|
|
|
嗨亲爱的二万
非常感谢解决这个问题。 我看到了application.ld并且对这个文件有什么了解吗? 喜欢这个文件是什么,以及如何编写我自己的application.ld。 最好的祝福 Nazerian Vanima 以上来自于谷歌翻译 以下为原文 Hi Dear Erwan Thanks So much For Solving about this issue . I saw application.ld and do know any refrence about this file ? Like what is this file and how can write my own application.ld . Best Regards Nazerian Vanima |
|
|
|
嗨二万
我编译代码,但我怎样才能正确找到代码? 最好的祝福 Nazerian Vanima 以上来自于谷歌翻译 以下为原文 Hi Erwan I compile the code but how can i find the code correctly is in ram ? Best Regards Nazerian Vanima |
|
|
|
嗨二万
我在使用代码时遇到一些问题: 1.编译代码非常慢,编译完成后,out.bin文件大小为1GB! 2.当程序想要在程序中运行函数break detect时。 我附上我的代码和appliction.ld,如果有任何问题请让我知道。 以上来自于谷歌翻译 以下为原文 Hi Erwan I have Some Problems with using the code : 1.Compiling the code is very slow and when the compile is finish the out.bin file size is 1GB !!! 2.when the program want to run the function break detect in program. I attach my code and appliction.ld for you , if there is any thing wrong Please let me know about this . |
|
|
|
你好Vanima,
我已经复制了你的问题 二进制文件是1GB 我在检查为什么? 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Vanima , I have reproduced your issue the binary file is 1GB i am checking why ? Best regards Erwan |
|
|
|
嗨二万
非常感谢我等待你的回答。 你能看到我的代码在我的RAM函数代码中有什么问题吗? 请让我知道待机模式我还不能解决这个问题。 最好的祝福 Nazerian Vanima 以上来自于谷歌翻译 以下为原文 Hi Erwan thanks so much i wait for your answer . could you see my code is there any thing wrong in my code for RAM function ? Please let me know about the standby mode i can not solve this issue yet . Best Regards Nazerian Vanima |
|
|
|
你好Vanima,
好的,我已经理解了这个问题 因为objcopy会在小地址和0x40XXXXXX之间创建一些存根,所以图像文件是1GB。 这是调试工作。 你应该在application.ld中重新定位你的代码,以防止巨大的二进制文件。 你能试试吗? 添加: 去掉 : 您的代码保持有效。 警告 , 生成代码后更新application.ld 做所有 编译hal.c 在./components/portable_spc5_hal_component/lib/include/hal.h:32:0中包含的文件中, 来自./components/portable_spc5_hal_component/lib/src/hal.c:25: ./components/spc560bcxx_hal_drivers_component/lib/include/hal_lld.h:704:2:错误:#error''SPC5_FMPLL0_CLK超出可接受范围(0 ... SPC5_FMPLL0_CLK_MAX)'' make:*** [build / obj / hal.o]错误1 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Vanima , Ok i have understood the issue the image file is 1GB because objcopy will create some stubs between small adresses and 0x40XXXXXX. it is the debugger work. you should relocate your code in flash in application.ld to prevent from huge binary files. Could you try this ? Add :
Remove :
your code stays valid. warning , Update application.ld after generation the code make all Compiling hal.c In file included from ./components/portable_spc5_hal_component/lib/include/hal.h:32:0, from ./components/portable_spc5_hal_component/lib/src/hal.c:25: ./components/spc560bcxx_hal_drivers_component/lib/include/hal_lld.h:704:2: error: #error ''SPC5_FMPLL0_CLK outside acceptable range (0...SPC5_FMPLL0_CLK_MAX)'' make: *** [build/obj/hal.o] Error 1 Best regards Erwan |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2399 浏览 1 评论
3122 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1688 浏览 1 评论
3506 浏览 6 评论
5861 浏览 21 评论
849浏览 4评论
1224浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
490浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1204浏览 3评论
1258浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-9-17 15:17 , Processed in 1.321905 second(s), Total 90, Slave 73 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号