Dfu-util: Last page at 0x08118913 is not writeable error when downloading code to photon

Hello,
I have an issue with photon not downloading the code in dfu-util mode. My build setup is as follows:

  1. Local build using the following make command executed in firmware/main.
    make APPDIR=/<path_to_project>/src PLATFORM=photon MODULAR=n DEBUG_BUILD=y PARTICLE_DEVELOP=1 all

The src folder contains all the .h and .cpp files. This compiles fine and produces a folder named ‘target’ in the src folder. So far so good.

  1. Now I kept the photon in dfu-util mode and executed the following command.

dfu-util -d 0x2B04:0xD006 -a 0 -s 0x80A0000:leave -D src.bin

Here is the log from terminal:

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Opening DFU capable USB device…
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash "
Downloading to address = 0x080a0000, size = 493844
dfu-util: Last page at 0x08118913 is not writeable

I was able to download the program through dfu-util before. Now I get this error. Any insights would help?

Thank you
Dheeraj

Monolithic firmware (MODULAR=N) should be flashed to 0x8020000 because it takes the place of both system and user firmware.

4 Likes

Thank you. It worked!

1 Like