The crash is fixed in the Carloop library version 2.1.0
To upgrade your application running in the Particle Web IDE open the Carloop library version 2.1.0, click Include in project and select your application.
To upgrade your application built with the Particle CLI, run particle library add carloop
To get your Photon or Electron back online if it’s in a loop of booting, connecting to the cloud then blinking red and crashing, hold the SETUP button, tap RESET and let go of SETUP. The device will connect to the Particle Cloud and start breathing magenta instead of cyan. This is called Safe mode. You will then be able to flash your application that includes the fixed version of the library.
Original thread
With the release of Particle firmware 0.7.0 for the Photon and Electron the Carloop library started crashing in the begin() method.
I’ll document how I’m investigating the issue in this thread.
I copied the Carloop library files and the minimal example into a new folder of the Particle firmware at user/applications/carloop. There are other ways to build the firmware with a user application, but this one is straightforward.
ls user/applications/carloop/
carloop.cpp carloop.h carloop_minimal.cpp TinyGPS++.cpp TinyGPS++.h
I flashed the debug build by putting the Photon in DFU mode (hold SETUP, tap RESET and hold SETUP until the LED blinks yellow then release SETUP) then running
cd main
make program-dfu PLATFORM=photon USE_SWD_JTAG=y MODULAR=n APP=carloop
After flashing completed I got the blinking red crash as expected. Time to fire up the debugger!
Note to myself for when I’m done: remember to put the Photon back to a non-debug firmware otherwise I will be very confused why I can’t flash from the Web IDE or CLI next time I use my Carloop.
cd modules
make clean all program-dfu PLATFORM=photon
The I used the OpenOCD and gdb tools as described in the debugger guide to connect to the Photon.