#error "No valid CPU defined!" with gcc toolchain for MIMXRT1160

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

#error "No valid CPU defined!" with gcc toolchain for MIMXRT1160

1,320 次查看
kunf
Contributor II

I am setting up a gcc toolchain  for MIMXRT1160 using an preconfigured example. When building it, I get the following error:

====================[ Build | core0_cm7.elf | Debug ]===========================
"C:\Program Files\JetBrains\CLion 2021.1.2\bin\cmake\win\bin\cmake.exe" --build C:\Users\local_kunf\CLionProjects\1160_prog_almer\core0_cm7\cmake-build-debug --target core0_cm7.elf -- -j 6
Scanning dependencies of target core0_cm7.elf
[ 2%] Building C object CMakeFiles/core0_cm7.elf.dir/board/board.c.obj
[ 5%] Building C object CMakeFiles/core0_cm7.elf.dir/board/clock_config.c.obj
[ 7%] Building C object CMakeFiles/core0_cm7.elf.dir/board/dcd.c.obj
[ 10%] Building C object CMakeFiles/core0_cm7.elf.dir/board/pin_mux.c.obj
[ 12%] Building C object CMakeFiles/core0_cm7.elf.dir/source/main_master.c.obj
[ 15%] Building C object CMakeFiles/core0_cm7.elf.dir/mcmgr/mcmgr_internal_core_api_imxrt1160.c.obj
In file included from C:\Users\local_kunf\CLionProjects\1160_prog_almer\core0_cm7\drivers/fsl_common.h:31:0,
from C:\Users\local_kunf\CLionProjects\1160_prog_almer\core0_cm7\board\board.c:8:
C:\Users\local_kunf\CLionProjects\1160_prog_almer\core0_cm7\device/fsl_device_registers.h:37:6: error: #error "No valid CPU defined!"
#error "No valid CPU defined!"
^~~~~

In which file must the desired processor be specified?

Thanks for helping me.

Regards

Stefan

 

 

 

标记 (2)
0 项奖励
回复
1 回复

1,310 次查看
ErichStyger
Specialist I

Hi @kunf ,

Check the project created with the MCUXpresso IDE: there are bunch of compiler defines you need to set for the MCUXpresso SDK projects, otherwise you will get such errors. In the project settings, check the compiler settings.

Or see how to setup projects with CMake here: https://mcuoneclipse.com/2021/05/04/visual-studio-code-for-c-c-with-arm-cortex-m-part-2/

I hope this helps,

Erich

0 项奖励
回复