<b>Preparation</b>
Option 1
……
Option 2
Use the precompiled exe file <a href="https://github.com/egony/cc2652p_E72-2G4M20S1E/raw/master/files/cc2538-bsl_x64.zip">cc2538-bsl_x64.exe</a>. You do not need to install python and its modules.
<b>Flashing process</b>
The process of flashing for sticks of different revisions looks different due to different methods of activating the bootloader - by buttons or automatically (Auto BSL).
Attention!!! All of the following is true ONLY for the sticks that I personally built.
Attention!!! On sticks with the ability to flash without using buttons (Auto BSL) - the functionality of the buttons is not guaranteed.
The stick revision can be viewed on the board.
Flashing sticks with Auto BSL
No buttons are required.
rev. 2.0E and rev. 1.0R
python.exe cc2538-bsl.py -p COM3 --invoke-bootloader 3 -ewv znp_CC2652P.hex
rev. 2.1E and rev. 2.3E
python.exe cc2538-bsl.py -p COM3 --bootloader-invert-lines -ewv znp_CC2652P.hex
rev. 2.5E and rev. 3.xX
python.exe cc2538-bsl.py -p COM3 -ewv znp_CC2652P.hex
Flashing the rest of the sticks and pi shields/hat (activating the bootloader with buttons)
Hold down the FLASH (BSL) button, insert the stick into USB, release FLASH (BSL) button.
python.exe cc2538-bsl.py -p COM3 -ewv znp_CC2652P.hex
The process looks something like this:
Opening port COM3, baud 500000
Reading data from CC1352P2_CC2652P_other_20201113.hex
Your firmware looks like an Intel Hex file
Connecting to target ...
CC1350 PG2.0 (7x7mm): 352KB Flash, 20KB SRAM, CCFG.BL_CONFIG at 0x00057FD8
Primary IEEE Address: 00: 12: 4B: 00: 21: B4: 94: C2
Performing mass erase
Erasing all main bank flash sectors
Erase done
Writing 360 448 bytes starting at address 0x00000000
Write 104 bytes at 0x00057F980
Write done
Verifying by comparing CRC32 calculations.
Verified (match: 0x55e2e461)
At the end of the flashing, you may need to unplug-plug the stick into USB or press RESET.
After flashing, it is strongly recommended to clear the stick memory (only for coordinator firmware, routers do not need to be cleaned).