Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 4 months ago.
Compile Debug Offline Error
Hi,
I am trying to get the mbed libraries working with an offline compiler. Have a NUCLEO-STM32F401RE board. Using the basic blinkyled program to get started.
I saw suggestions that I not rely on the precompiled mbed object files, so I imported mbed-dev into my project instead. It compiles in the online environment just fine.
I exported the project using the System Workbench for STM32 option. On windows 10 I have SW4STM32 for win64 v 1.3 installed, which is Eclipse Version: Luna Service Release 2 (4.4.2).
The toolchain is listed as Ac6 STM32 MCU GCC including MCU GCC Compiler and MCU G++ Compiler. I added all the mbed paths to the C and C++ include directories. I did not import the mbed folder inside cmsis TOOLCHAIN_GCC_ARM. Instructions I was following said the IDE would provide these files.
When I compile it in Build mode it seems to work okay and I get a .bin file out. Standard printf messages do not work as expected, but I gather that may be a known bug.
The trouble I have is if I try to compile it in Debug mode. Message below. Processor does not support rbit r3,r3 instruction in Thumb mode. I checked the online documentation and rbit is listed as an instruction for M4. Any thoughts? I can't pretend I understand this whole process. The compiler is generating this instruction? Then deciding it is not valid? Feeling a little stuck. Thanks!
C:\Users\userAppData\Local\Temp\ccP3dCbQ.s:871: Error: selected processor does not support `rbit r3,r3' in Thumb mode
make: [src/mbed-dev/targets/cmsis/TARGET_STM/TARGET_STM32F4/stm32f4xx_hal.o] Error 1
Edit: Was able to get it to work by changing the build options for my normal Build configuration adding in Debug keyword, removing optimization and putting Debug level to maximum. I can't tell what is different about the original Debug build settings that was giving me the problem.