Welcome! Log In Create A New Profile


Marlin 2.0 and STM32F103C8

Posted by ruyvieira 
Marlin 2.0 and STM32F103C8
February 12, 2019 09:40PM
Was it ever possible to build Marlin 2.0 for this MCU? There are at least two boards designed for it (Morpheus and RABPS), plus the Mono Price Mini I3 controller, but I either get a "can't find included file atomic.h" or a "NameError: name 'variant' is not defined:" when trying to build it in Platformio. This happens even on a fresh install of Platformio, which makes me wonder if it was ever possible to build it for this specific MCU. I can build it for other mcu's in the same like like the one in MKS Robin, and a guy in this forum designed a whole 3d printer board around what seems to be an inexpensive stm32f407 module.

I made a board for a stm32f103 port of GRBL and it functions perfectly, if Marlin 2.0 could run on it it then a single board would be able to run both firmwares.
Re: Marlin 2.0 and STM32F103C8
February 13, 2019 12:22AM
I have complied marlin 2.0 for STM32F103C8 on platformio

there where some things that needed changed
main issue were memory, had to hack files to tell it that it really has 128k flash vs the 64k it is sold as.


PID Build (STM32F1)

still seems to compile fine with current marlin 2.0
Re: Marlin 2.0 and STM32F103C8
February 13, 2019 01:02AM
I tried choosing the STM32F1 environment, setting the board in the environment as genericSTM32F103CB. It shows the right specs in the beginning, like

PLATFORM: ST STM32 > STM32F103CB (20k RAM. 128k Flash)
HARDWARE: STM32F103CBT6 72MHz 20KB RAM (128KB Flash)

But then it gives me a different series of errors

Compiling .pioenvs\STM32F1\src\src\HAL\HAL_STM32F1\HAL_timers_STM32F1.cpp.o
Marlin\src\HAL\HAL_STM32F1\HAL_sdio_STM32F1.cpp: In function 'bool SDIO_Init()':
Marlin\src\HAL\HAL_STM32F1\HAL_sdio_STM32F1.cpp:34:3: error: 'sdio_begin' was not declared in this scope

And so on. It's a different result already, I could be on the right track or not

Makes me want to try ESP32 instead
Re: Marlin 2.0 and STM32F103C8
February 13, 2019 02:55AM
I didn't change board = genericSTM32F103RE in platformio.ini (this time....)

after changing it to genericSTM32F103C8 or genericSTM32F103CB I get the same error as you

It did used to work....


ok this is odd...

code is looking like it is ignoring -D__STM32F1__

if you edit Marlin/Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.cpp line 24
change it from #ifdef __STM32F1__ to #ifndef __STM32F1__

it complies!!

I can't explain this...

Edited 1 time(s). Last edit at 02/13/2019 03:30AM by Dust.
Sorry, only registered users may post in this forum.

Click here to login