完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
|
嗨STM8大师,
关于STM8 RAM大小变化的一个快速问题 我检查了xxx.map文件并在堆栈上使用了86字节。 我确实通过项目设置 - >链接器 - >输入更改了RAM大小 但是lkf文件不会随着设置而改变,而不会显示.text大小溢出。 -------------- lkf文件---------------- #Segment Ram: + seg .data -b 0x100 -m 0x271 -n .data + seg .bss -a .data -n .bss + def __stack = 0x3ff -------------- lkf文件---------------- 为什么? 有没有文件谈到这个? 谢谢 大卫李 以上来自于谷歌翻译 以下为原文 Hi STM8 master, One quick question about the STM8 RAM size change I checked the xxx.map file and used 86 Byte on stack. I did change the RAM size through in Project settings->Linker->Input but lkf file does not change with setting than show .text size overflow . --------------lkf file---------------- # Segment Ram: +seg .data -b 0x100 -m 0x271 -n .data +seg .bss -a .data -n .bss +def __stack=0x3ff --------------lkf file---------------- why? Is any document talk about this? Thank you David Lee |
|
相关推荐
2个回答
|
|
|
你好,
我不确定你的问题是什么以及你实际想要实现什么,但是在你报告的链接器文件部分中,你告诉链接器你的变量将从0x100开始并且不必超过625字节(0x271) )。 根据这一点,只有当你的变量使用超过625个字节时才会报告错误(在第1页中,但此时不需要进入这些细节......),无论堆栈如何。 堆栈本身将从0x3FFF开始向后增长:如果它增长太多(注意编译器的堆栈大小预测非常准确,但是特殊情况可能是错误的,因此无法保证)它会覆盖一些全局变量,在运行时导致各种奇怪的行为(很可能是应用程序崩溃)(这不是你可以在编译/链接时检查的东西) 希望能帮助到你。 卢卡 以上来自于谷歌翻译 以下为原文 Hello, I'm not sure what your question is and what you are actually trying to achieve, but in the linker file part that you have reported you are telling the linker that your variables will start at 0x100 and will not have to exceed 625 bytes (0x271). According to this, the linker will report an error only if your variables use more than 625 bytes (in page1, but no need to go into these details at this point..), regardless of the stack. The stack itself will start at 0x3FFF and grow backward: if it grows too much (note that the stack size prediction by the compiler is pretty accurate, but can be wrong is special cases, and thus is not guaranteed) it will overwrite some global variables, resulting in all kinds of strange behaviours (most likely an application crash) at run time (that's not something that you can check at compile/link time) Hope it helps. Luca |
|
|
|
|
|
嗨卢卡,
我将RAM的结束值更改为0x300,但lkf文件始终显示0x271 你知道STM8如何将RAM扩展到0x300 非常感谢 大卫李 以上来自于谷歌翻译 以下为原文 Hi Luca, I changed end value of the RAM to 0x300 but the lkf file always show 0x271 Do you know how STM8 extend RAM to 0x300 Many Thanks David Lee |
|
|
|
|
只有小组成员才能发言,加入小组>>
stm32mp157的异核通信的rpmsg_sdb的m4固件和a7驱动该如何编写?
1465 浏览 0 评论
stm32f103用freertos对一个采样率为1kHz的传感器,进行采样,数据出差
1518 浏览 0 评论
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
3664 浏览 1 评论
3856 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
2475 浏览 1 评论
STM32H7打开DCache后,出现了串口接收信息为空的现象,是哪里出了问题?
745浏览 5评论
用NANO STM32F103RBT6的开发板烧录不了是哪里出了问题?
678浏览 5评论
723浏览 5评论
外部中断触发类型为双边沿触发,进入中断回调后有什么办法判断该边沿是上升沿还是下降沿?
962浏览 5评论
STM32L071CBT6低温环境下无法正常工作是什么原因引起的?
763浏览 5评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-9 10:06 , Processed in 0.924146 second(s), Total 44, Slave 37 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
933