Skip to content

Firmware

Dilshan R Jayakody edited this page May 22, 2021 · 4 revisions

Building the firmware

Following software and hardware components are necessary to compile the programmable timer firmware:

This firmware is developed in a Linux environment, and therefore it is recommended to use a Linux-based system to build the firmware.

After the installation of the above software components, issue the following commands to compile the firmware:

  cd firmware
  make

After the successful compilation, the uart-prog-timer.ihx file may need to generate in the firmware directory.

The compiled firmware files are also available to download at the release section of this project repository.

Flash firmware

Due to the lack of the RESET pin of the STM8S001J3M MCU, the firmware uploading process is slightly different from the usual STM8 flashing procedure. To minimize the complexity, we recommend soldering and flashing the MCU before installing any other component to the PCB.

To flash the firmware attach ST-LINK/V2 USB programmer to the J201 using a 4-pin pogo probe cable.

Firmware upload ports

If the STM8S001J3M chip is not flash with this firmware before, issue the following commands to update the option bytes of the MCU:

  make fuse
  make flash-fuse

To flash the firmware, issue the following command:

  make flash

It is vital to issue the above commands within few seconds of the ST-LINK power-up. The MCU leaves the programming mode after 4 to 5 seconds from the power-up.

If the PCB is already populated and the firmware update fails, cut-and-open the JP201 jumper and flash the MCU. After the firmware update, close the JP201 jumper again.

Clone this wiki locally