Generation of firmware (GCC), without flash option


I currently try to generate the “modules” firmware without ‘program-dfu’ option (I have no access to USB from the compilation server), then:

  • I change directory to modules\
  • I launch the make => make PLATFORM=P1 clean all

The compilation succeeded but I don’t find any generated .bin file that could match with the firmware to load (locally)

Could I use the make in this purpose ?
If yes, where is the corresponding generated .bin file that I could load (via “particle flash --usb <Firmware.bin>”) ?

Thank you

@slorre - I am assuming you are using the local toolchain to compile firmware.

There is a base directory where the source tree lives, lets call this ${SRC}.

The instructions for compiling are to cd firmware/modules.

You indicated make PLATFORM=P1 clean all.

Have a look around in ${SRC}/firmware/build/target/...

On a unix compatible platform, you can use the find command. Notice the recently compile firmware for Aug 8 below. There is a lot of other stuff in there.

cd ${SRC}
$ find . -name \*.bin -exec ls -l {} \;
-rw-r--r--  1 cermak  staff  22820 Jul  7 13:50 ./firmware/bootloader/tools/locker-firmware.bin
-rw-r--r--  1 cermak  staff  18756 Jul  7 13:50 ./firmware/bootloader/tools/unlocker-firmware.bin
-rwxr-xr-x  1 cermak  staff  15712 Aug  2 20:49 ./firmware/build/target/bootloader/platform-6-lto/bootloader.bin
-rwxr-xr-x  1 cermak  staff  255832 Jul 28 12:41 ./firmware/build/target/system-part1/platform-6-m/system-part1.bin
-rwxr-xr-x  1 cermak  staff  255832 Aug  8 07:52 ./firmware/build/target/system-part1/platform-8-m/system-part1.bin
-rwxr-xr-x  1 cermak  staff  214652 Jul 28 12:41 ./firmware/build/target/system-part2/platform-6-m/system-part2.bin
-rwxr-xr-x  1 cermak  staff  214888 Aug  8 07:53 ./firmware/build/target/system-part2/platform-8-m/system-part2.bin
-rwxr-xr-x  1 cermak  staff  7424 Jul  7 13:59 ./firmware/build/target/user-part/platform-6-m/user-part.bin
-rwxr-xr-x  1 cermak  staff  7424 Aug  8 07:53 ./firmware/build/target/user-part/platform-8-m/user-part.bin
-rw-r--r--  1 cermak  staff  8 Jul  7 13:50 ./firmware/hal/src/electron/dct_header.bin
-rw-r--r--  1 cermak  staff  32768 Jul  7 13:50 ./firmware/hal/src/photon/dct_prep.bin
-rwxr-xr-x  1 cermak  staff  4660 Jul 25 21:58 ./firmware/modules/classtest/target/classtest.bin
-rwxr-xr-x  1 cermak  staff  4676 Jul 22 07:49 ./firmware/modules/fwtests/target/fwtests.bin
-rwxr-xr-x  1 cermak  staff  89476 Jul 28 12:41 ./firmware/modules/wolfiot/target/wolfiot.bin
-rwxr-xr-x  1 cermak  staff  23908 Jul 15 17:18 ./firmware/modules/wolfmqtt/target/wolfmqtt.bin
-rwxr-xr-x  1 cermak  staff  96968 Jul 19 08:16 ./firmware/modules/wolfrc/target/wolfrc.bin
-rw-r--r--  1 cermak  staff  16384 Jul  7 13:50 ./firmware/user/tests/unit/corrupted_eeprom_page1.bin
-rw-r--r--  1 cermak  staff  65536 Jul  7 13:50 ./firmware/user/tests/unit/corrupted_eeprom_page2.bin
-rw-r--r--  1 cermak  staff  16384 Jul  7 13:50 ./firmware/user/tests/unit/eeprom_page1.bin

If you are on Windows, then I am at a loss to find things on the command line. You can use windows explorer to find the *.bin files and discover the path to them.

1 Like


Yes I compile with local toolchain.

Concerning the generated *.bin files Ifound 3 that seem to match (2 for the system, 1 for the application):

-rwxrwxr-x 1 257120 Aug 8 18:28 ./build/target/system-part1/platform-8-m/system-part1.bin
-rwxrwxr-x 1 214448 Aug 8 18:30 ./build/target/system-part2/platform-8-m/system-part2.bin
-rwxrwxr-x 1 7096 Aug 8 18:31 ./build/target/user-part/platform-8-m/user-part.bin

But I expected only one (or two max).

I suppose that we can’t load them individually, one after another, with “particle flash --usb Firmware-x.bin”

Should we concatenate them, or specify adresses for each load, Perhaps a process to follow ?

Thank you

The firmware I showed you is the core firmware that the device is running. I now think you are trying to find your project firmware that you would run on the device?

You would place your code into a project directory, this is also called the APPDIR.

See if these instructions help.



The project firmware would be in the respective target directory.

Three is the correct number of parts for a P1 build. Two system parts and one user part.

However if you clone out the source from a release tag and make no other modifications or option changes to the system parts, you can use the standard pre-built system firmware so you don’t need to flash those. Just flash your user-part.bin, which is basically the same file as you’d get from the cloud compilers.

As your iterating your user firmware code, normally you just build from firmware/main which only builds the user-part and saves a great deal of build time.

If you’re going to use gdb, that’s an entirely different thing as you need a monolithic binary which only has one part that contains the system and user parts.