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

[FR] Update BTT STM32H7 toolchains #26645

Open
thurask opened this issue Jan 7, 2024 · 4 comments
Open

[FR] Update BTT STM32H7 toolchains #26645

thurask opened this issue Jan 7, 2024 · 4 comments
Labels
C: Build / Toolchain T: Feature Request Features requested by users.

Comments

@thurask
Copy link

thurask commented Jan 7, 2024

Is your feature request related to a problem? Please describe.

Attempting to build Marlin for my board (BTT SKR3 STM32H723VG) on my ARM64 laptop (Pinebook Pro running Debian, VS Code + PlatformIO + AutoBuildMarlin) errors out during the build step:

luser@pbp:~/git/MarlinWorkzone$ platformio run -e STM32H723VG_btt ; echo "done" >|"/tmp/ipc"
Processing STM32H723VG_btt (board: marlin_STM32H723VG; platform: [email protected]; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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'

This is using commit 2a8c00b from bugfix-2.1.x and my own Configuration.h/Configuration_adv.h. The same commit and configuration build just fine on my Windows AMD64 laptop also using VSCode + PlatformIO + AutoBuildMarlin; that I can still build working Marlin just on a different machine is why I filed this as a feature request instead of an actual bug.

Are you looking for hardware support?

No response

Describe the feature you want

If I remove the pinned version of platform-ststm32 in stm32h7.ini (15.4.1 at time of writing) and use the latest platform-ststm32 (17.2.0) it does successfully download and install the toolchain (version 1.120301.0) for ARM64, but it runs into another issue with a dependency:

Compiling .pio/build/STM32H723VG_btt/FrameworkArduino/avr/dtostrf.c.o
Compiling .pio/build/STM32H723VG_btt/FrameworkArduino/board.c.o
/home/luser/.platformio/packages/[email protected]/cores/arduino/avr/dtostrf.c: In function 'dtostrf':
/home/luser/.platformio/packages/[email protected]/cores/arduino/avr/dtostrf.c:34:3: error: unknown type name 'uint8_t'
   34 |   uint8_t negative = 0;
      |   ^~~~~~~
/home/luser/.platformio/packages/[email protected]/cores/arduino/avr/dtostrf.c:24:1: note: 'uint8_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?
   23 | #include <string.h>
  +++ |+#include <stdint.h>
   24 | 
*** [.pio/build/STM32H723VG_btt/FrameworkArduino/avr/dtostrf.c.o] Error 1

I feel that this would need attention from people more familiar with how Marlin works internally to make sure upgrading the toolchain doesn't throw any wrenches into anything, but at least it doesn't complain about the platform.

Additional context

Other than the added ARM64 host support I think this would be similar in spirit to #26585 ?

@thurask thurask added the T: Feature Request Features requested by users. label Jan 7, 2024
@ellensp
Copy link
Contributor

ellensp commented Jan 8, 2024

you can upgrade to the following without code changes.

platform = [email protected]
platform_packages = framework-arduinoststm32@~4.20500

but I have not tested beyond compiling.

Beyond that, requires research and code changes.

@thisiskeithb
Copy link
Member

We’d like to update all platforms & toolchains to latest versions, but it’s a slow process, especially for boards/variants that need code updates.

@ellensp
Copy link
Contributor

ellensp commented Jan 11, 2024

Want to try something? Using current bugfix.

STM32H723VG ONLY
Latest [email protected] with latest [email protected]

It builds, but I cant test it on real hardware. (built on Ubuntu 22.04.3 LTS on a AMD chip, no idea if its available for ARM64)
You do get a warning "warning: .pio/build/STM32H723VG_btt/firmware.elf has a LOAD segment with RWX permissions"

This is a very minimal config at this stage.

If this boots, try a real config see if it find any other issues

Diff removed, in favor of a PR

@thisiskeithb
Copy link
Member

You do get a warning "warning: .pio/build/STM32H723VG_btt/firmware.elf has a LOAD segment with RWX permissions"

See d3f8049 for more info on this.

You’d add -Wl,--no-warn-rwx-segment to STM32H723VG_btt’s build_flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Build / Toolchain T: Feature Request Features requested by users.
Projects
None yet
Development

No branches or pull requests

3 participants