I tried CCLib to flash firmware, but got too much problems and flashing time took many hours
I discovered that using CCLoader that works very fine and flash took a few minutes...
https://github.com/RedBearLab/CCLoader
I needed to use Z-Stack-Firmware .hex file, convert it using hex2bin then flash it using CCLoader_x86_64.exe