2014-09-08 06:36 AM
I've previously being using an Cortex-M3 STM32F105RC to evaluate a project, but I have since purchased a Cotex-M4 Nucleo-F103RB development board and aim to port the project over to the new MCU.
I previously had the project running in eclipse using Sourcery CodeBench Lite for ARM EABI (arm-none-eabi-gcc) and would like to know if I can use this toolchain again to setup a project for the new Nucleo-F103RB microcontroller. If this is possible is there a guide to setting this up/any differences to my previous setup e.g. specifying the FPU type, instruction set? Also, previously I needed the compiler symbols: STM32F10X_CL and USE_STDPERIPH_DRIVER. I will be needing the STM32_Nucleo_FW_V1.2.1 libraries, so would the new project require the symbols: STM32F10X_MD and USE_STDPERIPH_DRIVER, anything else?Thanks #stm32f103rb #nucleo #eclipse2014-09-08 09:32 AM
What you've described is NOT a Cortex-M4 board.
The regular Standard Peripheral Library code can be used with Nucleo boards. For different members of the F1 family yes you would need to change the STM32 Part designator so it pulls the right settings/defines for things like the IRQ numbers, and you'd need to use the right startup_stm32f1xx_xx.s file to have the right vector table.2014-09-08 01:40 PM
Yikes, you're right. Do you know what specifiers/designators are correct for this part? I've got USE_STDPERIPH_DRIVER and STM32F10X_MD and the startup file startup_stm32f10x_md.s from looking at an example project in TrueSTUDIO, but I'm not sure where to look to find these details in the STM32 documentation (I normally use other micros).
Can I also use the Standard Peripheral Library that comes bundled with the firmware V1.2.1 for the Nucleo? I've noticed that the Cortex Microcontroller Software Interface Standard (CMSIS) folder has quite a different structure to the Standard Peripheral Library I used before: http://www.st.com/web/en/catalog/tools/PF257890 and is missing some files like core_cm3.c that I previously needed to edit to get my project to build and run2014-09-08 06:38 PM
Not sure why you'd need to modify the library files, things should be directly usable with GNU/GCC
STM32_Nucleo_FW_V1.2.1\Libraries\CMSIS\Include\core_cm3.h Defines: USE_STDPERIPH_DRIVER,STM32F10X_MD Include Paths (root dependent): ..\; ..\..\; ..\..\..\..\Libraries\CMSIS\Device\ST\STM32F10x\Include; ..\..\..\..\Libraries\CMSIS\Include; ..\..\..\..\Libraries\STM32F10x_StdPeriph_Driver\inc; ..\..\..\..\Utilities\STM32_Nucleo\stm32f1xx; ..\..\..\..\Utilities\STM32_Nucleo\adafruit; ..\..\..\..\Utilities\\Common; ..\..\..\..\Utilities\Third_Party\fat_fs\src Startup: startup_stm32f10x_md.s Project specific: STM32_Nucleo_FW_V1.2.1\Projects\NUCLEO-F103RB\IO_Toggle\system_stm32f10x.c STM32_Nucleo_FW_V1.2.1\Projects\NUCLEO-F103RB\IO_Toggle\stm32f10x_conf.h