Closed maxgerhardt closed 4 years ago
This is a correct behavior. If you disable archiving per library, we will not archive it. But! The framework will be archived. However, if you disable archiving globally per project, we will disable archiving for frameworks and libraries.
Is this bad behaviour? :(
Has this always been the behaviour? Because otherwise I think the library's author would have noticed that a basic blinky isn't working and would have written something to make people add lib_archive = no
to their platformio.ini
. I'll retest with a PIO 3.x version to check.
Is this bad behaviour? :(
Not per-se but then the library cannot specify that needed option for the whole project to make it work.
Has this always been the behaviour?
Yes, original behavior sine we introduced this configuration option.
Has this always been the behaviour?
Yes, original behavior sine we introduced this configuration option.
Doesn't this mean that https://github.com/platformio/platform-ststm32/issues/237 / https://github.com/stm32duino/STM32FreeRTOS/issues/17 were never really fixed?
Hi @maxgerhardt @kzyapkov I'm not completely sure when this behavior was introduced, but I cannot reproduce the issue with the latest platformio-core
. It looks like it was fixed in https://github.com/platformio/platformio-core/commit/59e1c8872680bd2c8af01471f3351707228f2c2c . Please upgrade via pio upgrade --dev
and try again. Thanks!
pio upgrade --dev
broke it even with lib_archive = no
in platformio.ini. I could not figure out how to rever to to the release, so after a complete reinstall of all platformio components it works again. This is my config:
[env:nucleo_l476rg]
platform = ststm32
board = nucleo_l476rg
framework = arduino
monitor_speed = 115200
lib_archive = no
build_flags =
-Wl,-u,_printf_float,-u,_scanf_float
lib_deps =
Adafruit BMP280 Library
Adafruit TSL2561
Adafruit Unified Sensor
STM32duino FreeRTOS
STM32duino HTS221
pio --version
ststm32
dev-platform? pio platform show ststm32
PlatformIO, version 4.2.1
output slightly clipped:
$ pio platform show ststm32
ststm32 ~ ST STM32
==================
...
Version: 6.0.0
Home: http://platformio.org/platforms/ststm32
Repository: https://github.com/platformio/platform-ststm32.git
Vendor: http://www.st.com/web/en/catalog/mmc/FM141/SC1169?sc=stm32
License: Apache-2.0
Frameworks: arduino, cmsis, libopencm3, mbed, spl, stm32cube, zephyr
I did rm -rf ~/.platformio
, removed the VSCode extention and reinstalled all components anew, so all versions should be "latest stable".
It looks that you have outdated ST STM32 dev-platform. That was the problem.
do not work for me too
pio upgrade --dev
Please wait while upgrading PlatformIO ...
PlatformIO has been successfully upgraded to 4.3.0
Release notes: https://docs.platformio.org/en/latest/history.html
pio --version
PlatformIO, version 4.3.0
pio platform show ststm32
ststm32 ~ ST STM32
==================
The STM32 family of 32-bit Flash MCUs based on the ARM Cortex-M processor is designed to offer new degrees of freedom to MCU users. It offers a 32-bit product range that combines very high performance, real-time capabilities, digital signal processing, and low-power, low-voltage operation, while maintaining full integration and ease of development.
Version: 6.0.0
Home: http://platformio.org/platforms/ststm32
Repository: https://github.com/platformio/platform-ststm32.git
Vendor: http://www.st.com/web/en/catalog/mmc/FM141/SC1169?sc=stm32
License: Apache-2.0
Frameworks: arduino, cmsis, libopencm3, mbed, spl, stm32cube, zephyr
pio platform update
Platform Atmel AVR
--------
Updating atmelavr @ 2.0.0 [Up-to-date]
Updating toolchain-atmelavr @ 1.50400.190710 [Up-to-date]
Updating framework-arduino-avr @ 5.0.0 [Up-to-date]
Updating tool-avrdude @ 1.60300.190424 [Up-to-date]
Platform Espressif 8266
--------
Updating espressif8266 @ 2.3.3 [Up-to-date]
Updating toolchain-xtensa @ 2.40802.191122 [Up-to-date]
Updating framework-arduinoespressif8266 @ 3.20603.200130 [Up-to-date]
Updating tool-esptool @ 1.413.0 [Up-to-date]
Updating tool-esptoolpy @ 1.20800.0 [Up-to-date]
Updating tool-mkspiffs @ 1.200.0 [Up-to-date]
Platform ST STM32
--------
Updating ststm32 @ 6.0.0 [Up-to-date]
Updating toolchain-gccarmnoneeabi @ 1.70201.0 [Up-to-date]
Updating framework-arduinoststm32 @ 3.10700.191028 [Up-to-date]
Updating tool-stm32duino @ 1.0.1 [Up-to-date]
Updating tool-openocd @ 2.1000.190707 [Up-to-date]
Updating tool-dfuutil @ 1.9.200310 [Up-to-date]
cat platformio.ini
[env]
framework = arduino
lib_extra_dirs = ../../../arduino/sketchbook/libraries/
monitor_speed = 115200
[env:nucleo_l476rg]
platform = ststm32
board = nucleo_l476rg
build_flags = -DARDUINO_ARCH_STM32 -std=c++11 -fexceptions
lib_ignore =
ArduinoSTL
FreeRTOS
lib_archive = no
Sorry for the issue. We have fixed in https://github.com/platformio/platformio-core/commit/d32312e7386c1e59c7c2f841f1db1c7a60364268
Could you re-test with pio upgrade --dev
?
Now is OK Thanks!
Thanks! We will release PIO Core 4.3.1 soon. Thanks for the report!
PlatformIO Core 4.3.1 is out! Please upgrade via pio upgrade --dev
.
Solution
The solution is to set lib_archive option in
platformio.ini
tono
:Configuration
Operating system: Windows 10 x64
PlatformIO Version (
platformio --version
):PlatformIO, version 4.2.2a1
Description of problem
The FreeRTOS for STM32Duino library uses the
libArchive: false
option its library.json file to prevent being archived and thus not getting to hook the weakSVCHandler
call which is needed by FreeRTOS to execute the task-switches in a privilged mode. The library is still being built as an archive anyways though and thus execution of the resulting firmware fails (brokenvTaskDelay
, semaphores etc)The archive command is
However, by adding
lib_archive = no
the desired behaviour is restored and the final linker command contains all object files of the projectShouldn't the behavior be the same as when the library.json says
libArchive: false
? This prevents these libraries from correctly building and executing, and needing special options in the user'splatformio.ini
.Steps to Reproduce
pio init -b bluepill_f103c8_128k
platformio.ini
from belowActual Results
No blinkink LED (PC13).
Expected Results
Blinking LED. Works when uncommenting
lib_archive = no
.If problems with PlatformIO Build System:
The content of
platformio.ini
:Source file to reproduce issue:
Additional info