用过vxWorks的朋友来看下.

femalelover 2008-05-31 09:40:11
在vxWorks下用tornado编程, 问两个最初级的问题:
1, 默认情况下, tornado能编译C++代码, 但是在vim中装载.O文件时, 会失败, 怎么搞定?
2, 在windows下, tornado编出.O之后, 上载到到单板中, 单板运行vxWorks, 报错说 fit 24 bits ...., 怎么搞定?

THANK YOU!
...全文
150 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
femalelover 2008-06-01
  • 打赏
  • 举报
回复
maplewasp, 我的tornado是2.2, CPU是PPC.

顺便问你一下, 你上贴的帮助文档是哪里来的? 多谢.
chlaws 2008-06-01
  • 打赏
  • 举报
回复
UP
独孤过儿 2008-06-01
  • 打赏
  • 举报
回复
只听过,没用过的人飘过~~~
maplewasp 2008-06-01
  • 打赏
  • 举报
回复
先把你的Tornado 的版本和什么bsp说一下,要不然很难猜的。
对于问题
1: 可能你的vim中缺少C++的组建,加上相应的C++组建,然后重新编译一个vim并启动它(不用默认的vim),然后再下载你的.o
或者新建一个vim, 加上相应的C++组建的同时把你应用程序加到这个vim project中,如果能编译过去就OK啦!
2:

Dynamic loading of modules fails with 24-bit relocation error.

--------------------------------------------------------------------------------

SPR: N/A
Patch: N/A

--------------------------------------------------------------------------------

Host: N/A
Architecture: PowerPC
BSP: All
Product: VxWorks Version: N/A

--------------------------------------------------------------------------------

Problem Description
Dynamic loading of object modules fails with the following error:

Relocation value does not fit in 24 bits

--------------------------------------------------------------------------------

Problem Solution
PowerPC Embedded Application Binary Interface, Version 1.0 System V Application Binary Interface, PowerPC Processor Supplement (Sept. 1995)

Reproduced failure on mv1604 board 64MB of RAM while loading an object module with external function references.


The error message above is known to appear while loading modules with external function references on PowerPC targets having more than 32MB of RAM.

The limitation is due to how direct function calls are implemented for the EABI (Embedded Application Binary Interface). The EABI is a standard we follow for the PowerPC architecture and it may be downloaded from the IBM web page. The EABI is based upon the SVR4 ABI, which suggests that all direct function calls be made with the 'bl' instruction. Because the addressing range of the 'bl' instruction is /- 32MB, all direct function calls referencing functions defined more than 32MB away will fail with the above relocation error.

Calling functions indirectly (i.e. through a function pointer) removes the 32MB limitation as 32-bit absolute addressing is used in place of 26-bit PC relative addressing, thus giving you access to all routines in the 4GB address space. Asking people to rewrite their code to make all external function calls through pointers is not very practical and may not be necessary in all cases.


The following can be used to work around this problem.
1) Use the -mlongcall flag when compiling your code or use the "#pragma longcall" directive to suggest certain function calls be made through a function pointer.

If using versions of Tornado 1.0.x there is a patch to use this workaround. The patch is SPR 22767. Later versions of Tornado do not require any patch.

"#pragma longcall" gives a suggestion to the compiler to call a set of functions through a function pointer (using 32-bit absolute addresses). This should be used primarily for external functions, as local functions are less likely to reside far from your module.

2) If your code does not require constant loading and unloading of object modules at runtime, you can also set LOCAL_MEM_SIZE to 32MB and set aside the rest of memory as USER_RESERVED_MEM (i.e. user reserved memory) and use memAddToPool to add the rest after your object modules have been loaded. No further object modules should be loaded after the memAddToPool has been performed.

Note: Setting aside user reserved memory is outlined in detail in Wind Tech Note 41 (WTN41).


maplewasp 2008-06-01
  • 打赏
  • 举报
回复
http://www.windriver.com/support/resources/tornado22_bulletin.html
maplewasp 2008-06-01
  • 打赏
  • 举报
回复
我也是从网上找的,你这个问题以前看到过。不过我用的是for x86的,对ppc的不熟悉呀。
VxWorks 有一个SPR List,也就是官方出的关于Bugs和对应的解决方案(当然有的也可能是还没有解决的Bug)。
WindRiver主页上有得下!
Erorr 2008-05-31
  • 打赏
  • 举报
