该书将KEIL C51编译器附带的RTX51TNY实时操作系统应用中的问题以及解决方案汇集成册,并译成中文,英汉对照。小册子,48页。 内容精华,值得一看。摘抄一段:
RTX51 TINY: MULTIPLE PUBLIC DEFINITIONS RTX_RAMTOP (PART 2) 全局变量重复定义 --------------------------------------------------------------------------------
Information in this article applies to: //**内容适用于:
RTX51 Tiny
--------------------------------------------------------------------------------
QUESTION 问题 I recently upgraded my compiler. Now my project, which uses RTX Tiny, generates linker errors: 我最近升级了我的C51 编译器。结果再编译我的项目文件(程序应用了RTX51TNY操作系统)时,出现下面链接错误:
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: ?RTX_CURRENTTASK MODULE: C:\KEIL\C51\LIB\RTX51TNY.LIB (?RTX51_TINY_KERNAL) *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: ?RTX_RAMTOP MODULE: C:\KEIL\C51\LIB\RTX51TNY.LIB (?RTX51_TINY_KERNAL) *** WARNING L4: DATA SPACE MEMORY OVERLAP FROM: 0008H TO: 000DH . . . *** ERROR L118: REFERENCE MADE TO ERRONEOUS EXTERNAL SYMBOL: ?RTX_CURRENTTASK MODULE: C:\KEIL\C51\LIB\RTX51TNY.LIB (?RTX51_TINY_OS_WAIT) ADDRESS: 0875H The code was working before the upgrade. What am I doing wrong? For compliance reasons, I need to use RTX tiny version 1, and cannot upgrade to RTXtiny2
我的程序在升级之前一直正常工作。我做错了什么? 为了软件规范原因, 我是不是只能使用RTXTtiny的版本1,而不能升级到RTXtiny2 ?
ANSWER 回答 C51 version 7.02 includes RTX51 Tiny Version 2 (RtxTiny2). RtxTiny2 contains several new enhancements. Version 7.02 by default uses the RtxTiny2 library. However, it is possible to use RTX tiny version 1's libary.
C51 版本 7.02 包括 RTX51 Tiny 版本2 (RtxTiny2). RtxTiny2 包含了几个新的增强功能。版本7.02默认使用 RtxTiny2 库(rtx51tny.lib)。然而,它也可以使用RTX Tiny 老版本1.的库。
Manually add the RTX51 Tiny Version 1 library to the project workspace window. The version 1 libraries are located at:
手动添加RTX51 Tiny 版本1. 的库到项目工作区窗口。这个版本1. 库文件位于: \Keil\C51\RTX_TINY\RTX51TNY.LIB
When you add the version 1 library to your project, the linker will not link the version 2 library into your project. This will remove the errors shown above.
当你把RTX51TNY 版本1. 的库添加到项目文件时, 链接器就不会把版本2.的库链接到你的项目文件。这就消除了以上显示的诸多错误。
This option is best if you must use RTX51 Tiny Version 1, and you are using CONF_TNY.A51 (the configuration file for RTX tiny version 1).
如果你必须使用RTX51 Tiny版本1, 并且你正在使用 CONF_TNY.A51(RTX tiny 版本1.的配置文件)时,这是你升级编译器之后最好的解决方法。
Note that the old configuration file is CONF_TNY.A51 and is located at: 注意老版本的配置文件是 CONF_TNY.A51,它位于: \Keil\C51\RTX_TINY\CONF_TNY.A51 (Upper case file name) //大写字母文件名
The new configuration file is CONF_TNY.A51 and is located at: 而新版本2的配置文件CONF_TNY.A51 位于: \Keil\C51\RtxTiny2\SourceCode\Conf_tny.A51 (Lower case file name) //小写字母文件名
MORE INFORMATION //更多信息可参考 RTX51 Tiny User's Guide. RTX51 Tiny 用户指南
Refer to the RTX51 Tiny User's Guide. Refer to What's New in the RTX51 Tiny User's Guide. SEE ALSO 也见 RTX51 TINY: ERROR L104 (MULTIPLE PUBLIC DEFINITIONS) OF MAIN RTX51 TINY: USER INTERRUPT FUNCTION DOES NOT WORK RTX51 TINY: INTERRUPTS STOP WORKING RTX51 TINY: MULTIPLE PUBLIC DEFINITIONS RTX_RAMTOP (PART 1)
|