8
25
49
初级会员
使用道具 举报
1万
7万
11万
管理员
eric2013 发表于 2023-8-18 16:54 字符串数组? 加前缀const就行。
219
1109
1776
至尊会员
More we do, more we can do.
__attribute__((used))
85
798
1053
rog 发表于 2023-8-19 20:18 呃,神马意思呢,没理解
庄永 发表于 2023-8-20 12:38 加const修饰的变量,编译的时候会将数据存放在Flash
24
365
437
高级会员
tovinz 发表于 2023-8-21 16:46 const app_info_t APP_INFO __attribute__((section(".ARM.__at_0x08040400"))) = { .... };
rog 发表于 2023-8-21 22:59 有完整的示例吗?ld文件是怎们处理的,我是gcc编译stm32的环境
tovinz 发表于 2023-8-22 09:05 抱歉,忘了标题是gcc了。 有大佬已经给出了解决方式 https://forum.anfulai.cn/forum.php?mod=viewthread& ...
本版积分规则 发表回复 回帖后跳转到最后一页
|小黑屋|Archiver|手机版|硬汉嵌入式论坛
GMT+8, 2025-8-12 13:01 , Processed in 0.042378 second(s), 24 queries .
Powered by Discuz! X3.4 Licensed
Copyright © 2001-2023, Tencent Cloud.