Flashing modules and sticks based on Texas Instruments chips
You can update the firmware of the module or stick through the serial port via the CC2538 and CC2652 microcontrollers’ built-in serial bootloader using the utility cc2538-bsl.
Additional packages must be installed for the utility to work:
pip3 install pyserial intelhex python-magic
You can download the utility with the command:
git clone https://github.com/JelmerT/cc2538-bsl.git
Switching the device into bootloader mode
For USB sticks this step can be skipped (see Automatic switchover to bootloader mode).
To flash the microcontroller you must put it into bootloader mode (serial bootloader).
To switch USB stick into bootloader mode you need:
Disconnect the stick from the USB port.
Press the FLASH button on the stick board.
Without releasing the FLASH button, insert the stick into the USB port of the computer.
You can then release the FLASH button.
To switch module into loader mode see. Zigbee modules PCBA.
Example command to flash the device (from the directory where the firmware utility was installed):
python3 cc2538-bsl.py -p /dev/ttyUSB0 -e -v -w
/dev/ttyUSB0- the path to the port to which the device is connected. This may differ from the example shown in the example, depending on the operating system and the number of devices connected to the computer.
-e- erasing all of the device’s memory before flashing.
-v- output debugging information.
-wis for writing firmware to the device.
Automatic switchover to bootloader mode
This function works only for USB sticks.
The JetHome sticks have an automatic hardware reset and can be switched to bootloader mode for flashing without having to disconnect the stick from the USB port and press a button on it.
A modified version of the cc2538-bsl utility <http://old.wiki.jethome.ru/_media/cc2538-bsl-20210217.zip> is required to use this feature.
Move the utility to github, make a PR to the original repository.