Skip to main content
enjay
Associate II
October 25, 2021
Solved

Will code written for STM32f103 blue pill port easily to STM32f103 nucleo? The UM1724 manual is not that clear to me. I used FreeRTOS and Libopencm3 macros in the code. The problem I am having is not being able to debug using USB and minicom on Linux

..

This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
October 26, 2021

The NUCLEO-F103RB doesn't expose the target's USB connections, where as the I think the Blue Pill does this directly to a micro-USB connector.

The NUCLEO however does have a much better debug methodology supporting SWD and SWV (Debug Communication Channel / UART Proxy), VCP-UART connectivity, via the ST-LINK/V2-1

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

8 replies

TDK
October 25, 2021

The blue pill has a STM32F103C8Tx MCU.

The NUCLEO-F103RB has a STM32F103RBTx MCU.

Both are medium density devices.

https://www.st.com/content/st_com/en/products/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus/stm32-mainstream-mcus/stm32f1-series/stm32f103.html

The latter has more flash memory and is a bigger package but is otherwise the same, so yes the code will port.

"If you feel a post has answered your question, please click ""Accept as Solution""."
enjay
enjayAuthor
Associate II
October 27, 2021

Thanks, I appreciate the feedback.

Andrew Neil
Super User
October 26, 2021

Whether code is "easy" to port or not depends on how "well" the code has been written:

  • If it's full of hard-coded device dependencies, it will be hard to port;
  • if it is well structured, with a nice modular abstraction/interface layer, it will be much easier.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
enjay
enjayAuthor
Associate II
October 27, 2021

Thanks, good advice, and your feedback is much appreciated.

Uwe Bonnes
Chief
October 26, 2021

On all STM32F103C8 I have seen, real flash size is 128 kiB and flashing and comparing in the upper 64 k worked.

Available pins and possible pin collisions may be showbreakers.

enjay
enjayAuthor
Associate II
October 27, 2021

Thanks for your feedback, there are some pins I need to watch out for, you are right.

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
October 26, 2021

The NUCLEO-F103RB doesn't expose the target's USB connections, where as the I think the Blue Pill does this directly to a micro-USB connector.

The NUCLEO however does have a much better debug methodology supporting SWD and SWV (Debug Communication Channel / UART Proxy), VCP-UART connectivity, via the ST-LINK/V2-1

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
enjay
enjayAuthor
Associate II
October 27, 2021

Thanks for your reply. I probably need to revise the code that outputs characters to the console so I can interact with the software over USB.