本文介绍了CMake 汇编程序错误:没有这样的说明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在尝试为具有 AM335X ARM Cortex-A8 处理器的 Beaglebone 黑色目标构建 FreeRTOS 应用程序.我正在运行 Windows,但我使用的是运行 linux debian 10 的虚拟机,这是我交叉编译的.uname -a 提供:

Hello I am trying to build a FreeRTOS application for a Beaglebone black target which has a AM335X ARM Cortex-A8 processor. I am running windows but i am using a virtual machine that runs linux debian 10 which is what i am cross compiling from. uname -a provides:

Linux debian 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux

我的项目可以在这里找到:https://github.com/frank2597/FreeRTOS_BBB当我尝试使用 arm-linux-gnueabihf-gcc 进行编译时出现各种汇编器错误,我用来设置编译器的 cmake 命令可以在我的项目中找到:https://github.com/frank2597/FreeRTOS_BBB/blob/master/AM335X-FreeRTOS-lwip/CMakeLists.txt

My project can be found here:https://github.com/frank2597/FreeRTOS_BBBI am getting various assembler errors when i try to compile with arm-linux-gnueabihf-gcc , the cmake commands that i used to set up the compiler can be found in my project:https://github.com/frank2597/FreeRTOS_BBB/blob/master/AM335X-FreeRTOS-lwip/CMakeLists.txt

我已经使用这个设置为 beaglebone black 交叉编译了一个简单的 hello world 示例,所以我不确定为什么它会在这个 freeRTOS 端口上失败.我应该注意到,我的 freertos 项目是基于另一个项目制作的,但我对其进行了简化,因为我认为他将其设置为从 Windows 交叉编译(原始项目链接):https://github.com/kryochronic/AM335X-FreeRTOS-lwip

I have used this setup to cross compile a simple hello world example for the beaglebone black so im not sure why it fails with this freeRTOS port. I should note that i made my freertos project based on another one but i simplified it since i think he was setting it up to cross compile from windows(original project link):https://github.com/kryochronic/AM335X-FreeRTOS-lwip

我得到的详细错误如下:

The verbose error that i get is below:

    frank@debian:~/eclipse-workspace/FreeRTOS_Test/build$ make
/usr/bin/cmake -S/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip -B/home/frank/eclipse-workspace/FreeRTOS_Test/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/frank/eclipse-workspace/FreeRTOS_Test/build/CMakeFiles /home/frank/eclipse-workspace/FreeRTOS_Test/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/frank/eclipse-workspace/FreeRTOS_Test/build'
make -f CMakeFiles/src_portable_ported_aws_bufpool.dir/build.make CMakeFiles/src_portable_ported_aws_bufpool.dir/depend
make[2]: Entering directory '/home/frank/eclipse-workspace/FreeRTOS_Test/build'
cd /home/frank/eclipse-workspace/FreeRTOS_Test/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip /home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip /home/frank/eclipse-workspace/FreeRTOS_Test/build /home/frank/eclipse-workspace/FreeRTOS_Test/build /home/frank/eclipse-workspace/FreeRTOS_Test/build/CMakeFiles/src_portable_ported_aws_bufpool.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/frank/eclipse-workspace/FreeRTOS_Test/build'
make -f CMakeFiles/src_portable_ported_aws_bufpool.dir/build.make CMakeFiles/src_portable_ported_aws_bufpool.dir/build
make[2]: Entering directory '/home/frank/eclipse-workspace/FreeRTOS_Test/build'
make[2]: Nothing to be done for 'CMakeFiles/src_portable_ported_aws_bufpool.dir/build'.
make[2]: Leaving directory '/home/frank/eclipse-workspace/FreeRTOS_Test/build'
[  2%] Built target src_portable_ported_aws_bufpool
make -f CMakeFiles/src_portable_AM335X.dir/build.make CMakeFiles/src_portable_AM335X.dir/depend
make[2]: Entering directory '/home/frank/eclipse-workspace/FreeRTOS_Test/build'
cd /home/frank/eclipse-workspace/FreeRTOS_Test/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip /home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip /home/frank/eclipse-workspace/FreeRTOS_Test/build /home/frank/eclipse-workspace/FreeRTOS_Test/build /home/frank/eclipse-workspace/FreeRTOS_Test/build/CMakeFiles/src_portable_AM335X.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/frank/eclipse-workspace/FreeRTOS_Test/build'
make -f CMakeFiles/src_portable_AM335X.dir/build.make CMakeFiles/src_portable_AM335X.dir/build
make[2]: Entering directory '/home/frank/eclipse-workspace/FreeRTOS_Test/build'
[  3%] Building ASM object CMakeFiles/src_portable_AM335X.dir/src/portable/AM335X/ported_amm335x_init.S.o
/usr/bin/cc -DBOOT=MMCSD -DCONSOLE=UARTCONSOLE -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/freertos_kernel/include -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/FreeRTOS/portable/GCC/ARM_CA8_amm335x -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/ti/include -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/ti/include/armv7a -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/ti/include/armv7a/am335x -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/ti/include/hw -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/inc -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/inc -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/inc/config_files -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/app/lwip_app/ports/cpsw/include -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/libraries/3rdparty/lwip -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/libraries/3rdparty/lwip/src/include -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/libraries/3rdparty/lwip/src/portable -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/lwip/ports/cpsw/include -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/lwip -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/ti/drivers -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/ti/utils -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/ti/platform/beaglebone -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/ti/nandlib -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/ti/nandlib/include -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/ti/system_config/armv7a -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/ti/system_config/armv7a/gcc -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/ti/system_config/armv7a/am335x -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/ti/system_config/armv7a/am335x/gcc -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/libraries/3rdparty/lwip/src/netif -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/libraries/3rdparty/lwip/src/core -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/libraries/3rdparty/lwip/src/core/ipv4 -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/libraries/3rdparty/lwip/src/portable/arch -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/libraries/3rdparty/lwip/src/api -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/libraries/3rdparty/lwip/src/include/netif -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/libraries/3rdparty/lwip/src/include/lwip -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/libraries/3rdparty/lwip/src/include/lwip/apps -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/libraries/3rdparty/lwip/src/include/lwip/priv -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/libraries/3rdparty/lwip/src/include/lwip/prot -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/libraries/3rdparty/lwip/src/include/posix -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/libraries/3rdparty/lwip/src/include/posix/sys -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/lwip/ports/cpsw/netif -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/freertos_kernel -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/lib/third_party/amazon/freertos_kernel/portable/MemMang -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/ported_aws_bufpool -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/ported_aws_bufpool/inc -I/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/application   -o CMakeFiles/src_portable_AM335X.dir/src/portable/AM335X/ported_amm335x_init.S.o -c /home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S: Assembler messages:
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:77: Error: unknown pseudo-op: `.code'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:92: Error: no such instruction: `ldr r0,=_stack'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:93: Error: no such instruction: `msr cpsr_c,'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:94: Error: too many memory references for `mov'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:95: Error: too many memory references for `sub'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:99: Error: no such instruction: `msr cpsr_c,'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:100: Error: too many memory references for `mov'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:101: Error: too many memory references for `sub'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:105: Error: no such instruction: `msr cpsr_c,'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:106: Error: too many memory references for `mov'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:107: Error: too many memory references for `sub'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:111: Error: no such instruction: `msr cpsr_c,'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:112: Error: too many memory references for `mov'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:113: Error: too many memory references for `sub'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:117: Error: no such instruction: `msr cpsr_c,'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:118: Error: too many memory references for `mov'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:119: Error: too many memory references for `sub'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:124: Error: no such instruction: `msr cpsr_c,'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:125: Error: too many memory references for `mov'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:133: Error: expecting operand after ','; got nothing
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:134: Error: no such instruction: `mcr p15,'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:135: Error: no such instruction: `isb'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:136: Error: no such instruction: `mrc p15,'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:137: Error: no such instruction: `orr r0,r0,'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:138: Error: no such instruction: `mcr p15,'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:143: Error: no such instruction: `mrc p15,'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:144: Error: no such instruction: `orr r1,r1,'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:145: Error: no such instruction: `mcr p15,'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:146: Error: expecting operand after ','; got nothing
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:147: Error: no such instruction: `mcr p15,'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:148: Error: expecting operand after ','; got nothing
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:149: Error: no such instruction: `fmxr FPEXC,r0'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:156: Error: no such instruction: `ldr r0,=_bss_start'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:157: Error: no such instruction: `ldr r1,=(_bss_end - 0x04)'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:158: Error: expecting operand after ','; got nothing
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:160: Error: invalid char '[' beginning operand 2 `[r0]'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:161: Error: too many memory references for `cmp'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:162: Error: no such instruction: `ble Loop'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:169: Error: no such instruction: `ldr r10,=start_boot'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:170: Error: too many memory references for `mov'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:171: Error: no such instruction: `bx r10'
/home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S:172: Error: too many memory references for `sub'
make[2]: *** [CMakeFiles/src_portable_AM335X.dir/build.make:144: CMakeFiles/src_portable_AM335X.dir/src/portable/AM335X/ported_amm335x_init.S.o] Error 1
make[2]: Leaving directory '/home/frank/eclipse-workspace/FreeRTOS_Test/build'
make[1]: *** [CMakeFiles/Makefile2:113: CMakeFiles/src_portable_AM335X.dir/all] Error 2
make[1]: Leaving directory '/home/frank/eclipse-workspace/FreeRTOS_Test/build'
make: *** [Makefile:87: all] Error 2

可以在此处找到产生此错误的文件:https://github.com/frank2597/FreeRTOS_BBB/blob/master/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S

The file that produced this error can be found here:https://github.com/frank2597/FreeRTOS_BBB/blob/master/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S

如果您需要其他信息,请告诉我.感谢您对解决此问题的任何帮助,谢谢.

If you need an other info let me know. Any help in resolving this issue is appreciated, thank you.

推荐答案

set(CMAKE_C_COMPILER "/path/to/your/c/compiler/executable")
set(CMAKE_CXX_COMPILER "/path/to/your/cpp/compiler/executable")

在顶级 CMakeLists.txt 中使用 project()enable_language() 命令后,必须在 NOT 之前添加此项

This must be added before NOT after you use project() or enable_language() command in top level CMakeLists.txt

这篇关于CMake 汇编程序错误:没有这样的说明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-28 15:43