ZNP firmware for cc253* has a built-in bootloader that can be used to updated firmware via USB / UART into the cc2531 stick or simply the cc2530 chip without using CCDebugger or Arduino.
But this requires not a conventional hex-firmware, but a special sbl-firmware (Serial Boot Loader).
For the normal firmware, the process of assembling it is described here https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/CC2531
And for SBL firmware, everything is the same, but the assembly CC2531-ProdSBL (or CC2530) is selected. In this case, not a hex file (680Kb) is generated, but a bin-file (234Kb).
And with one exception - it is necessary to specify MAKE_CRC_SHDW instead of FAKE_CRC_SHDW defined symbols.
This firmware must be flashed through SerialBootTool. It comes with IAR, or you can download it separately here http://processors.wiki.ti.com/index.php/File:SerialBootTool_1_3_2.zip
When starting SerialBootTool, you must select Zigbee family. Then select the SBL firmware (bin-file). And then select port and specify the parameters of the port where cc253* is connected.
After that, you need to re-insert the cc2531 stick or disconnect and reconnect the board with the cc2530 chip and click Load Image. Only in first minute after the connection is available bootloader mode!
The firmware will be executed and the chip can be used again.
brilliant
@kirovilya will this allow to flash sticks in a way that maybe allow a RPI to update firmware without removing stick? I was thinking of a process for example where an addon like we have for hassio would be able to check current stable firmware against the one on the stick and update accordingly if needed?
@danielwelch
@ciotlosm if we can programmatically switch to bootloader mode, then I think yes.
but I do not know how to do it.
Is there a download for the bin file available?
@kirovilya What about this informations: ?? http://processors.wiki.ti.com/index.php/CC253x_Serial_Boot_Loader#
There is the part: Reset on a Serial Command ..
Maybe it could help :)
@lubeda Not yet, but we can build them if you need to...
@tb-killa Good link... I looked at example. It says that 0xF8 code in uart will go to serial bootloader...

Then I looked at our ZNP-firmware and found code:

BUT! Symbol MT_SYS_RESET_HARD = 0

Perhaps this is a mistake in the commentary :))
So, this function called with SYS_RESET_REQ command:

Zigbee-Shepherd and cc-znp used this table https://github.com/zigbeer/cc-znp/wiki/6.-Z-Stack-MT-API-Reference-Tables#sys-commands
... and in code it never call with 0x0 type of reset ...

Ok. If we send 0x0 type to resetReq - we going to serial bootloader mode... and what next? :))
I think it's not worthwhile to make the firmware through zigbee2mqtt - this should be done by separate tools that can use zigbee-shepherd to switch to serial bootloader mode.
@kirovilya a download with a ready made .bin file would be very helpful for all without a cc-debugger. I planed to flash the cc2531 the arduino way until i found that it would take more than an hour...
@lubeda as I said, this method is suitable only for repeated firmware (not the first). since the bootloader must be flashed first.
@kirovilya yes the flashing should be complete alone. We could use some sort of api from App to zigbee shepherd for bring in reset. But this is feature :)
@kirovilya We should check this too: http://processors.wiki.ti.com/index.php/Optimizing_Flash_and_RAM_Usage_of_Z-Stack_for_CC2530
If we could build firmware with maximum available heap we could hopefully fix the error:17 problems.
Here is my compiled .bin file for the CC2531.
It's tested and i uploaded it with SerialBootTool to my own CC2531 stick.
I did a optimization before compiling. I resized the XDATA Stack from 0x4D0 to 0x300.
This decreases the free RAM from 1232 bytes to 768 bytes.
After that we can define + allocate the space for the following no. of devices, neighbor
NWK_MAX_DEVICE_LIST=40
MAX_NEIGHBOR_ENTRIES=5
BIN File (242 KB): CC2531ZNP-D40-N5.bin.zip
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Is it possible to use SerialBootLoader to update a CC2531 that was previously flashed (and working) with the Arduino approach?
In Windows 10 this always gives "COM Port Open Error".
Hi, I purchased this module to try with zigbee2mqtt:
http://www.hexin-technology.com/1000m_TTL_to_ZigBee_Module-Product-566.html
I tried flashing it using a USB to serial adapter and this method, but I don't get a connection.
Can anybody tell me how to flash this thing successfully either using this method or a cc debugger?
Hi @michel72
I鈥檇 say you鈥檒l be connecting a debugger to the five pin holes.

Thx, do you know the pinout for this connection? It鈥檚 not documented anywhere.
Here is my compiled .bin file for the CC2531.
It's tested and i uploaded it with SerialBootTool to my own CC2531 stick.I did a optimization before compiling. I resized the XDATA Stack from 0x4D0 to 0x300.
This decreases the free RAM from 1232 bytes to 768 bytes.After that we can define + allocate the space for the following no. of devices, neighbor
NWK_MAX_DEVICE_LIST=40
MAX_NEIGHBOR_ENTRIES=5BIN File (242 KB): CC2531ZNP-D40-N5.bin.zip
Does anyone have a newer version of this? Maybe? :)
No because @Koenkk 's files are perfect for every situation right now.
Still waiting to get hands on a zig-a-zig-ah device
Ok, I guess I was on the wrong track anyway. But maybe someone (@Chrischi- ?) can point me in the right direction.
I have two preflashed CC2531 coordinators (bought one with ext antenna later).
Now I'd like to make one of them a router to extend my network.
I don't have the hardware to flash it using CCDebugger.
If I understand correctly I'd need a SBL router firmware for that.
But how to make one or where to find it?
I tried to flash with SBL (SerialBootTool) but it does not show up there. I find it in my hardware manager in Windows 10 but the driver is missing. Can anybody tell me from where i can get the driver?

BR
Any change you can make me a bin for router firmware? I cannot seem to make a proper bin with the methods on website. It is 256kb instead of 234 and obviously I cant choose to change CRC_SHADOW.
No because @Koenkk 's files are perfect for every situation right now.
Still waiting to get hands on a zig-a-zig-ah device
We need a router edition though? I not sure what software was used to make the .bin file because the link is broken.
I couldn't find a cross-platform version of SerialBootTool so I implemented it in zigpy-znp. You can use it standalone to flash a CC2531 on any platform even if you don't use ZHA/zigpy:
$ pip install zigpy-znp
$ python -m zigpy_znp.tools.flash_read /dev/serial/by-id/radio -o flash.bin
$ python -m zigpy_znp.tools.flash_write /dev/serial/by-id/radio -i flash.bin
Warning: I've used it and it worked for me but I can't guarantee that it will work for you. I don't suggest you try it unless you have a way to recover.
Referencing to #31 because questions about router bin files came up here too.
Most helpful comment
I couldn't find a cross-platform version of SerialBootTool so I implemented it in
zigpy-znp. You can use it standalone to flash a CC2531 on any platform even if you don't use ZHA/zigpy:Warning: I've used it and it worked for me but I can't guarantee that it will work for you. I don't suggest you try it unless you have a way to recover.