完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
如何在闪存中而不是在RAM中存储大型常量数组
以上来自于谷歌翻译 以下为原文 How to store large constant arrays in flash not in RAM |
|
相关推荐
6个回答
|
|
对于Cosmic,只需声明一个对象''const'',它将存储在flash中。
以上来自于谷歌翻译 以下为原文 for Cosmic, just declare an object ''const'' and it will be stored in flash. |
|
|
|
感谢您的快速回复!
你知道它是否适用于Raisonance(我已经在家中安装了这个工具链)。在stm8s.h(来自标准Periph库)中有定义,它们将const重新定义为CONST以用于不同的编译器。这是一样的吗? 另一个问题 - 如何检查数据是否闪存而不是RAM - 检查.lst文件? 以上来自于谷歌翻译 以下为原文 Thanks for the quick reply! Do you know will it work for Raisonance (I've already this toolchain installed at home). There are defines in stm8s.h (from Standard Periph Library) where they redefine const to CONST for different compilers. Is this the same? Another question -- how to check that data goes to flash and not in RAM -- check .lst file? |
|
|
|
好像我弄清楚了:
对于Raisonance: 。 可以使用特定于RCSTM8的关键字(如位,代码,数据,page0,eeprom,fcode和fdata)为每个变量指定特定的内存空间。可以通过更具体的关键字访问硬件寄存器,例如hbit,hreg和hreg16。 以上来自于谷歌翻译 以下为原文 It seems I figured it out: for Raisonance: . A specific memory space can be specified for each variable using RCSTM8-specific keywords such as bit, code, data, page0, eeprom, fcode, and fdata. Hardware Registers can be accessed through more specific keywords such as hbit, hreg and hreg16. |
|
|
|
在Raisonance上,添加''code''内存空间限定符将执行此操作:
code char BigBuf [1024] =''这是一个存储在Flash中的非常大的缓冲区''; 您可以从Raisonance的应用笔记AN55中获得更多详细信息 http://forum.raisonance.com/viewtopic.php?pid=9418#p9418 。 以上来自于谷歌翻译 以下为原文 On Raisonance, adding the ''code'' memory space qualifier will do it: code char BigBuf[1024] = ''This is a very large buffer stored in Flash''; You can have further detail in the application note AN55 from Raisonance from http://forum.raisonance.com/viewtopic.php?pid=9418#p9418 . |
|
|
|
你好
1 /要检查变量或函数的位置,需要读取链接器生成的.map文件。 2 /对于带有Raisonance编译器的FLASH中的位置,您需要使用“代码”一词。事实上,对于Raisonance编译器,关键字“const”用于数据的写保护,而不是特定区域的放置。 3 /最好的方法是使用定义单词''__CONST'',在这种情况下,您使用没有构建器依赖项的正确单词。 最好的祝福 菲尔 以上来自于谷歌翻译 以下为原文 Hi 1/ For check the placement for variables or functions you need to read the .map file generated by linker. 2/ For a placement in FLASH with Raisonance compiler you need to use the word ''code''. In fact with Raisonance compiler the keyword ''const'' is for a write protection for datas but not the placement in specific area. 3/ The best way is to use the define word ''__CONST'', in this case you use the correct words without builder dependency. Best regards Phil |
|
|
|
谢谢大家的快速准确回复!它对我有用!
以上来自于谷歌翻译 以下为原文 Thank you all for the quick and accurate responses! It work for me! |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2882 浏览 1 评论
3282 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1861 浏览 1 评论
3711 浏览 6 评论
6125 浏览 21 评论
对H747I-DISCO写程序时将CN2的st-link复用为usart1,再次烧录时无法检测到stlink怎么解决?
411浏览 2评论
STM32G474RE芯片只是串口发个数据就发烫严重是怎么回事?
510浏览 2评论
STM32处理增量式编码器Z信号如何判断中断是正转的还是反向转的?
334浏览 2评论
使用STM32F407VET6的USB2.0功能,发现ctl后芯片无数据返回,是什么原因可能导致的呢?
246浏览 2评论
用STM32G431开发工程,1.50版本的Package包文件无法输出项目工程
354浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-2-25 09:49 , Processed in 1.964813 second(s), Total 85, Slave 69 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191