CCLoader is a fast and cheap way to flash a Zigbee chip using only an ESP8266 board.
What You Need
First and foremost you will need a compatible Zigbee module/board with a TI CCXXXX chip.
To flash the firmware to the Zigbee chip you will need an ESP8266 board. Best version is a NodeMCU with CH340G, second best a Wemos D1 mini but any ESP8266 device with 3 free gpio’s, GND and 3.3V pin should work. Don’t forget to grab some jumper wires to wire them together.
Depending on the chosen Zigbee module you might need to get the soldering equipment and a magnifying glass out.
Download CCLoader GitHub fork by Jason2866 by clicking on Clone or download -> Download ZIP and unpack to a folder.
Alternatively you can use
git clone https://github.com/Jason2866/CCLoader.git.
/Bin folder you will find CCLoader ready Z-Stack firmware for most popular coordinators.
A wider selection of firmware can be downloaded from the Z-Stack-firmware GitHub. Those firmware files will require additional preparation to be able to use them with CCLoader:
Prepare Z-Stack Firmware
Unpack downloaded Z-Stack firmware .hex file in the same folder and convert with:
objcopy.exe --gap-fill 0xFF --pad-to 0x040000 -I ihex <firmware>.hex -O binary <firmware>.bin
Move the converted .bin to your CCLoader folder.
binutils package using your package manager (Debian based:
sudo apt install binutils)
Unpack downloaded Z-Stack firmware .hex file and convert (replace
<firmware> with filename):
objcopy --gap-fill 0xFF --pad-to 0x040000 -I ihex <firmare>.hex -O binary <firmware>.bin
Prepare ESP8266 Board
Use Ready Made Binary
ESP8266 flashed this way will have to use GPIO5 (D1 NodeMCU), GPIO4 (D2 NodeMCU) and GPIO14 (D5 NodeMCU) for connecting to the Zigbee module.
Compile from CCLoader.ino
If you don’t want to use the compiled file compile and upload your own from ‘\CCLoader\src\CCLoader.ino’ with PlatformIO (change port in
platformio.ini file) or Arduino IDE.
Edit lines 86-90 to change pins for connecting the Zigbee module:
// Debug control pins & the indicate LED int DD = 14; //GPIO14=D5 on NodeMCU/WeMos D1 Mini int DC = 4; //GPIO4=D2 on NodeMCU/WeMos D1 Mini int RESET = 5; //GPIO5=D1 on NodeMCU/WeMos D1 Mini int LED = 2; //GPIO2=D4 and the Blue LED on the WeMos D1 Mini and the ESP-12E module on the NodeMCU, or can use GPIO16=D0 for the other Blue LED on NodeMCU
You need to identify Debug Data, Debug Clock, Reset, GND and VCC pins on the Zigbee module you intend to flash.
Images of pinouts for each compatible module are available here on the site. For unlisted ones consult their datasheet or search for information on the internet.
Connect the ESP8266 pins and Zigbee module pins according to the table. When soldering take extra precaution to avoid solder overflow or shorts between wires.
If you changed pins in the .ino file use your pins instead.
\Windows folder. Place the prepared .bin in the same folder as CCLoader executable.
Command to start the flashing process
CCLoader_x86_64.exe [COM port #] <filename>.bin 0
Example: CC2530ZNP-Prod.bin with NodeMCU on COM6
CCLoader_x86_64.exe 6 CC2530ZNP-Prod.bin 0
First you have to compile
gcc main.c -o CCLoader
Place the prepared .bin in the same folder as the compiled CCLoader executable.
Command to start the flashing process
./CCLoader [COM port path] <filename>.bin 0
Example: CC2530ZNP-Prod.bin with NodeMCU on
./CCLoader /dev/ttyACM0 CC2530ZNP-Prod.bin 0
CCloader will start to count up rapidly, wait until command prompt reappears. Firmware flash was successful if you see this:
Upload successfully! File closed! Comport closed!
If flashing fails or gets stuck at
Request sent already! Waiting for respond...:
- try using
0in the last parameter
- replug NodeMCU and try again
- double check your wiring
Complete successful flash on Windows: