This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CMake Assembler Errors: No such instruction

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

My project can be found here: https://github.com/frank2597/FreeRTOS_BBB I 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

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

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.

Parents
  • I did not look for the source file, but I note your command line to build 

    /home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S

    Has no -mcpu or similar options.

    Also, is the file written in gnu assembler format, or the Arm proprietary format?

Reply
  • I did not look for the source file, but I note your command line to build 

    /home/frank/eclipse-workspace/FreeRTOS_Test/AM335X-FreeRTOS-lwip/src/portable/AM335X/ported_amm335x_init.S

    Has no -mcpu or similar options.

    Also, is the file written in gnu assembler format, or the Arm proprietary format?

Children