Docker image for JelmerT/cc2538-bsl
-
This project allows to flash a TI SoC with a single line of code.
-
Firmware files are supported as URL or local file, in native (bin/hex) and zipped format.
$ docker run --rm --device /dev/ttyUSB0:/dev/ttyUSB0 -e FIRMWARE_URL=https://github.com/Koenkk/Z-Stack-firmware/raw/master/coordinator/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_launchpad_coordinator_20230507.zip ckware/ti-cc-tool -ewv -p /dev/ttyUSB0 --bootloader-sonoff-usb
This example expects the file CC1352P2_CC2652P_launchpad_coordinator_20230507.hex
in the local directory
$ docker run --rm --device /dev/ttyUSB0:/dev/ttyUSB0 -v CC1352P2_CC2652P_launchpad_coordinator_20230507.hex:/firmware.hex -e FIRMWARE_FILE=/firmware.hex ckware/ti-cc-tool -ewv -p /dev/ttyUSB0 --bootloader-sonoff-usb
-
Create a
docker-compose.yml
for your environment -
Run
docker-compose run --rm ti-cc-tool
---
services:
ti-cc-tool:
image: "ckware/ti-cc-tool"
environment:
FIRMWARE_URL: "https://github.com/Koenkk/Z-Stack-firmware/raw/master/coordinator/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_launchpad_coordinator_20230507.zip"
devices:
- "/dev/ttyUSB0:/dev/ttyUSB0"
command: [ "-ewv", "-p", "/dev/ttyUSB0", "--bootloader-sonoff-usb" ]
---
services:
ti-cc-tool:
image: "ckware/ti-cc-tool"
devices:
- "/dev/ttyUSB0:/dev/ttyUSB0"
environment:
FIRMWARE_FILE: "/firmware.hex"
volumes:
- "./CC1352P2_CC2652P_launchpad_coordinator_20230507.hex:/firmware.hex"
command: [ "-ewv", "-p", "/dev/ttyUSB0", "--bootloader-sonoff-usb" ]
-
Required: Docker
-
Optional: Docker Compose
The Docker Compose documentation contains a comprehensive guide explaining several install options. On recent debian-based systems, Docker Compose may be installed by calling
$ sudo apt-get install docker-compose-plugin
Problem: The command terminates with an error message similar to
could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
The cause is most likely that the user in the container lacks permission to use the USB device. The solution is then to permit the container user to access the device. To add the user to the device’s group, add --group-add "$(stat -c %g /dev/ttyUSB0)"
to the docker arguments. Full Example:
$ docker run --rm --device /dev/ttyUSB0:/dev/ttyUSB0 --group-add "$(stat -c %g /dev/ttyUSB0)" -e FIRMWARE_URL=https://github.com/Koenkk/Z-Stack-firmware/raw/master/coordinator/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_launchpad_coordinator_20230507.zip ckware/ti-cc-tool -ewv -p /dev/ttyUSB0 --bootloader-sonoff-usb
This project is an integration of