共2条
1/1 1 跳转至页
Keil,uCOS,arm Keil+uCOS下,关于周工的高效版arm移植代码

问
我用keil+ULINK+uCOS+2214
当用周立功标准版ARM移植代码是没问题
用高效版时出现下面警告,是什么原因?如何解决?
在内部RAM调试,程序运行正常

双击该警告,进入mem_b.scf
我的mem_b.scf如下
ROM_LOAD 0x80000000
{
ROM_EXEC 0x80000000
{
Startup.o (vectors, +First)
* (+RO)
}
IRAM 0x40000000
{
Startup.o (+RW,+ZI)
os_cpu_a.o (+RW,+ZI) // <-------指向这句
}
STACKS 0x40004000 UNINIT
{
stack.o (+ZI)
}
ERAM 0x80040000
{
* (+RW,+ZI)
}
HEAP +0 UNINIT
{
heap.o (+ZI)
}
}
谢谢! 答 1: 有人知道么? 答 2: 我没用任何操作系统,但也出现这类警告,期待着回答 答 3: os_cpu_a.c 文件中不存在 ZI 段,可以不忽略此警告,或删了ZI 答 4: 谢谢ZI段是干什么的?
为什么用原来的低效版没这个警告? 答 5: RealView 的连接程序的指南里的一个范例只读 (RO)、读写 (RW) 或零初始化 (ZI)
// file adder.c
int x1 = 5; // in .data
int y1[100]; // in .bss
int const z1[3] = {1,2,3}; // in .constdata
int sub1(int x) {return x-1;} // in .text
#pragma ARM section rwdata = "foo", code ="foo"
int x2 = 5; // in foo (data part of region)
char *s3 = "abc"; // s3 in foo, "abc" in .constdata
int add1(int x) {return x+1;} // in foo (.text part of region)
#pragma ARM section code, rwdata // return to default placement
FLASH 0x24000000 0x4000000
{
FLASH 0x24000000 0x4000000
{
init.o (Init, +First) ; place area Init from init.o first
* (+RO) ; sub1(), z1[]
}
32bitRAM 0x0000
{
vectors.o (Vect, +First)
* (+RW,+ZI) ; x1, y1
}
ADDER 0x08000000
{
adder.o (foo) ; x2, string s3, and add1()
}
}
看看RealView™ Compilation Tools Version 2.0 Linker and Utilities Guide的第五章Using Scatter-loading description files(ARM DUI 0206C)吧
当用周立功标准版ARM移植代码是没问题
用高效版时出现下面警告,是什么原因?如何解决?
在内部RAM调试,程序运行正常

双击该警告,进入mem_b.scf
我的mem_b.scf如下
ROM_LOAD 0x80000000
{
ROM_EXEC 0x80000000
{
Startup.o (vectors, +First)
* (+RO)
}
IRAM 0x40000000
{
Startup.o (+RW,+ZI)
os_cpu_a.o (+RW,+ZI) // <-------指向这句
}
STACKS 0x40004000 UNINIT
{
stack.o (+ZI)
}
ERAM 0x80040000
{
* (+RW,+ZI)
}
HEAP +0 UNINIT
{
heap.o (+ZI)
}
}
谢谢! 答 1: 有人知道么? 答 2: 我没用任何操作系统,但也出现这类警告,期待着回答 答 3: os_cpu_a.c 文件中不存在 ZI 段,可以不忽略此警告,或删了ZI 答 4: 谢谢ZI段是干什么的?
为什么用原来的低效版没这个警告? 答 5: RealView 的连接程序的指南里的一个范例只读 (RO)、读写 (RW) 或零初始化 (ZI)
// file adder.c
int x1 = 5; // in .data
int y1[100]; // in .bss
int const z1[3] = {1,2,3}; // in .constdata
int sub1(int x) {return x-1;} // in .text
#pragma ARM section rwdata = "foo", code ="foo"
int x2 = 5; // in foo (data part of region)
char *s3 = "abc"; // s3 in foo, "abc" in .constdata
int add1(int x) {return x+1;} // in foo (.text part of region)
#pragma ARM section code, rwdata // return to default placement
FLASH 0x24000000 0x4000000
{
FLASH 0x24000000 0x4000000
{
init.o (Init, +First) ; place area Init from init.o first
* (+RO) ; sub1(), z1[]
}
32bitRAM 0x0000
{
vectors.o (Vect, +First)
* (+RW,+ZI) ; x1, y1
}
ADDER 0x08000000
{
adder.o (foo) ; x2, string s3, and add1()
}
}
看看RealView™ Compilation Tools Version 2.0 Linker and Utilities Guide的第五章Using Scatter-loading description files(ARM DUI 0206C)吧
共2条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【EEPW电子工程师创研计划】技术变现通道已开启~ | |
发原创文章 【每月瓜分千元赏金 凭实力攒钱买好礼~】 | |
【EEPW在线】E起听工程师的声音! | |
“我踩过的那些坑”主题活动——第001期 | |
高校联络员开始招募啦!有惊喜!! | |
【工程师专属福利】每天30秒,积分轻松拿!EEPW宠粉打卡计划启动! | |
送您一块开发板,2025年“我要开发板活动”又开始了! | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
【我踩过的那些坑】结构堵孔导致的喇叭无声问题被打赏50分 | |
【我踩过的那些坑】分享一下调试一款AD芯片的遇到的“坑”被打赏50分 | |
电流检测模块MAX4080S被打赏10分 | |
【我踩过的那些坑】calloc和malloc错误使用导致跑飞问题排查被打赏50分 | |
多组DCTODC电源方案被打赏50分 | |
【我踩过的那些坑】STM32cubeMX软件的使用过程中的“坑”被打赏50分 | |
新手必看!C语言精华知识:表驱动法被打赏50分 | |
【我踩过的那些坑】杜绑线问题被打赏50分 | |
【我踩过的那些坑】STM32的硬件通讯调试过程的“坑”被打赏50分 | |
【我踩过的那些坑】晶振使用的问题被打赏100分 |