回复
下载前有没有选定目标服务器?
随着元宇宙概念兴起与虚拟数字人技术快速发展,虚拟主播、在线教育虚拟助教、元宇宙社交等应用场景对实时动作表情驱动系统提出更高需求。当前主流动作捕捉方案多依赖专业光学动捕设备或深度相机,设备成本高昂、部署复杂,难以在普通用户场景普及。本研究设计并实现一套基于普通单目摄像头的虚拟数字人实时动作表情驱动系统,旨在降低数字人内容生产门槛。系统采用Unity作为主开发引擎,结合Blender进行数字人模型构建与BlendShape表情系统制作,使用MediaPipe框架实现人脸关键点检测与人体姿态估计,通过C#脚本完成实时数据处理与渲染控制。系统包含五个关键模块:人脸关键点检测(MediaPipe Face Mesh提取468个关键点)、人体姿态估计(MediaPipe Pose识别33个骨骼关键点)、表情迁移映射、动作平滑优化(卡尔曼滤波与贝塞尔曲线插值消除抖动)、实时渲染(60fps流畅渲染,支持直播推流与视频录制)。实验结果表明,系统在普通笔记本上可实现60fps实时驱动,人脸关键点检测准确率达98.7%,人体姿态估计平均误差小于5像素,表情迁移相似度达92.3%。 【课程报告内容】 摘要 第1章 绪论 第2章 相关技术与理论基础 第3章 系统架构设计 第4章 关键模块设计与实现 第5章 实验与结果分析 第6章 总结与展望 参考文献
内容概要:本文提出了一种基于蒙特卡洛模拟与拉格朗日松弛法的分散式优化策略,用于解决电动汽车充电站在分时电价机制下的有序充电调度问题。通过蒙特卡洛方法模拟电动汽车充电行为的随机性,生成多样化负荷场景,构建以降低电网负荷波动和用户充电成本为目标的优化模型;采用拉格朗日松弛法对耦合约束进行解耦,实现分布式求解,在保障用户隐私的同时提升计算效率。文中设计了详细的仿真场景,系统分析了该调度策略对电网负荷特性和用户经济性的影响,验证了所提方法在实际应用中的有效性与可行性。; 适合人群:具备电力系统运行、优化算法理论及Matlab编程能力的研究生、科研人员以及从事智能电网与电动汽车相关领域的工程技术人员。; 使用场景及目标:①应用于城市规模化充电站集群的有序充电管理,实现电网“削峰填谷”;②为电力公司制定科学合理的分时电价政策提供量化分析工具;③支撑智能电网中需求侧资源的分布式协同优化调度研究与系统设计。; 阅读建议:建议结合提供的Matlab代码深入理解算法实现流程,重点掌握蒙特卡洛场景生成机制与拉格朗日松弛迭代求解过程,可通过调整参数设置复现不同工况下的仿真结果,以深化对分散式优化机制与调度效果之间关系的理解。
内容概要:本文研究了基于阶跃响应的V-Tiger自动增益调整PID控制器优化方法,并提供了完整的Matlab代码实现。通过深入分析PID控制的核心性能指标与V-Tiger控制器的动态特性,提出了一种融合阶跃响应特征提取与多目标协同优化的自动整定方案,设计了具备自适应迭代校正能力的优化机制,有效提升了控制系统的响应速度、稳定性和抗干扰能力。文中系统阐述了整定原理、算法架构设计及性能验证流程,通过仿真实验充分验证了该方法在复杂工业控制场景下实现高精度参数自整定的可行性与优越性,为智能PID控制提供了可复现、可拓展的技术路径。; 适合人群:具备自动控制理论基础和Matlab编程能力,从事控制工程、自动化、电气工程等领域研究的研发人员及高校研究生。; 使用场景及目标:①应用于需要高精度PID参数整定的工业控制系统中,如电机驱动、温度控制、电力电子变换器等;②为科研人员提供一种可复现、可扩展的智能PID整定方法,用于提升系统动态性能与鲁棒性;③作为教学案例帮助学生理解PID整定原理与现代优化算法的融合应用。; 阅读建议:建议读者结合文中的Matlab代码逐模块运行与调试,重点关注阶跃响应特征提取与增益优化策略的实现逻辑,同时可尝试将其应用于实际控制系统中进行对比验证,以深化对自动整定机制的理解。

65,212

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