Locally compile your project, missing crc32

I’m trying to compile firmware for a device called particle photon locally and I follow the instructions here: https://github.com/spark/firmware/tree/latest
Went through the guide and tried to hit “make” on my windows machine. It complained on missing crc32.

So what package through MinGW do I have to install to get crc32 functionality?

C:\particle-firmware-develop\user>make fatal: Not a git repository (or
any of the parent directories): .git process_begin:
CreateProcess(NULL, which crc32, …) failed.
…/build/common-tools.mk:26: *** “crc32 tool is not found”. Stannar.



I’m going through the same thing. I thought I was almost there and then crc32. I hope someone can help! I’ve got about 16 hours setting this up.

probably these guys program and compile on linux machines, then this is of no issue. Or ofc, utilize ordinary tools.

1 Like

Anyone found an answer to this I followed the instructions as well and ran into somewhat of the same thing.
Win10 PC.

C:\Spark\firmware\modules>make clean all PLATFORM=photon -s program-dfu
which: crc32: unknown command
…/build/common-tools.mk:26: *** “crc32 tool is not found”. Stop.


I haven’t completed the instructions yet, but I just put up the source and brief instructions. You’ll need to build them with either Cygwin or MinGW, whatever you’re using. There will be eventually be pre-built binaries but I haven’t set things up to build all of the combinations yet.

There’s another program, xxd, that you’ll find that you need once you get past crc32, as well.

1 Like

Thanks for this. I am trying to get the local cloud to allow compiling firmware and the crc32 was a huge blocker.

There are complete official instructions for local gcc-arm builds including links to built-binaries for crc32 and xxd now, as well:


1 Like

I am trying to follow the instructions on a clean debian install and get

../build/common-tools.mk:26: *** "crc32 tool is not found".  Stop.

I followed every step

Apparently crc32 is not included in some Debian distributions. You could try this:

sudo apt-get install libarchive-zip-perl

From this question.

Or you can download the other build tools source under the Windows instructions and compile it. It should just be something like this.

gcc -o crc32 crc32.c
sudo cp crc32 /usr/local/bin
1 Like

Yes that fixed it. I should’ve looked inside the build tools for win. Thanks!!

Edit:- Spoke to soon

In file included from ./src/photon/wiced/network/LwIP/WWD/FreeRTOS/arch/cc.h:69:0,
                 from ./src/photon/wiced/network/LwIP/ver1.4.0.rc1/src/include/lwip/arch.h:43,
                 from ./src/photon/wiced/network/LwIP/ver1.4.0.rc1/src/include/lwip/debug.h:35,
                 from ./src/photon/wiced/network/LwIP/ver1.4.0.rc1/src/include/lwip/opt.h:46,
                 from ./src/photon/wiced/network/LwIP/ver1.4.0.rc1/src/include/ipv4/lwip/ip_addr.h:35,
                 from ./src/photon/wiced/network/LwIP/WICED/wiced_network.h:43,
                 from ./src/photon/include/wiced_tcpip.h:44,
                 from ./src/photon/include/wiced.h:46,
                 from src/photon/delay_hal.c:27:
./src/photon/wiced/network/LwIP/WWD/FreeRTOS/cpu.h:43:0: error: "BYTE_ORDER" redefined [-Werror]
In file included from /usr/local/gcc-arm/arm-none-eabi/include/sys/types.h:67:0,
                 from /usr/local/gcc-arm/arm-none-eabi/include/stdio.h:61,
                 from ./src/photon/wiced/WWD/include/wwd_debug.h:40,
                 from ./src/photon/wiced/WWD/include/wwd_assert.h:42,
                 from ./src/photon/wiced/RTOS/FreeRTOS/WWD/ARM_CM3/FreeRTOSConfig.h:41,
                 from ./src/photon/wiced/RTOS/FreeRTOS/ver7.5.2/Source/include/FreeRTOS.h:78,
                 from ./src/photon/wiced/RTOS/FreeRTOS/WWD/wwd_rtos.h:46,
                 from ./src/photon/wiced/WWD/include/RTOS/wwd_rtos_interface.h:47,
                 from ./src/photon/wiced/platform/MCU/STM32F2xx/peripherals/platform_mcu_peripheral.h:56,
                 from ./src/photon/wiced/platform/include/platform_peripheral.h:42,
                 from ./src/photon/include/wiced_platform.h:46,
                 from ./src/photon/include/wiced.h:44,
                 from src/photon/delay_hal.c:27:
/usr/local/gcc-arm/arm-none-eabi/include/machine/endian.h:20:0: note: this is the location of the previous definition
cc1: all warnings being treated as errors
../build/module.mk:256: recipe for target '../build/target/hal/platform-6-m/./src/photon/delay_hal.o' failed
make[2]: *** [../build/target/hal/platform-6-m/./src/photon/delay_hal.o] Error 1
make[2]: Leaving directory '/home/ali/Documents/src/firmware/hal'
../../../build/recurse.mk:11: recipe for target 'hal' failed
make[1]: *** [hal] Error 2
make[1]: Leaving directory '/home/ali/Documents/src/firmware/modules/photon/system-part1'
makefile:85: recipe for target '/home/ali/Documents/src/firmware/modules/photon/system-part1/makefile' failed
make: *** [/home/ali/Documents/src/firmware/modules/photon/system-part1/makefile] Error 2
  • Which branch of the code?
  • What directory are you building from (modules or main)
  • What build command line?

make all PLATFORM=photon

Edit:- It’s a compiler issue. The 5-2016-q3 gives this error. Switching back to the one that was recommended fixes the issue.

1 Like