Hi all,
When I am in the top level firmware directory: “make PLATFORM=photon” makes everything it is supposed to including the bootloader
when I try the following from the same place:
make PLATFORM=photon -s program-dfu
I get:
make: *** No rule to make target `program-dfu’. Stop.
program-dfu is clearly in module.mk:
program-dfu: $(TARGET_BASE).dfu
Any ideas what is missing?
Thank you.
You need to be in main or modules folder for dfu programming via make
1 Like
Thanks @kennethlimcp. That took me a step further.
Now I get the following:
make PLATFORM=photon -s program-dfu
/home/kourosh/temp/spark-photon/firmware/modules/photon/system-part1/makefile /home/kourosh/temp/spark-photon/firmware/modules/photon/system-part2/makefile /home/kourosh/temp/spark-photon/firmware/modules/photon/user-part/makefile
make[1]: *** No rule to make target ../../../build/target/communication/platform-6-m-prod-6/libcommunication.a', needed by
…/…/…/build/target/system-part1/platform-6-m/system-part1.elf’. Stop.
make: *** [/home/kourosh/temp/spark-photon/firmware/modules/photon/system-part1/makefile] Error 2
As you can see it tries to backtrack too many directories which explains why it does not find libcommunication.a, which I can’t figure out why. The only place I found that construct was in …/build/target/user-part/platform-6-m/user-part.map
And the only place where I could see a mention of this .map file was in: ./shared/stm32f2xx/part1_build.mk
Is there anything else I should do to get it to build OK before flashing?
Thanks,
The command should be make all PLATFORM=photon program-dfu
?
This might be useful: https://github.com/spark/firmware/blob/develop/docs/build.md
Thanks a lot @kennethlimcp. That seems to have fixed it, brilliant!