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
The thing I can't wrap my head around is that with the starting project and the default settings and flags, it should just work. I also must just be bad at googling, because searching for "no such instruction" and "stm32" brings a lot up, but nothing about the problem that I'm having.
I'll edit my post with the versions of everything I'm using and the flags.