HI All, I know this is an old topic, but just thought I would try the script linked above to convert my stm32cubeide project to platformio. I am using the ā¦pio script. WHen I activate a build I get the following:
Processing genericSTM32F405RG (platform: ststm32; board: genericSTM32F405RG; framework: stm32cube)
------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
/home/bmentink/Documents/PlatformIO/Projects/MESC_Firmware_for_conversion_platformio/MESC_F405RG/setup_cubemx_env_auto.py:129: SyntaxWarning: invalid escape sequence '\$'
ld_script = re.search('\$\{workspace_loc:/\$\{ProjName\}/(.+)\}', ld_script_entry)
SETUP_CUBEMX: Using the following source directories: 'Core, MESC_RTOS/Common, MESC_RTOS/TTerm, USB_DEVICE, MESC_RTOS/Tasks, Drivers, MESC_RTOS/MESC, Middlewares, MESC_Common'
SETUP_CUBEMX: Using the following build flags: '-mthumb, -mcpu=cortex-m4, -mfpu=fpv4-sp-d16, -mfloat-abi=hard'
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/genericSTM32F405RG.html
PLATFORM: ST STM32 (19.2.0) > STM32F405RG (128k RAM. 1024k Flash)
HARDWARE: STM32F405RGT6 168MHz, 128KB RAM, 1MB Flash
DEBUG: Current (stlink) External (blackmagic, jlink, stlink)
PACKAGES:
- framework-stm32cubef4 @ 1.28.1
- tool-ldscripts-ststm32 @ 0.2.0
- toolchain-gccarmnoneeabi @ 1.140201.0 (14.2.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 59 compatible libraries
Scanning dependencies...
Dependency Graph
|-- STM32_USB_Device_Library-CDC
|-- STM32_USB_Device_Library-Core
|-- STM32_USB_Device_Library-CompositeBuilder
Building in release mode
*** [.pio/build/genericSTM32F405RG/firmware.elf] UserError `SyntaxError `invalid syntax (<string>, line 1)' trying to evaluate `${workspace_loc:/${ProjName}'' trying to evaluate `${_stripixes(LIBLINKPREFIX, LIBS, LIBLINKSUFFIX, LIBPREFIXES, LIBSUFFIXES, __env__, LIBLITERALPREFIX)}'
================================================================ [FAILED] Took 0.50 seconds ================================================================
There is two errors, it starts with a syntax escape error (maybe a windows/linux thing?) I am on Linux arm64.
At the end is another syntax error ā¦
I did not do the āplatformio initā step, as it was an existing stm32cubeide project, is that the issue? I have platformio in VSC so compiled with that, I would have though that would do an āInitā
Also in the python editor in VSC I see lots of errors in the scrip, probably nothing though:
import SCons.Errors
import xml.etree.ElementTree as ET
import re
Import("env")
project_dir = env["PROJECT_DIR"]
SCons.Errors could not be resolved, also could not find āImportā or āenvā
EDIT: seemed to have fixed the first error by adding an ārā like:
⦠re.search(rā ā¦
The second error, I think is the same line ⦠no ideaās though
Maybe the script needs to change with the latest python?
@ jbaumann Do you have any idea regarding the python error. thanks.