cmake -DVENDOR=nordic -DBOARD=nrf52840-dk -DCOMPILER=arm-gcc -S . -B nordic_build failed
Describe the bug cmake -DVENDOR=nordic -DBOARD=nrf52840-dk -DCOMPILER=arm-gcc -S . -B nordic_build failed: ~/freeRTOS_with_git/amazon-freertos$ cmake --build nordic_build/ --clean-first [ 0%] Building C object CMakeFiles/afr_kernel.dir/freertos_kernel/event_groups.c.obj arm-none-eabi-gcc: error: unrecognized command line option '-quiet' CMakeFiles/afr_kernel.dir/build.make:82: recipe for target 'CMakeFiles/afr_kernel.dir/freertos_kernel/event_groups.c.obj' failed make[2]: *** [CMakeFiles/afr_kernel.dir/freertos_kernel/event_groups.c.obj] Error 1 CMakeFiles/Makefile2:1292: recipe for target 'CMakeFiles/afr_kernel.dir/all' failed make[1]: *** [CMakeFiles/afr_kernel.dir/all] Error 2 Makefile:103: recipe for target 'all' failed make: *** [all] Error 2
System information
- nrf52840-dk
- NONE
- Linux
- 202011.00-161-g650cad85f
- amr-gcc version as below: arm-none-eabi-gcc (15:6.3.1+svn253039-1build1) 6.3.1 20170620 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
Expected behavior The build should be successfully excuted
Screenshots or console output :~/freeRTOS_with_git/amazon-freertos$ cmake --build nordic_build/ --clean-first Scanning dependencies of target afr_kernel [ 0%] Building C object CMakeFiles/afr_kernel.dir/freertos_kernel/event_groups.c.obj arm-none-eabi-gcc: error: unrecognized command line option '-quiet' CMakeFiles/afr_kernel.dir/build.make:82: recipe for target 'CMakeFiles/afr_kernel.dir/freertos_kernel/event_groups.c.obj' failed make[2]: *** [CMakeFiles/afr_kernel.dir/freertos_kernel/event_groups.c.obj] Error 1 CMakeFiles/Makefile2:1292: recipe for target 'CMakeFiles/afr_kernel.dir/all' failed make[1]: *** [CMakeFiles/afr_kernel.dir/all] Error 2 Makefile:103: recipe for target 'all' failed make: *** [all] Error 2
To reproduce
- cmake -DVENDOR=nordic -DBOARD=nrf52840-dk -DCOMPILER=arm-gcc -S . -B nordic_build
- cmake --build nordic_build/ --clean-first
Additional context Briefly, there are 2 issues for me when build nordic with command-line 1.unrecognized command line option '-quiet' 2. After comment out the --quiet option vendors/nordic/boards/nrf52840-dk/bootloader.cmake and vendors/nordic/boards/nrf52840-dk/CMakeLists.txt, the build still failed with missing inclue files
Thank you!
Hello @taotaodong527,
Thank you for this report, I am investigating your issue.
Hi @taotaodong527,
Can you try using -DCOMPILER=arm-segger instead of -DCOMPILER=arm-gcc
Hi @lundinc2 : After install the Setup_EmbeddedStudio_ARM_v532a_linux_x64.tar.gz With below steps:
- cmake -DVENDOR=nordic -DBOARD=nrf52840-dk -DCOMPILER=arm-segger -DAFR_TOOLCHAIN_PATH=/usr/share/segger_embedded_studio_for_arm_5.32a/gcc/arm-none-eabi/bin -S . -B nordic_build
- cmake --build nordic_build/ Build failed with below logs: [ 48%] Building C object CMakeFiles/bootloader.dir/vendors/nordic/nRF5_SDK_15.2.0/components/libraries/crypto/backend/cc310_bl/cc310_bl_backend_shared.c.obj make[2]: *** No rule to make target '/usr/share/segger_embedded_studio_for_arm_5.32a/gcc/arm-none-eabi/bin/../../../lib/libdebugio_mempoll_v7em_fpv4_sp_d16_hard_t_le_eabi.a', needed by 'bootloader.hex'. Stop. CMakeFiles/Makefile2:1374: recipe for target 'CMakeFiles/bootloader.dir/all' failed make[1]: *** [CMakeFiles/bootloader.dir/all] Error 2 Makefile:103: recipe for target 'all' failed make: *** [all] Error 2
Hi @lundinc2 : Following https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_nordic.html this guide. It works for me to build and fuse the aws_demos.emProject using the SEGGER Embedded Studio Unfortunately, the commad line buid still not works for me (both -DCOMPILER=arm-gcc and -DCOMPILER=arm-segger)
Hi @taotaodong527,
Here is a PR that fixes this issue https://github.com/aws/amazon-freertos/pull/2902
Hi @lundinc2: Thanks. I will feedback soon after check with your PR.
Hi @lundinc2: PR #2902 works as expected in my side
Hi @lundinc2: I have to reopen this issue. Seems PR #2902 only fixes the -DCOMPILER=arm-segger compile issue。
when using -DCOMPILER=arm-gcc,below errors reported:
~/freeRTOS_with_git/amazon-freertos$ cmake -DVENDOR=nordic -DBOARD=nrf52840-dk -DCOMPILER=arm-gcc -S . -B nordic_build ... -- Configuring done -- Generating done -- Build files have been written to: /home/dongtaotao/freeRTOS_with_git/amazon-freertos/nordic_build ~/freeRTOS_with_git/amazon-freertos$ cmake --build nordic_build/ --clean-first Scanning dependencies of target afr_kernel [ 0%] Building C object CMakeFiles/afr_kernel.dir/freertos_kernel/event_groups.c.obj arm-none-eabi-gcc: error: unrecognized command line option '-quiet' CMakeFiles/afr_kernel.dir/build.make:82: recipe for target 'CMakeFiles/afr_kernel.dir/freertos_kernel/event_groups.c.obj' failed make[2]: *** [CMakeFiles/afr_kernel.dir/freertos_kernel/event_groups.c.obj] Error 1 CMakeFiles/Makefile2:1292: recipe for target 'CMakeFiles/afr_kernel.dir/all' failed make[1]: *** [CMakeFiles/afr_kernel.dir/all] Error 2 Makefile:103: recipe for target 'all' failed make: *** [all] Error 2
Hi @taotaodong527,
Currently we only host this arm-segger project, which is a modified version of arm-gcc.