完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
宇宙链接器错误
#cosmic-link-linking-stvd #cosmic-link-linking-stvd #linking 以上来自于谷歌翻译 以下为原文 Cosmic Linker Error #cosmic-link-linking-stvd #cosmic-link-linking-stvd #linking |
|
相关推荐
8个回答
|
|
问候:
当我从项目中删除stm8s_flash.c库文件时,我确定错误消失了.stm8s_flash.c包含语句块: #ifdef USE_COSMIC_SECTIONS #pragma section(FLASH_CODE) #pragma section const {FLASH_CONST} #pragma section @near [FLASH_URAM] #pragma section @near {FLASH_IRAM} #pragma section @tiny [FLASH_UZRAM] #pragma section @tiny {FLASH_IZRAM} #万一 由于stm8s.h文件在使用Cosmic编译器时定义了USE_COSMIC_SECTIONS,我认为这会导致链接器生成错误: #error clnk Debug lcm_ta_cos.lkf:1没有段的默认位置.FLASH_CODE 我不相信链接器会创建具有上述名称的任何段。 有任何建议如何解决这个问题? 提前致谢! 最好的祝福, 汤姆Alldread 以上来自于谷歌翻译 以下为原文 Greetings: I determine that the error disappeared when I removed the stm8s_flash.c library file from the project.The stm8s_flash.c contains the statement block: #ifdef USE_COSMIC_SECTIONS #pragma section (FLASH_CODE) #pragma section const {FLASH_CONST} #pragma section @near [FLASH_URAM] #pragma section @near {FLASH_IRAM} #pragma section @tiny [FLASH_UZRAM] #pragma section @tiny {FLASH_IZRAM} #endif Since the stm8s.h file defines USE_COSMIC_SECTIONS when the Cosmic compiler is used I presume this causes the linker to generate the error: #error clnk Debuglcm_ta_cos.lkf:1 no default placement for segment .FLASH_CODE I don't believe the linker creates any segments with the above names. Any suggestions how to fix this? Thanks in advance! Best Regards, Tom Alldread |
|
|
|
嗨,
链接器永远不会创建任何段:这取决于编写.lkf文件的人(通常是STVD或用户''手工'')在该文件中添加已在应用程序中定义的所有段。 希望能帮助到你, 卢卡 以上来自于谷歌翻译 以下为原文 Hi, the linker never creates any segment: it's up to whoever writes the .lkf file (typically, STVD or the user ''by hand'') to add in this file all the segments that have been defined in the application. Hope it helps, Luca |
|
|
|
问候:
谢谢您的帮助! 虽然我已经阅读了用户指南,但我并不完全理解''pragma section''语句的原因。它是链接器重命名以前命名的部分的命令还是为部分分配别名? 在stm8s_flash.c文件的情况下,我想知道为什么pragma代码块首先存在,如果删除它可能会失败? Cosmic STM8工具(可能是汇编程序)是否需要特定的Cosmic部分名称?我知道如果我用注释/ * * / markers删除pragma块,那么程序编译就OK而没有任何错误。 目录树结构似乎也会影响错误。 STVD目录结构必须严格遵循示例项目吗?以下结构有问题吗? stm8Projects CosmicStwSpace ProjectStpHome 调试 stm8Projects librairies STM8S_StdPeriph_Driver INC stm8Projects librairies STM8S_StdPeriph_Driver SRC 在此先感谢您的帮助! 最好的祝福, 汤姆Alldread 以上来自于谷歌翻译 以下为原文 Greetings: Thanks for the help! Although I have read the user guide I don't really understand the reason for the ''pragma section'' statement. Is it a command to the linker to rename the previously named sections or does it assign alias names for the sections? In the case of the stm8s_flash.c file I wonder why the pragma block of code is there in the first place and what might fail if it is removed? Do the Cosmic STM8 tools, possibly the assembler, need the specific Cosmic section names? I do know that if I remove the pragma block with comment /* */ markers the program then compiles OK without any errors. The directory tree structure also seems to affect the error. Must the STVD directory structure rigidly follow the example projects? Is there a problem with the following structure? stm8ProjectsCosmicStwSpaceProjectStpHomeDebug stm8ProjectslibrairiesSTM8S_StdPeriph_Driverinc stm8ProjectslibrairiesSTM8S_StdPeriph_Driversrc Thanks in advance for any help! Best Regards, Tom Alldread |
|
|
|
嗨,
当你想在特定地址分配部件或代码或数据时(例如,在构建引导加载程序+可加载的应用程序部分时),“pragma部分”用两个词来说很有用。 在大多数应用程序中,根本不需要编译指示部分:代码和数据将转到其默认部分,由Cosmic提供或由STVD生成的链接器命令文件将允许工作而不必担心部分。 我不知道这个具体的应用程序,所以我不知道这些部分是针对什么的。 希望它有所帮助。 卢卡(宇宙) 以上来自于谷歌翻译 以下为原文 Hi, the ''pragma section'', in two words, is useful when you want to allocate parts or your code or data at specific addresses (for example when you are building a bootloader + loadable application part). In most applications there's no need for pragma sections at all: code and data will go to their default sections, and the linker command file provided by Cosmic or generated by STVD will allow to work without worrying about sections at all. I don't know this specific application, so I have no idea what the sections are for. Hope it help. Luca (Cosmic) |
|
|
|
问候卢卡:
再次感谢您的帮助! 我在其中一个ST标准库FLASH示例中找到了一个stm8s105.lkf文件,其中包含FLASH_CODE和FLASH_CONST声明的段代码。我将这些定义添加到STVD段表中并解决了链接器错误问题。 我附加了两个lkf文件,''lcm_ta_cos''和''lc_meter_v1.lkf''。我提供的新定义显示在第一个文件中。但是没有定义的第二个文件的项目编译正常。我相信唯一的区别是目录树。在第二种情况下,链接器找到FLASH_CODE定义,而不将内存地址详细信息放在lkf链接器文件中。 我的问题是为什么第二种情况在没有将定义放在lkf文件中的情况下工作?链接器还在哪里寻找段定义? 提前感谢您的任何澄清! 最好的祝福, 汤姆Alldread 以上来自于谷歌翻译 以下为原文 Greetings Luca: Thanks once more for your help! I found a stm8s105.lkf file in one of the ST standard library FLASH examples with segment code for the FLASH_CODE and FLASH_CONST declarations. I added these definitions to the STVD segments table and solved the linker error problem. I have attached two lkf files, ''lcm_ta_cos'' and ''lc_meter_v1.lkf''. The new definitions I provided are shown in the first file. But the project with the second file which does not have the definitions compiles OK. I believe the only difference is the directory tree. In the second case the linker finds the FLASH_CODE definition without the memory address details being placed within the lkf linker file. My question is why does the second case work without the definition being placed in the lkf file? Where else does the linker look for segment definitions? Thanks in advance for any clarifications! Best Regards, Tom Alldread |
|
|
|
看来我的附件没有用,所以我会在这里再试一次:
以上来自于谷歌翻译 以下为原文 It seems my attachments did not work so I will try again here: |
|
|
|
问候:
不一致问题原来是由stm8s.h文件中的另一个选项引起的,其中定义了USE_COSMIC_SECTIONS。在一个案例中,它被定义,另一个案例被注释掉了。虽然这看起来像目录路径问题,但它只是两个不同的stm8s.h库定义文件。 我仍然不知道什么时候应该使用Cosmic部分,但在我的情况下很明显,默认链接器值不需要也不支持这些定义。 我很高兴知道问题不像我曾经想过的那样对目录结构敏感。看来STVD包在目录路径方面非常灵活。 如果有一种方法可以列出定义的编译器指令符号,那么原因就更容易追踪。如果有人知道生成活动编译器指令符号列表的方法,请告诉我。由于条件编译语句很常见,我认为IDE中的一个功能允许用户轻松确定是否定义了给定符号将非常有用。 最好的祝福, 汤姆Alldread 以上来自于谷歌翻译 以下为原文 Greetings: The inconsistency problem turned out to be caused by a different option in the stm8s.h file where USE_COSMIC_SECTIONS is defined. In one case it was defined and the other it was commented out. Although this appeared like a directory path problem it was not, just two different stm8s.h library definition files. I still do not know when Cosmic sections are supposed to be used but in my case it is apparent that these definitions are not needed nor supported by the default linker values. I am happy to know the problem was not directory structure sensitive as I once thought. It appears the STVD package is nice and flexible with regards to directory paths. The cause would have been much easier to track down if there was a way to list the defined compiler directive symbols. If anyone knows of a way to generate a list of active compiler directive symbols please let me know. Since conditional compile statements are common place I think a feature within the IDE that would permit one to easily determine whether or not a given symbol has been defined would be very useful. Best Regards, Tom Alldread |
|
|
|
>>如果有人知道生成活动编译器指令符号列表的方法,请告诉我。
使用所有宇宙编译器提供的cobj实用程序: cobj -i acia.o 你会得到这样的输出: > acia.o:20 Aug 2010 11:49 cpstm8 V4.8.33:-d MYDEF -f -h modsl.h -pb -u -x cgstm8 V4.3.4.2: costm8 V4.3.3: castm8 V4.6.8: 问候, 卢卡(宇宙) 以上来自于谷歌翻译 以下为原文 >> If anyone knows of a way to generate a list of active compiler directive symbols please let me know. use the cobj utility provided with all cosmic compilers: cobj -i acia.o and you will get an output like this: > acia.o: 16 Aug 2010 11:49 cpstm8 V4.8.33: -d MYDEF -f -h modsl.h -pb -u -x cgstm8 V4.3.4.2: costm8 V4.3.3: castm8 V4.6.8: Regards, Luca (Cosmic) |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2642 浏览 1 评论
3208 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1783 浏览 1 评论
3611 浏览 6 评论
5988 浏览 21 评论
939浏览 4评论
1316浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
584浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1303浏览 3评论
1360浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-24 08:07 , Processed in 1.144292 second(s), Total 93, Slave 76 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号