This is a framework for serving connected JLink board as service. (Currently only designed for Linux platform)
When a USB device is plugged in, jlink_dock automatically starts a Docker
container and initiates a service inside the container. This service enables
the user to flash the connected JLink board by uploading an ELF file and a
script to a REST API. jlink_dock then flashes the board with the ELF file and
runs the uploaded script after flashing.
To use this tool there are some preparation needed:
-
Run
udevadm monitor -pon host, and connect jlink board to it, and note down theID_SERIAL_SHORTand the type of the board. -
Create a sqlite database using the following command, then update
/path/to/jlink\_dock.sh:6for correct path to database:sqlite3 /path/to/board.db "create table stm32(serial NCHAR(12) primary key, type NCHAR(11));" -
Insert the SERIAL and Type mapping to the database created in prior step.
-
Put
51-jlink_dock.rulesinto/etc/udev/rules.d, and update/path/to/jlink_dock.shto the correct value. -
Make the udev rules to take effort, for example using the following command.
udevadm control --reload # Reload udev rules
udevadm trigger # Re-trigger the udev eventsNow for each of jlink board connected to the host, there will be a container started to it.