Make program-dfu error

Hi,

I get an error when I run “make program-dfu” on the photon that says: “05000 is not writeable, make: *** [program-dfu] Error 74” and I can’t find out why I get this error. Any suggestions?

Thanks!
Leo

Which branch of the firmware are you using to compile locally?

I’m using the instructions on the “develop” branch since I’m using the Photon. However, the instructions are sometimes unclear in that they refer back to instructions for the Core.

I’m not sure if this is relevant but when using the command “make PLATFORM=photon,” the command still searches for core-common-lib even though the photon’s Repos should all be in firmware.

do a fresh clone of the develop branch and use the command:

make clean all PLATFORM=photon APP=your_app_folder_name program-dfu

2 Likes

Yes, the original problem is that it is building for the core (it does specify this in the build output!) You need to define PLATFORM or PLATFORM_ID to specifically target the photon.

Hi,

I have specified the platform to specifically target the photon with “make PLATFORM=photon” but it still seems to build for the core (i.e. the photon change-log specifically states “We combined and simplified our firmware libraries into one repository. Our firmware used to be broken up into three libraries: the core firmware library, the communication library, and the library of common drivers. We’ve now combined all of our firmware into one repository and reorganized the firmware so it’s easier to pull out separate bits and pieces if you need them.” however, when building, the “make PLATFORM=photon” command still checks for “core-common-lib” which should only be necessary for Spark Cores…

Also, the “develop” branch instructions say to “navigate to the main folder” but there is no “main” folder under firmware for both the core and photon. However, I can use the “make” command in the “build” folder if I include the core-common-lib and communication-lib folders.

I may be mistaken, but I think the develop branch instructions may need some editing!

It sounds like you are still on master. I can assure you there is a main folder. :slight_smile: It’s here - https://github.com/spark/firmware/tree/develop/main

Be sure to switch branches to develop with git checkout develop then git pull to be sure you have the latest changes.

Sorry about that, I was in the wrong branch (I’m not very familiar with how to use git and github). :smile: Thank you!

Would you mind helping me with another problem – now when I run the build command, I get an error (which I think is related to the common error “arm-none-eabi-gcc not in the PATH.”)

I think I do have the /bin in my PATH variable value with this directory: “C:\Users\Leo\Desktop\CleverPet\Code\SparkCorePrograms\GNU Tools ARM Embedded\4.9 2015q1\bin;”

Is this correct? Is this a different problem?

Thank you!

The buid is dependent on stat, which you get by installing mingw.

I installed mingw – now when running the “make PLATFORM=photon” command, I get a message that says “stat.exe has stopped working” and get the same error message as before for the make. Not sure what’s causing stat to not work – any ideas?

Edit: Included error

Sounds like there is a problem with MinGW. Can you try running stat from the command line yourself - does that work? Maybe unisntall/reinstall MinGW?

Not sure what else to suggest. I just checked the site - MinGW has a mailing list, but not a forum which might have helped.

Yea, I think it’s just something with my laptop setup – I switched to using a MacBook Air and it’s working fine. Thanks for all the help! There is a problem with my code when I “make” using the latest photon develop branch however (i.e. there are multiple errors related to sprintf when I try to “make” my app code). I’ve been using a previous version of the develop branch and it compiles fine so I’ll just stick to that for now.

1 Like