I’ve had a chance to try building the modules, but am getting errors.
with photon attached in dfu mode, on OSX, in repo “firmware” branch “develop”, in folder “modules” as above. I ran:
make PLATFORM=photon clean all program-dfu
and got the following errors:
<path>/firmware-develop/modules > make PLATFORM=photon clean all program-dfu
`free' referenced in section `.text.mpi_grow' of /var/folders/c1/dt61zfs90816tqlxt_9s76m40000gn/T//ccmwYdRi.ltrans1.ltrans.o: defined in discarded section `.text' of ../../../build/target/system-part1/platform-6-m-lto/../../../modules/photon/system-part1/src/import_rt.o (symbol from plugin)
`free' referenced in section `.text.mpi_free' of /var/folders/c1/dt61zfs90816tqlxt_9s76m40000gn/T//ccmwYdRi.ltrans2.ltrans.o: defined in discarded section `.text' of ../../../build/target/system-part1/platform-6-m-lto/../../../modules/photon/system-part1/src/import_rt.o (symbol from plugin)
`free' referenced in section `.text._ZNSt14_Function_base13_Base_managerIZN13SparkProtocol20handle_function_callERNS1_3msgEEUlPKvN15SparkReturnType4EnumEE_E10_M_managerERSt9_Any_dataRKSA_St18_Manager_operation.5345' of /var/folders/c1/dt61zfs90816tqlxt_9s76m40000gn/T//ccmwYdRi.ltrans3.ltrans.o: defined in discarded section `.text' of ../../../build/target/system-part1/platform-6-m-lto/../../../modules/photon/system-part1/src/import_rt.o (symbol from plugin)
collect2: error: ld returned 1 exit status
make[1]: *** [../../../build/target/system-part1/platform-6-m-lto/system-part1.elf] Error 1
make: *** [<path>/firmware-develop/modules/photon/system-part1/makefile] Error 2
Thanks! That did the trick. BTW, in the documentation it says:
OS X:
brew install gcc-arm-none-eabi-49
homebrew doesn't have that formula in its index, but I used this one with success.
I'm still wondering about the relationship of "system firmware" to "build components" and whether there's any way to flash system firmware OTA rather than just by dfu. This doesn't seem to be well described in the firmware docs.
Thanks @kennethlimcp, that’s super helpful. The files included here are just v1 of the firmware? @mdma suggested that we need v2. I assume that I’m building system parts 1 and 2 for v2 when I run ‘make’ in the modules folder locally, is that right?
In any case, even though this can be flashed OTA, we need physical access to the photon to put it into safe mode. So my current understanding is that flashing v2 of system firmware in order to allow local compilation to work needs to be done with each photon physically in hand, for now (possibly forever?).
Yes, that's correct. If you're building user firmware locally it's also important to update the system firmware so the versions match.
This is a temporary situation - as soon as 0.4.0 is released for the Core then we will move what is in develop to master and encourage everyone to build from there. From that point onwards, master will follow exactly what is available online.