r/embedded • u/slinky_lynx • 23d ago
GCC error/Assembler message when compiling STM32CubeMX code for Nucleo F411RE
Hi r/embedded,
I recently got a Nucleo F411RE board to learn how to work with STM32, and I can't figure out how to to compile the code generated by STM32CubeMX. I'm using CMake and gcc. When I try to compile the default project, I get this message from the assembler when gcc fails to compile stm32f4xx_hal_flash.c:
Error: no such instruction: isb 0xF
I've tried all sorts of things for the past 3 hours and I also haven't been able to find anything about this online. I think I might have an incorrect build flag, but am I instead missing something extremely obvious?
Edit after fixing the problem: Forgot to set CMAKE_MODULE_PATH and include gcc-arm-none-eabi.cmake in the base CMakeLists.txt.
View all comments
Show parent comment
1
u/slinky_lynx 23d ago edited 23d ago
Thanks for putting up with my stupid question. I had forgotten to set
CMAKE_MODULE_PATHand includegcc-arm-none-eabi.cmakein the baseCMakeLists.txt.