Program-dfu: Error 74

I think I know what the problem was: I was using Cygwin

Cygwin doesn’t work even though you get the same output as the node.js CLI, and even though the photon responds to it i.e. flashing magenta and serial connection which makes you think it worked.

Everything works now.

dfu-util: Error during download get_status
This is the error that I get after I do dfu-util
my dfu-util -l is 0.9
Photon ID is 2b06:d008
Downloading to address = 0x080a0000, size = 3176
Download [=========================] 100% 3176 bytes
Download done.
File downloaded successfully
dfu-util: Error during download get_status

Polash

That’s ok. You can ignore the error. The binary is flashed successfully.

I am trying for Led Blink application so assuming the binaries are successfully flashed so after the flashing ( sudo dfu-util -d 2b04:d008 -a 0 -i 0 -s 0x80A0000:leave -D …/build/target/user-part/platform-6-m/blink.bin)
The D7 Led is not blinking?

#include "application.h"

int ledPin = D7;

void setup()
{
  pinMode(ledPin, OUTPUT);
}

void loop()
{
  digitalWrite(ledPin, HIGH);
  delay(1000);
  digitalWrite(ledPin, LOW);
  delay(1000);
}

The LED blink code…What could be the reason ?
Polash

Is your photon breathing cyan?

No it is only blinking Orange-Yellow (DFU mode) after I reset.

Sounds like you need to flash system firmware via the CLI:

npm install -g particle-cli
particle update
1 Like

Oh OK I was trying to flash locally and check…
But still there should be a hack for that

Been able to get some releif…Actually the board I was using is P1 and not Photon the
Hex device ID is :smile: 2b04:d008

Can we get some applications, sources for P1 specifically.

And can we hack around with the firmware of Photon to compile and build application for P1.

Thanks

Finally been able to program and build the Blink code into my P1 board.

sudo make clean all program-dfu PLATFORM_ID=8 APP=(the_application_you _want_to_build

This command works like a dream…

Hi, is it possible to locally compile the Electron with this procedure? I am confused because there is no Platform_ID for electron.

Thanks.

You can just use PLATFORM=electron in your make command to do a local build for the Electron.

Thanks @rickkas7 I reallyappreciate it!

I am having the same error that @AllAboutEE had, my code flash succesfully but the led blinks magenta, I have tried all solution posted here, I did it in windows with the cmd line and with the node.js CLI and same result always magenta. Any sugestion will be highly appreciated.

Thanks to all!

Are you doing the make from the firmware/main or firmware/modules directory? For the Electron, you will likely have to build at least once from the modules directory in program-dfu mode. The reason you’re blinking magenta is you are in safe mode because your system firmware and application firmware versions are not compatible. Building from modules will flash the system firmware that corresponds to the tree that you got from git.

2 Likes

Hi @rickkas7, these are the steps I am following. Right now I am using a Photon.

  1. Download the firmare with: git clone https://github.com/spark/firmware.git

  2. git checkout latest.

  3. cd modules… make clean all PLATFORM=photon program-dfu, it download 3 files:

    • system-part1.dfu
    • system-part2.dfu
    • user-part.dfu
      After that starts breathing magenta. Now I ser dfu mode again.
  4. cd main…make all PLATFORM=photon program-dfu

Breathing Magenta! I get no errors when compiling and downloading.

This is the output when I do the STEP .4 .

Yes, that should work. The only thing I might try is deleting the firmware/build/target directory. If you are using APPDIR, also delete the target directory in that. Once in a while things get confused and make clean isn’t enough to resolve the problem.

But safe mode magenta after a local build for a Photon is also kind of weird; that normally shouldn’t happen because it can use the safe mode healer to upgrade the system firmware for you. That normally only happens on the Electron where it doesn’t do that for data usage reasons. Odd.

Finally I could get it working! Thanks for all the advices @rickkas7.

I unisntalled all programs and I used the particle toolchain installer posted here:

It has all dependencies needed.

Then I did the steps explained before and the photon was compiled succesfully!

I hope this may help others.

Thanks you all!

2 Likes