platform-ststm32
platform-ststm32 copied to clipboard
Add board Arduino Giga R1 Wifi
Please add board 'Arduino Giga R1 Wifi' to the boards support list: MCU: STM32H747XIH6, Cortex M7 480mhz
Mucho appreciated.
I've created a test project for the Arduino GIGA here
Thanks to @maxgerhardt for the test-project for the Portenta X8, which was my starting point.
This may help until it's officially supported.
@Haschtl The fix_link.py is unnecessary if you change builder/frameworks/arduino/mbed-core/arduino-core-mbed.py to recognize the giga the same way it recognizes the portenta h7.
The issue with SerialRPC is due to the default ldf mode being not good enough. If you set lib_ldf_mode to deep+, it will not be needed. Patch attached
Hi Guys,
I have put in two PRs to add the board:
https://github.com/platformio/platform-ststm32/pull/735
https://github.com/platformio/builder-framework-arduino-core-mbed/pull/9
Cheers
Andy
What is actually the status? I see the PRs were closed but I think without being merged.
It is all a bit on hold.
The Arduino guys are currently working on a different way of differentiating between various STM32h7 boards, once this is done I will have another look at getting it into platformio.
strange how it was working with 3.3.1 ide with 12/14/23 development version https://github.com/platformio/platformio-core/archive/develop.zip
now with 3.3.2 and today's development version it is no longer present as a board type Is there a daily archive of the development version so I can download the 12/14 version?
Maybe I will just buy a portenta lite since it has a smaller foot print and has a better connector for 160 port pins of the stm32h747 and it is only a few $ more
It is all a bit on hold.
The Arduino guys are currently working on a different way of differentiating between various STM32h7 boards, once this is done I will have another look at getting it into platformio.
Two new PRs to add the board in:
https://github.com/platformio/builder-framework-arduino-core-mbed/pull/10
https://github.com/platformio/platform-ststm32/pull/747
Here is a zip with the changes is as well, basically the files go into the same location in the .platformio
folder.
Probably best to back up the .py files before copying over them!
To check you are updating the correct version look in /.platformio/packages/framework-arduino-mbed/variants
You should see GENERIC_STM32H747_M4
and GIGA
. If you don't then this will not work!
It would not work if I used my existing project. It worked fine when I created a new project. Thanks for the files. I just found the same files in .platformio/platforms/ststm32 and overwrote them with files from your zip file.
only compile problem I had was HSE_VALUE was different in C:\Users\david.platformio\packages\framework-arduino-mbed\variants\GIGA\mbed_config.h and C:\Users\david.platformio\packages\framework-arduino-mbed\cores\arduino\mbed\targets\TARGET_STM\TARGET_STM32H7\STM32Cube_FW\stm32h7xx_hal_conf.h
I changed the 2nd file to match the first. I assume this is the issue they are trying to fix as you mentioned above.
here are compiler warnings:
In file included from C:\Users\david.platformio\packages\framework-arduino-mbed\variants\GIGA/pinmode_arduino.h:23:0,
from C:\Users\david.platformio\packages\framework-arduino-mbed\cores\arduino/Arduino.h:26,
from C:\Users\david.platformio\packages\framework-arduino-mbed\cores\arduino/mbed.h:4,
from src\zsharedheader/os.h:16,
from src\init\StartUsbTask.c++:9:
C:\Users\david.platformio\packages\framework-arduino-mbed\variants\GIGA/mbed_config.h:56:0: warning: "HSE_VALUE" redefined
#define HSE_VALUE 16000000
// set by target:GIGA
In file included from C:\Users\david.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/STM32H7xx_HAL_Driver/stm32h7xx_hal.h:30:0, from src\zsharedheader/mytypes.h:13, from src\init\StartUsbTask.c++:2: C:\Users\david.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/stm32h7xx_hal_conf.h:109:0: note: this is the location of the previous definition #define HSE_VALUE 25000000 //(25000000UL) /*!< Value of the External oscillator in Hz */
after it compiled when I clicked on debug and then run button. It compiled without error but it never loaded the program with stlink.
debug console was blank and terminal had gdb> prompt and vscode hung with bargraph continuing to run on the debug window. I let it run for a couple of minutes.
I closed visual studio and tried debugging again and then it loaded my program and stopped at a breakpoint in C:\Users\david.platformio\packages\framework-arduino-mbed\cores\arduino\main.cpp I could then step through the initialization.
So its almost there Let be know if you want me to do more tests or want some log files
For existing code you need to change the platformio.ini
platform = ststm32
board = giga_r1_m4
framework = arduino
For the errors you should not be changing any source files. If you create a new project and build it it gives you those errors with the default main.cpp?
m7 or m4?
it's for the m7.
I renamed the .platformio directory repatched it
running simple hello world application I am back to debugger not starting
this is log from terminal
- Executing task: C:\Users\david.platformio\penv\Scripts\platformio.exe debug
Preparing firmware for debugging... Processing giga_r1_m7 (platform: ststm32; board: giga_r1_m7; framework: arduino)
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/giga_r1_m7.html
PLATFORM: ST STM32 (17.2.0) > Arduino Giga R1 (M7 core)
HARDWARE: STM32H747XIH6 480MHz, 511.35KB RAM, 768KB Flash
DEBUG: Current (stlink) External (cmsis-dap, jlink, stlink)
PACKAGES:
- framework-arduino-mbed @ 4.0.10
- toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1) LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ soft Found 42 compatible libraries Scanning dependencies... No dependencies Building in debug mode
bunch of compiles main.cpp and library
Linking .pio\build\giga_r1_m7\firmware.elf Checking size .pio\build\giga_r1_m7\firmware.elf Advanced Memory Usage is available via "PlatformIO Home > Project Inspect" RAM: [= ] 8.7% (used 45400 bytes from 523624 bytes) Flash: [= ] 12.1% (used 95456 bytes from 786432 bytes) Building .pio\build\giga_r1_m7\firmware.bin =================================================================== [SUCCESS] Took 11.39 seconds =================================================================== Reading symbols from C:\Users\david\Documents\adevel\private\giga\platformio\hello world.pio\build\giga_r1_m7\firmware.elf...done. (gdb)
Then it just hangs
I fixed the HSE_VALUE warning by including mbed.h before including stm32h7xx_hal.h"
Also when I call __HAL_RCC_GPIOA_CLK_ENABLE(); I get a warning
In file included from C:\Users\david.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/STM32H7xx_HAL_Driver/stm32h7xx_hal_rcc.h:29:0,
from C:\Users\david.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/stm32h7xx_hal_conf.h:398,
from C:\Users\david.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/STM32H7xx_HAL_Driver/stm32h7xx_hal.h:30,
from src\zsharedheader/mytypes.h:13,
from src\main.cpp:2:
src\main.cpp: In function 'void MX_GPIO_Init()':
C:\Users\david.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/STM32H7xx_HAL_Driver/stm32h7xx_hal_rcc.h:1430:48: warning: conversion to void will not access object of type 'volatile uint32_t {aka volatile long unsigned int}'
UNUSED(tmpreg);
C:\Users\david.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/STM32H7xx_HAL_Driver/stm32h7xx_hal_def.h:70:27: note: in definition of macro 'UNUSED'
#define UNUSED(x) ((void)(x))
^
src\main.cpp:147:3: note: in expansion of macro '__HAL_RCC_GPIOA_CLK_ENABLE'
__HAL_RCC_GPIOA_CLK_ENABLE();
I suggest changing C:\Users\david.platformio\packages\framework-arduino-mbed\cores\arduino\mbed\targets\TARGET_STM\TARGET_STM32H7\STM32Cube_FW\STM32H7xx_HAL_Driver\stm32h7xx_hal_rcc.h
#define __HAL_RCC_GPIOA_CLK_ENABLE() do {
__IO uint32_t tmpreg;
SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOAEN);
/* Delay after an RCC peripheral clock enabling */
tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOAEN);
UNUSED(tmpreg);
} while(0)
to
#define __HAL_RCC_GPIOA_CLK_ENABLE() do {
SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOAEN);
SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOAEN);
} while(0)
which provides the delay and does not generate a warning.
Hi @dav322
I just installed a new .platformio, patched the files, created a new giga m7 project.
Everything builds fine.
Processing giga_r1_m7 (platform: ststm32; board: giga_r1_m7; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/giga_r1_m7.html
PLATFORM: ST STM32 (17.2.0) > Arduino Giga R1 (M7 core)
HARDWARE: STM32H747XIH6 480MHz, 511.35KB RAM, 768KB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, jlink, stlink)
PACKAGES:
- framework-arduino-mbed @ 4.0.10
- tool-dfuutil-arduino @ 1.11.0
- toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 42 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio/build/giga_r1_m7/src/main.cpp.o
Generating LD script .pio/build/giga_r1_m7/cpp.linker_script.ld
Compiling .pio/build/giga_r1_m7/FrameworkArduinoVariant/pure_analog_pins.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduinoVariant/variant.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/Interrupts.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/Serial.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/Tone.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/USB/PluggableUSBDevice.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/USB/USBCDC.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/USB/USBSerial.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/WMath.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/abi.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/api/CanMsg.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/api/CanMsgRingbuffer.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/api/Common.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/api/IPAddress.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/api/PluggableUSB.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/api/Print.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/api/Stream.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/api/String.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/arm_hal_random.c.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/as_mbed_library/variant.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/itoa.c.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/main.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/mbed/platform/cxxsupport/mstd_mutex.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/pinToIndex.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/random_seed.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/timer.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/wiring.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/wiring_analog.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/wiring_digital.cpp.o
src/main.cpp: In function 'void setup()':
src/main.cpp:8:7: warning: unused variable 'result' [-Wunused-variable]
int result = myFunction(2, 3);
^~~~~~
Compiling .pio/build/giga_r1_m7/FrameworkArduino/wiring_pulse.cpp.o
Compiling .pio/build/giga_r1_m7/FrameworkArduino/wiring_shift.cpp.o
Archiving .pio/build/giga_r1_m7/libFrameworkArduinoVariant.a
Indexing .pio/build/giga_r1_m7/libFrameworkArduinoVariant.a
Archiving .pio/build/giga_r1_m7/libFrameworkArduino.a
Indexing .pio/build/giga_r1_m7/libFrameworkArduino.a
Linking .pio/build/giga_r1_m7/firmware.elf
Checking size .pio/build/giga_r1_m7/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 8.7% (used 45400 bytes from 523624 bytes)
Flash: [= ] 12.0% (used 94056 bytes from 786432 bytes)
Building .pio/build/giga_r1_m7/firmware.bin
================================================================================================================================ [SUCCESS] Took 5.84 seconds ================================================================================================================================
* Terminal will be reused by tasks, press any key to close it.
With jlink:
Debugging with PIO debugger works fine.
Debugging with cortex-debug works fine.
Can you attach the main.cpp here you are using and your platformio.ini
I rebooted computer and it is starting the debugger again with stlink. Not sure why that had any effect.
When I first got the GIGA I had problems with my STLINK V2 and platformio, it worked fine from the STM IDE though.
So I switched to a jlink and that seemed to work much more reliably.
I also found using cortex-debug to be much more reliable than the platformio debugger as well, especially when debugging the M4.
so far it work great, except the uploading to my Giga R1 controller doesnt work.
it goes to the how compiling proces, find the right com port - puts the GIGA R1 in bootloader mode than this:
Building in release mode Checking size .pio\build\giga_r1_m7\firmware.elf Advanced Memory Usage is available via "PlatformIO Home > Project Inspect" RAM: [== ] 19.7% (used 103264 bytes from 523624 bytes) Flash: [==== ] 36.6% (used 287728 bytes from 786432 bytes) Configuring upload protocol... AVAILABLE: cmsis-dap, dfu, jlink, mbed, stlink CURRENT: upload_protocol = dfu Looking for upload port... Auto-detected: COM3 Forcing reset using 1200bps open/close on port COM3 Waiting for the new upload port... Uploading .pio\build\giga_r1_m7\firmware.bin dfu-util 0.11-arduino4
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2021 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
No DFU capable USB device available *** [upload] Error 74 ========================================================================== [FAILED] Took 8.10 seconds ===
If you double click the reset button and then flash it does it work?
I'm guessing platformio isn't managing to get the Giga into dfu mode.
I have this same problem with the Arduino IDE with mine, sometimes it manages it sometimes it doesn't.
I gave up with DFU and use jtag which works fine.
I'm also guessing this is something that can't be fixed with the PRs I put in!
that is the weird thing, Platformio seems to activate dfu mode it self, after that it tries to find the port again and doesn't find it again. even when i first put the giga in dfu mode myself by double clicking the resetbutton it shows the exact same behaviour. but it seems like il have to learn how to use jtag.
I ran into the same problem when uploading. Figured it out by adding this line in the platformio.ini under the environment settings.
upload_command = arduino-cli upload --port=/dev/cu.usbmodem2101 -b arduino:mbed_giga:giga -i .pio/build/ArduinoMaster/firmware.bin
I can't remember where I saw this trick; you might have to play around with the port to get it working.
I hope it helps.
thanks that worked indeed, had to change
from: upload_command = arduino-cli upload --port=/dev/cu.usbmodem2101 -b arduino:mbed_giga:giga -i .pio/build/ArduinoMaster/firmware.bin
to
upload_command = arduino-cli upload --port=/dev/cu.usbmodem2101 -b arduino:mbed_giga:giga -i .pio/build/giga_r1_m7/firmware.bin
because of the new files used by the zip file from andrew.
Does the port change then when it is in DFU mode?
I'm really trying to get this to work but it's a little messy following this thread, and I'm not sure what to do really. Would anyone be so kind to post a little step by step guide to how to make this work?
I'm on a mac btw.
I'm really trying to get this to work but it's a little messy following this thread, and I'm not sure what to do really. Would anyone be so kind to post a little step by step guide to how to make this work?
I'm on a mac btw.
Have a look here: https://github.com/platformio/platform-ststm32/issues/702#issuecomment-1871959957
I did manage to install so I had the two folders GENERIC_STM32H747_M4 and GIGA in in /.platformio/packages/framework-arduino-mbed/variants
And I replaced the ststm32 folder with the one from your zip file.
But not sure what board to select when creating a platform.io project and what the platformio.ini file should be. For selecting a board neither the Giga or STM32H747XI shows up?
My platformio.ini file looks like this: platform = ststm32 board = giga_r1_m4 framework = arduino
But I get squiggly lines under ststm32 saying: File contains no section headers. file: '/Users/rubymainstage/projects/Arduino Projects/GigaTest2/platformio.ini', line: 12 'platform = ststm32\n'
Thank you very much for your help!
Den tis 12 mars 2024 kl 14:14 skrev AndrewCapon @.***>:
I'm really trying to get this to work but it's a little messy following this thread, and I'm not sure what to do really. Would anyone be so kind to post a little step by step guide to how to make this work?
I'm on a mac btw.
Have a look here: #702 (comment) https://github.com/platformio/platform-ststm32/issues/702#issuecomment-1871959957
— Reply to this email directly, view it on GitHub https://github.com/platformio/platform-ststm32/issues/702#issuecomment-1991625849, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6TB7AAKLUKNW3NHHZASHODYX35UBAVCNFSM6AAAAAAY5QFCEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJRGYZDKOBUHE . You are receiving this because you commented.Message ID: @.***>
When you create a project you should be able to select the giga M7 or M4, does that not work?
I reinstalled platform.io and did everything again and now the boards show, but there seem to be a problem when creating a new project with any of the Giga boards selected. I get this message:
Could not initialize project
PIO Core Call Error: "The following files/directories have been created in /Users/rubymainstage/projects/Arduino Projects/Test\ninclude - Put project header files here\nlib - Put project specific (private) libraries here\nsrc - Put project source files here\nplatformio.ini - Project Configuration File\nResolving giga_r1_m4 dependencies...\nAlready up-to-date.\nUpdating metadata for the vscode IDE...\n\n\nUserSideException: Processing giga_r1_m4 (platform: ststm32; board: giga_r1_m4; framework: arduino)\n--------------------------------------------------------------------------------\nVerbose mode can be enabled via -v, --verbose
option\nCONFIGURATION: https://docs.platformio.org/page/boards/ststm32/giga_r1_m4.html\nPLATFORM: ST STM32 (17.3.0) > Arduino Giga R1 (M4 core)\nHARDWARE: STM32H747XIH6 480MHz, 287.35KB RAM, 1MB Flash\nDEBUG: Current (cmsis-dap) External (cmsis-dap, jlink, stlink)\nPACKAGES: \n - framework-arduino-mbed @ 4.1.1 \n - tool-dfuutil-arduino @ 1.11.0 \n - toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1)\nLDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf\nLDF Modes: Finder ~ chain, Compatibility ~ soft\nFound 42 compatible libraries\nScanning dependencies...\nNo dependencies\nBuilding in release mode\nKeyError: 'tool-dfuutil':\n File "/Users/rubymainstage/.platformio/penv/lib/python3.11/site-packages/platformio/builder/main.py", line 173:\n env.SConscript("$BUILD_SCRIPT")\n File "/Users/rubymainstage/.platformio/packages/tool-scons/scons-local-4.6.0/SCons/Script/SConscript.py", line 609:\n return _SConscript(self.fs, *files, **subst_kw)\n File "/Users/rubymainstage/.platformio/packages/tool-scons/scons-local-4.6.0/SCons/Script/SConscript.py", line 279:\n exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)\n File "/Users/rubymainstage/.platformio/platforms/ststm32/builder/main.py", line 221:\n _upload_tool = '"%s"' % join(platform.get_package_dir(\n File "/Users/rubymainstage/.platformio/penv/lib/python3.11/site-packages/platformio/platform/_packages.py", line 32:\n pkg = self.get_package(name)\n File "/Users/rubymainstage/.platformio/penv/lib/python3.11/site-packages/platformio/platform/_packages.py", line 29:\n return self.pm.get_package(spec or self.get_package_spec(name))\n File "/Users/rubymainstage/.platformio/penv/lib/python3.11/site-packages/platformio/platform/_packages.py", line 21:\n owner=self.packages[name].get("owner"),\n========================== [FAILED] Took 1.39 seconds =========================="
This is my platformio.ini: [env:giga_r1_m7] platform = ststm32 board = giga_r1_m7 framework = arduino platform_packages = platformio/framework-arduino-mbed@^4.1.1
This is what I get when trying to build: Resolving giga_r1_m7 dependencies... Already up-to-date. Updating metadata for the vscode IDE... UserSideException: Processing giga_r1_m7 (platform: ststm32; board: giga_r1_m7; framework: arduino)
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/giga_r1_m7.html
PLATFORM: ST STM32 (17.3.0) > Arduino Giga R1 (M7 core)
HARDWARE: STM32H747XIH6 480MHz, 511.35KB RAM, 768KB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, jlink, stlink)
PACKAGES:
- framework-arduino-mbed @ 4.1.1
- tool-dfuutil-arduino @ 1.11.0
- toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1) LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ soft Found 42 compatible libraries Scanning dependencies... No dependencies Building in release mode KeyError: 'tool-dfuutil': File "/Users/rubymainstage/.platformio/penv/lib/python3.11/site-packages/platformio/builder/main.py", line 173: env.SConscript("$BUILD_SCRIPT") File "/Users/rubymainstage/.platformio/packages/tool-scons/scons-local-4.6.0/SCons/Script/SConscript.py", line 609: return _SConscript(self.fs, *files, **subst_kw) File "/Users/rubymainstage/.platformio/packages/tool-scons/scons-local-4.6.0/SCons/Script/SConscript.py", line 279: exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals) File "/Users/rubymainstage/.platformio/platforms/ststm32/builder/main.py", line 221: _upload_tool = '"%s"' % join(platform.get_package_dir( File "/Users/rubymainstage/.platformio/penv/lib/python3.11/site-packages/platformio/platform/_packages.py", line 32: pkg = self.get_package(name) File "/Users/rubymainstage/.platformio/penv/lib/python3.11/site-packages/platformio/platform/_packages.py", line 29: return self.pm.get_package(spec or self.get_package_spec(name)) File "/Users/rubymainstage/.platformio/penv/lib/python3.11/site-packages/platformio/platform/_packages.py", line 21: owner=self.packages[name].get("owner"), ========================== [FAILED] Took 0.99 seconds ==========================
(Deleted a comment that had wrong info)
Actually, I misread your config - unless you have locally patched in some of the platformio changes, your env is not enough. In particular, it does not have the patch to use tool-dfu-arduino for giga on arduino, so it's trying to use tool-dfu.
If you instead change platform = stmst32 to platform = https://github.com/dberlin/platform-ststm32.git#develop
I would bet it will just work - i have incorporated all the platform needed patches on that branch[1], at least as of 3 weeks ago :)
[1] You are missing at least this patch https://github.com/platformio/platform-ststm32/commit/c456dc022e772f770c4c6e0362411f980b4343c7
But you would also need this to fix how dfu-util works in newer versions, depending on what usb devices you hvae: https://github.com/platformio/platform-ststm32/commit/6d78ed282feda83ca652272ca2acc1a0526a5c1b
I will clean this patch up, i did not notice it reformatted all the python code before i committed it
Holy cow it worked after changing the platform = https://github.com/dberlin/platform-ststm32.git#develop and adding platform_packages = tool-dfuutil@~1.9!!!
Thousand thanks!! I been trying to get this to work for 15 hours straight, I was 10 minutues from jumping from the balcony.
Holy cow it worked after changing the platform = https://github.com/dberlin/platform-ststm32.git#develop and adding platform_packages = tool-dfuutil@~1.9!!!
Thousand thanks!! I been trying to get this to work for 15 hours straight, I was 10 minutues from jumping from the balcony.
Happy to help.
Do you actually need the tool-dfuutil? If so, it means they still havent' gotten tool-dfuutil out for native mac, which would be weird.
No you're right, it works with that line removed to.