Using mbed in SW4STM32

For anyone trying to use mbed with SW4STM32, the following steps have worked well for me:

  1. Make sure you have the source files (mbed-dev) from the online compiler before you export to SW4STM32.

  2. Change the floating point ABI in MCU settings to match your hardware. The standard precompiled .o files that are in the online mbed compiler by default are compiled using a specific ABI setting for the FPU (soft, softfp, or hard). If you want to change the ABI setting, it is important in eclipse to be able to rebuild the source (mbed-dev) using the ABI you want for the FPU. If you don’t use the mbed-dev folder, you’ll have to match the ABI setting to whatever ABI the precompiled .o files were compiled with. Generally, if your MCU supports an FPU, you’ll need to use either softfp or hard. If your mcu does not support an FPU, ABI should be soft (and floating point hardware should be set to no unit).

  3. Include the file "${ProjDirPath}/mbed_config.h" for both the GCC and G++ compilers. Otherwise, you may get errors saying the serial baud rate variable is not declared.