Welcome! Log In Create A New Profile

Advanced

[solved] Building Marlin for STM32: Unsupported Platform!

Posted by JPT 
JPT
[solved] Building Marlin for STM32: Unsupported Platform!
January 25, 2024 01:01PM
Hi,

I try to build git branch Marlin-bugfix-2.1.x for the STM32F103RE_creality
The Ender mainboard. Version 4.2.7.
Configurations-bugfix-2.1.x/config/examples/Creality/Ender-5/CrealityV427

But it does not want to build. With platformIO I get these error messages:
$ pio check
Checking STM32F103RE_creality > cppcheck (board: genericSTM32F103RE; platform: ststm32@~12.1)
Marlin/src/HAL/platforms.h:58: [high:error] #error Unsupported Platform! [preprocessorErrorDirective]
But there are STM32 in the list, so why doesn't it work?

With ArduinoIDE it crashes with strange library errors. Wrong version?
I tried u8glib-HAL 0.5.4, 0.5.3 and 0.5.2

Marlin-bugfix-2.1.x/Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp: In function 'void u8g_com_arduino_init_shift_out(uint8_t, uint8_t)':
Marlin-bugfix-2.1.x/Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp:71:15: error: cannot convert 'volatile uint32* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
   u8g_outData = portOutputRegister(digitalPinToPort(dataPin));
               ^
/media/DATEN/home/jan/Home/Build/Marlin-bugfix-2.1.x/Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp:72:16: error: cannot convert 'volatile uint32* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
   u8g_outClock = portOutputRegister(digitalPinToPort(clockPin));
                ^
exit status 1
Compilation error: cannot convert 'volatile uint32* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment


btw, how can I read the stock firmware from the board using avrdude?

thanks

JPT

PS: The forum documented it's 10 years since I fiddled with the MendelMax 2. Now I am back winking smiley

Edited 2 time(s). Last edit at 01/26/2024 08:19AM by JPT.
Re: Building Marlin for STM32: Unsupported Platform!
January 25, 2024 09:10PM
a) pio check "Perform static analysis check on PlatformIO based project. By default Cppcheck analysis tool is used."

this has nothing to do with building the firmware normally.

Most of these static analysis tools are not up to the task of doing anything useful in marlin

use pio run, or even better use vscode as a gui.

b) no one uses Arduino IDE any more, its slow and painful and you have to install correct versions of libraries and build environments manually

c) you cant use arvdude on a stm32
JPT
Re: Building Marlin for STM32: Unsupported Platform!
January 26, 2024 06:00AM
Thank you very much for your answers.
I installed vscode + pio IDE.
But I still get the "Unsupported Platform!" error.
It comes from this file [github.com]
The STM32F1 is included. why doesn't it match?
JPT
Re: Building Marlin for STM32: Unsupported Platform!
January 26, 2024 08:19AM
Solved.
I successfully built from the bugfix.zip, not the git branch.
Sorry, only registered users may post in this forum.

Click here to login