I have recently received a Phonton 2 as part of the "Edge ML Kit." I have successfully built and flashed the blink demo to the Phonton 2 using deviceOS@5.4.0 ... builds and works as expected. I have attempted to compile both of the projects referenced in the Getting Started / Machine Learning guide. Both projects are failing to compile using 5.4.0.
Can anyone verify success in compiling the "Doorbell SMS sender" and " You're muted" tutorial projects?
There are two separate issues involved here.
The tutorial guides recommend 5.3.2 because there is a bug in 5.4.0 that can cause P2/Photon 2 builds to fail somewhat randomly. This will be fixed in the next version, which will be 5.4.1 or 5.5.0. Device OS 5.3.2 should work well with the Doorbell SMS demo.
However, the you're muted demo, it can't be built with 5.3.2 because it does not have USB keyboard support, so it must be built with 5.4.0. Unfortunately, builds will sometimes fail. If you Clean application it will sometimes succeed on the next build, but the best option for this demo will be to wait until the next release.
The effects of the build issue with 5.4.0 are typically one of:
- The build fails because
region 'SRAM' overflowed by 4 bytes
- The build succeeded, but shortly after boot the device does a SOS+1 red blink and reboots
Thanks for your quick response. I will wait for 5.4.1 or 5.5.0 as you suggest for the muted demo. I have not yet been able to compile the doorbell demo w/ 5.3.2. I suspect that I have a setup / environment issue with Workbench as I am now receiving an "Argument list too long" error.
How can compiles fail "randomly"?
I believe it has to do with how objects are laid out in memory when the linker constructs its static segments. This is why clean build (or building from a Docker build pack) often works. When you rebuild, the linker sometimes lays out the objects differently, which exposes the problem.