Skip to content
Elisson Araújo edited this page Nov 22, 2024 · 1 revision

First Upload Setup

After install VScode and platformIO.

In Windows:

  1. Install ST-LINK USB Driver.

In linux:

With terminal open

  1. Run command sudo gedit /etc/udev/rules.d/99-platformio-udev.rules.
  2. Append in file open in gedit the lines below, save and exit the gedit.
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374a", \
    MODE:="0666", \
    SYMLINK+="stlinkv2-1_%n"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \
    MODE:="0666", \
    SYMLINK+="stlinkv2-1_%n"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374e", \
    MODE:="0666", \
    SYMLINK+="stlinkv3_%n"
  1. Now run commands sequence below.
sudo usermod -a -G dialout $USER
sudo usermod -a -G plugdev $USER
sudo service udev restart

In Mac:

No required additional drivers.

Know issues

Upload port not found

Error: Please specify `upload_port` for environment or use global `--upload-port` option

This error occurs when the System was not configured properly, as shown in the previous topic, for upload or the usb cable was connected to the port that does not support writing the board, the port for write code in board is located on the back of the robot.

Serial monitor does not show data

This error occurs due to sync problems with the card or problems with permission to access the port. If it occurs with your PC during the test, re-send the firmware to board and open the serial monitor without disconnecting the usb cable between PC and the robot.

USB port access denied

Bug that can occur in linux when platformIO is not allowed to write to or read from a device connected via the usb port. To solve the permission problem with the terminal open, run the command sudo apt-get chmod 777 port name.