Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update most stm32h7 env to latest frameworks #26662

Open
wants to merge 6 commits into
base: bugfix-2.1.x
Choose a base branch
from

Conversation

ellensp
Copy link
Contributor

@ellensp ellensp commented Jan 12, 2024

Description

Update to:
platform = ststm32@17.2.0
platform_packages = framework-arduinoststm32@4.20701.0

applied to

[env:STM32H743VI_btt]
[env:STM32H723VG_btt]
[env:STM32H723ZE_btt]
[env:STM32H723ZG_btt]

but not [env:BTT_SKR_SE_BX] due to customized framework

Requirements

One of these board with one of the above environments
BOARD_BTT_SKR_V3_0
BOARD_BTT_SKR_V3_0_EZ
BOARD_BTT_OCTOPUS_MAX_EZ_V1_0
BOARD_BTT_OCTOPUS_PRO_V1_0_1
BOARD_BTT_OCTOPUS_PRO_V1_0
BOARD_BTT_OCTOPUS_PRO_V1_1
BOARD_BTT_MANTA_M8P_V2_0
BOARD_BTT_KRAKEN_V1_0

Benefits

Latest code

Related Issues

#26645

VERY EXPERIMENTAL, needs tested

Current status:

SKR_V3_0 SKR_V3_0_EZ OCTOPUS_MAX_EZ_V1_0 OCTOPUS_PRO_V1_0_1 OCTOPUS_PRO_V1_0 OCTOPUS_PRO_V1_1 MANTA_M8P_V2_0 KRAKEN_V1_0
BOOTS
USB/SERIAL
LCD
SDCARD
HOTEND
BED
SPI DRIVERS
UART DRIVERS
NEOPIXELS
MOVES
HOMES
PRINTS

@ellensp ellensp added Needs: Testing Testing is needed for this change C: Build / Toolchain labels Jan 12, 2024
@sargonphin
Copy link
Contributor

Causes my board to boot loop on a clean config except for the TMC drivers

@ellensp ellensp added the Needs: Work More work is needed label Jan 15, 2024
@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 2 times, most recently from 9c65146 to 4f65466 Compare January 26, 2024 00:13
@thijstriemstra
Copy link

thijstriemstra commented Feb 16, 2024

this hopefully finally allows marlin to be build on 64bit raspberry pi! I'll give it a try..

Update: damn, misread and thought the BTT Octopus v1.0/v1.1 was also included but guess I'm out of luck and it still fails with:

Processing STM32F446ZE_btt (board: marlin_BigTree_Octopus_v1; platform: ststm32@~12.1; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------
Platform Manager: Installing ststm32 @ ~12.1
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Platform Manager: ststm32@12.1.1 has been installed!
Tool Manager: Installing platformio/toolchain-gccarmnoneeabi @ ~1.90201.0
UnknownPackageError: Could not find the package with 'platformio/toolchain-gccarmnoneeabi @ ~1.90201.0' requirements for your system 'linux_aarch64'

@thisiskeithb
Copy link
Member

thisiskeithb commented Mar 28, 2024

BOARD_BTT_KRAKEN_V1_0 with integrated TMC2160s & BTT_MINI_12864 boots with these changes, but I haven't tried much beyond testing the LCD yet.

You'll need to add the -Wl,--no-warn-rwx-segment flag to these environments, similar to what I did in #26585, to silence the firmware.elf has a LOAD segment with RWX permissions warning. See commit d3f8049 for more info on this.

@ellensp
Copy link
Contributor Author

ellensp commented Jul 15, 2024

BOARD_BTT_SKR_V3_0 using STM32H723VG_btt also boots and responds to gcodes. not much tested beyond that
(includes ststm32@17.4.0)

@thinkyhead thinkyhead marked this pull request as ready for review August 5, 2024 22:52
@dbuezas
Copy link
Contributor

dbuezas commented Aug 19, 2024

I got the following error:

image
as text
In file included from Marlin/src/libs/MAX31865.h:48,
               from Marlin/src/libs/MAX31865.cpp:47:
Marlin/src/libs/../HAL/STM32/MarlinSPI.h:99:3: error: 'spi_mode_e' does not name a type
 99 |   spi_mode_e _dataMode;
    |   ^~~~~~~~~~
Marlin/src/libs/../HAL/STM32/MarlinSPI.h: In constructor 'MarlinSPI::MarlinSPI(pin_t, pin_t, pin_t, pin_t)':
Marlin/src/libs/../HAL/STM32/MarlinSPI.h:64:5: error: '_dataMode' was not declared in this scope; did you mean '_dataSize'?
 64 |     _dataMode = SPI_MODE_0;
    |     ^~~~~~~~~
    |     _dataSize
Marlin/src/libs/../HAL/STM32/MarlinSPI.h:64:17: error: 'SPI_MODE_0' was not declared in this scope; did you mean 'SPI_MODE0'?
 64 |     _dataMode = SPI_MODE_0;
    |                 ^~~~~~~~~~
    |                 SPI_MODE0
Marlin/src/libs/../HAL/STM32/MarlinSPI.h: In member function 'void MarlinSPI::setDataMode(uint8_t)':
Marlin/src/libs/../HAL/STM32/MarlinSPI.h:83:23: error: '_dataMode' was not declared in this scope; did you mean '_dataSize'?
 83 |       case SPI_MODE0: _dataMode = SPI_MODE_0; break;
    |                       ^~~~~~~~~
    |                       _dataSize
Marlin/src/libs/../HAL/STM32/MarlinSPI.h:83:35: error: 'SPI_MODE_0' was not declared in this scope; did you mean 'SPI_MODE0'?
 83 |       case SPI_MODE0: _dataMode = SPI_MODE_0; break;
    |                                   ^~~~~~~~~~
    |                                   SPI_MODE0
compilation terminated due to -fmax-errors=5.
*** [.pio/build/STM32H723VG_btt/src/src/libs/MAX31865.cpp.o] Error 1

(skr 3ez)

@dbuezas
Copy link
Contributor

dbuezas commented Aug 19, 2024

It looks like the spi_mode_e enum doesn't exist in the newer arduinoststm32 framework. It was replaced with SPIMode.
Modifying HAL/STM32/MarlinSPI.h accordingly does compile and works fine.
Serial (#define SERIAL_PORT 3) works fine, and the printer works (prints) normally.

@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 3 times, most recently from 37d77d6 to aa44542 Compare September 28, 2024 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: STM32 C: Build / Toolchain Needs: Testing Testing is needed for this change Needs: Work More work is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants