Description
Describe the bug
When deploying a sketch to the Swan (STM32L4xx), the first deploy seems to hang in the bootloader and the sketch will not load. If a redeploy is attempted, then the sketch will load as expected. This reoccurs every time a change is made to the sketch code.
To Reproduce
Use the Blink
example from the Arduino Examples folder.
Steps to reproduce the behavior:
- Using the Swan (or perhaps any Generic STM32L4xx)
- Flash the Blink app using the Arduino IDE or VSCode
- See error (no blinking)
Expected behavior
I would expect the device to start the sketch once it has been programmed.
Desktop (please complete the following information):
- OS: Verified on Mac, Linux and Windows
- Arduino IDE version: 1.8.13
- STM32 core version: 2.0.0 (@ master)
- Tools menu settings if not the default: C Runtime Library - Newlib Nano (default), Debug Symbols - Enabled (-g), Optimize - Debug (-Og), USB Speed - Low/Full Speed, USB Support - CDC (generic
Serial
supercede U(S)ART), U(S)ART support: - Enabled (genericSerial
), - Upload method: SWD
Board (please complete the following information):
- Name: Generic STM32L4 series
- Hardware Revision: Swan R5
Additional context
Modifying line 5070
of ~/.arduino15/packages/STMicroelectronics/hardware/stm32/2.0.0/boards.txt
, to read:
GenL4.menu.upload_method.swdMethod.upload.protocol=10
opposed to the original:
GenL4.menu.upload_method.swdMethod.upload.protocol=0
... seems to have fixed the problem.
Can you explain what is happening and explain if there is a better and/or more targeted option for the Swan?