Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
FinSH
Nios-II软核
NIOS II FINSH 开启后报错
发布于 2023-07-31 22:01:14 浏览:424
订阅该版
按照网上教程一步一步进行RT thread 移植到NIOS II上,当增加FinSH组件后编译无法通过, 报错: ``` Unable to reach (null) (at 0x0200041c) from the global pointer (at 0x020205b4) because the offset (-131480) is out of the allowed range, -32678 to 32767. ``` 软件错误定位: ```c #ifdef FINSH_USING_SYMTAB #ifdef __ARMCC_VERSION /* ARM C Compiler */ extern const int FSymTab$$Base; extern const int FSymTab$$Limit; finsh_system_function_init(&FSymTab$$Base, &FSymTab$$Limit); #elif defined (__ICCARM__) || defined(__ICCRX__) /* for IAR Compiler */ finsh_system_function_init(__section_begin("FSymTab"), __section_end("FSymTab")); #elif defined (__GNUC__) || defined(__TI_COMPILER_VERSION__) || defined(__TASKING__) /* GNU GCC Compiler and TI CCS */ extern const int __fsymtab_start; extern const int __fsymtab_end; finsh_system_function_init(&__fsymtab_start, &__fsymtab_end); #elif defined(__ADSPBLACKFIN__) /* for VisualDSP++ Compiler */ finsh_system_function_init(&__fsymtab_start, &__fsymtab_end);//错误位置 #elif defined(_MSC_VER) unsigned int *ptr_begin, *ptr_end; if (shell) { rt_kprintf("finsh shell already init.\n"); return RT_EOK; } ptr_begin = (unsigned int *)&__fsym_begin; ptr_begin += (sizeof(struct finsh_syscall) / sizeof(unsigned int)); while (*ptr_begin == 0) ptr_begin ++; ptr_end = (unsigned int *) &__fsym_end; ptr_end --; while (*ptr_end == 0) ptr_end --; finsh_system_function_init(ptr_begin, ptr_end); #endif #endif ``` 不知道错在哪里,查了很多资料也没有搞定,请高人指点!
查看更多
1
个回答
默认排序
按发布时间排序
Cherry58
2023-08-17
这家伙很懒,什么也没写!
BSP Builder 生成的linker.x文件中把FSymTab看做普通用户自定义区,而 FSymTab在RT Thread 中对应为heap(堆),因此BSP Builder直接生成的文件中有专门地方放heap段。如下 .bss : ``` { __bss_start = ABSOLUTE(.); PROVIDE (__sbss_start = ABSOLUTE(.)); PROVIDE (___sbss_start = ABSOLUTE(.)); *(.dynsbss) *(.sbss .sbss.* .gnu.linkonce.sb.*) *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) *(.scommon) PROVIDE (__sbss_end = ABSOLUTE(.)); PROVIDE (___sbss_end = ABSOLUTE(.)); *(.dynbss) *(.bss .bss.* .gnu.linkonce.b.*) *(COMMON) . = ALIGN(4); __bss_end = ABSOLUTE(.); } > sdram /* * * One output section mapped to the associated memory device for each of * the available memory devices. These are not used by default, but can * be used by user applications by using the .section directive. * * **The output section used for the heap is treated in a special way,** * i.e. the symbols "end" and "_end" are added to point to the heap start. * * Because alt_load() is enabled, these sections have * their LMA set to be loaded into the .text memory region. * However, the alt_load() code will NOT automatically copy * these sections into their mapped memory region. * */ //将生成的FSymTab 段 拷贝在这里 FSymTab : { PROVIDE (_alt_partition_FSymTab_start = ABSOLUTE(.)); *(FSymTab FSymTab.*) . = ALIGN(4); PROVIDE (_alt_partition_FSymTab_end = ABSOLUTE(.)); } > sdram VSymTab : { PROVIDE (_alt_partition_VSymTab_start = ABSOLUTE(.)); *(VSymTab VSymTab.*) . = ALIGN(4); PROVIDE (_alt_partition_VSymTab_end = ABSOLUTE(.)); } > sdram /* * * This section's LMA is set to the .text region. * crt0 will copy to this section's specified mapped region virtual memory address (VMA) * */ .epcs_flash : AT ( LOADADDR (.bss) + SIZEOF (.bss) ) { PROVIDE (_alt_partition_epcs_flash_start = ABSOLUTE(.)); *(.epcs_flash .epcs_flash. epcs_flash.*) . = ALIGN(4); PROVIDE (_alt_partition_epcs_flash_end = ABSOLUTE(.)); } > epcs_flash ```
撰写答案
登录
注册新账号
关注者
0
被浏览
424
关于作者
Cherry58
这家伙很懒,什么也没写!
提问
2
回答
1
被采纳
0
关注TA
发私信
相关问题
1
RT-THREAD shell无反应呢?
2
RT-thread2.0beta下用类似linux风格MSH,参数如何输入和导出
3
rt-thread finsh windows下的那个终端软件叫什么来着
4
板子上只有485接口,能把FINSH改造成485的么?
5
finsh最大字符问题
6
finsh命令个数是不是有限制啊
7
finsh支持转义字符吗
8
不用finsh如何知道堆栈使用量
9
强烈建议 RT-Thread下finsh原理深入分析
10
finsh输入命令全部返回null node
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
RTT 源码分析笔记——互斥量篇
2
[E/app.filesystem] SD card mount to '/sdcard' failed!
3
单片机也能聊天?RT-Thread上跑通大语言模型
4
【RT-Thread】【ci】【scons】将ci.attachconfig.yml和scons结合使用
5
Rt-thread中OTA下载后,bootloader不搬程序
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
DMA
USB
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
I2C_IIC
ESP8266
UART
WIZnet_W5500
ota在线升级
cubemx
PWM
flash
freemodbus
BSP
packages_软件包
潘多拉开发板_Pandora
定时器
ADC
flashDB
GD32
socket
编译报错
中断
Debug
rt_mq_消息队列_msg_queue
SFUD
msh
keil_MDK
ulog
C++_cpp
MicroPython
本月问答贡献
出出啊
1518
个答案
343
次被采纳
小小李sunny
1444
个答案
290
次被采纳
张世争
813
个答案
177
次被采纳
crystal266
549
个答案
161
次被采纳
whj467467222
1222
个答案
149
次被采纳
本月文章贡献
出出啊
1
篇文章
3
次点赞
小小李sunny
1
篇文章
1
次点赞
张世争
1
篇文章
3
次点赞
crystal266
2
篇文章
2
次点赞
whj467467222
2
篇文章
2
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部