Not uploading using Arduino addon on VSC

Hi, all.

I’m trying upload a sketch using Aruino addon on vscode and the firmware is not uploading. No error is output. Boards are installed and configure. The sketch is a simple LED blinking.


    "sketch": "rak3172_arduino.ino",
    "configuration": "debug=l0,supportat=1,supportlora=1,supportAS923=2,supportAU915=1,supportCN470=2,supportCN779=2,supportEU433=2,supportEU868=2,supportKR920=2,supportIN865=2,supportUS915=2,supportRU864=2,supportLA915=1",
    "board": "rak_rui:stm32:WisDuoRAK3172EvaluationBoard",
    "output": "build",
    "port": "/dev/ttyUSB0"

Upload output em using “Arduino: upload”

[Starting] Uploading sketch 'rak3172_arduino.ino'
Please see the build logs in output path: /home/mario/codigo/31RA/rak3172_arduino/build
Sketch uses 133864 bytes (66%) of program storage space. Maximum is 200704 bytes.
Global variables use 29152 bytes (59%) of dynamic memory, leaving 19488 bytes for local variables. Maximum is 48640 bytes.
IntelliSense configuration already up to date. To manually rebuild your IntelliSense configuration run "Ctrl+Alt+I"
[Done] Uploading sketch 'rak3172_arduino.ino'

With this output, I believe upload is ok, but the code in the board is a old one test I did (using STM programmer).

I have a error when trying upload using “Arduino CLI: upload”

[Starting] Uploading using Arduino CLI sketch 'rak3172_arduino.ino'
Please see the build logs in output path: /home/mario/codigo/31RA/rak3172_arduino/build
Error: unknown flag: --build-path
  arduino-cli upload [flags]

  /home/mario/.vscode/extensions/vsciot-vscode.vscode-arduino-0.6.0-linux-x64/assets/platform/linux-x64/arduino-cli/ upload /home/user/Arduino/MySketch

      --board-options strings        List of board options separated by commas. Or can be used multiple times for multiple options.
      --discovery-timeout duration   Max time to wait for port discovery, e.g.: 30s, 1m (default 1s)
  -b, --fqbn string                  Fully Qualified Board Name, e.g.: arduino:avr:uno
  -h, --help                         help for upload
      --input-dir string             Directory containing binaries to upload.
  -i, --input-file string            Binary file to upload.
  -p, --port string                  Upload port address, e.g.: COM3 or /dev/ttyACM2
  -m, --profile string               Sketch profile to use
  -P, --programmer string            Programmer to use, e.g: atmel_ice
  -l, --protocol string              Upload port protocol, e.g: serial
  -t, --verify                       Verify uploaded binary after the upload.

Global Flags:
      --additional-urls strings   Comma-separated list of additional URLs for the Boards Manager.
      --config-file string        The custom config file (if not specified the default will be used).
      --format string             The output format for the logs, can be: text, json, jsonmini, yaml (default "text")
      --log-file string           Path to the file where logs will be written.
      --log-format string         The output format for the logs, can be: text, json
      --log-level string          Messages with this level and above will be logged. Valid levels are: trace, debug, info, warn, error, fatal, panic
      --no-color                  Disable colored output.
  -v, --verbose                   Print the logs on the standard output.

unknown flag: --build-path
[Warning] Failed to generate IntelliSense configuration.
[Error] Uploading using Arduino CLI sketch 'rak3172_arduino.ino': Exit with code=1

I didn’t find anything on documentations or other forums.

Thank you for your time!


After many times testing, I only can uploading if I run in terminal AT+BOOT. After this, device enter in BOOT MODE for upload. I put device in boot mode using boot PIN. Using pin to boot mode, arduino can’t upload. But, it works perfectly with STM programmer. Arduino for 3172+RUI only upload if run AT+BOOT.

How can solve this?

Thank you!

BOOT0 pin forces the MCU into STM bootloader mode, which works only with the STM32CubeProgrammer.
For uploading from Arduino you MUST NOT use BOOT0 pin.

What RUI3 version are you using? Arduino uploader should put the device into RUI3 bootloader mode automatically, but I have seen you problem occasionally. If it happens, AT+BOOT is the best solution.