Close

Isn't it always the way? Just before the big real-world test Gremlins pop out from behind the skirting boards !

A project log for "Mercator Origins": Sat Nav & Telemetry for Divers

Want to map your dive? Want to navigate like a pro? Even if you are vision-impaired, this will empower you to navigate our underwater world.

mark-b-jonesMark B Jones 05/09/2023 at 07:530 Comments

Oh my.

I have a core dump that is restarting the Mako microcontroller / M5 Stick. It started showing up yesterday evening in anger, and I did what I knew I shouldn't do but did it despite itself... kept going for hours trying to fix it.

Yesterday evening, I was using Qubrito to gaze lustfully at the cornucopia of metrics (66 at last count) that Mako and Lemon (the float microcontroller) are spewing out on a 500ms duty cycle over the interwebs. And then I saw the evidence... Uptime for Mako was much shorter than for Lemon... in fact by the time I'd finished fettling with it Mako was struggling to stay up for 2 minutes. Ugh!!!

So I threw the towel in, as I should have done hours before and have recommenced this morning afresh, this time with a proper strategy.

1. Add feature switches for all the features of Mako. This includes guidance, sensor readings, sending uplink messages and a few other things.

2. Make sure the conditional compile preprocessor directives for building into the binary Twitter, SMTP, Qubitro and Elegant OTA (Over the Air code updates) are all square.

3. Add uptime to the Mako display in seconds from boot. It's then easy to check if after leaving it to run for a time whether there has been a reboot whilst I've been away.

So how is it going? Well I've discovered something interesting. I've disabled everything that I thought could be causing the problem, and still the reboot (caused by a core dump no doubt) is happening though according to uptime it took 20 minutes on the last event. 

It's now time to add a way to disable the OTA update capability (which is actually a webserver which must be using the second core) through the UX. I have to be able to enable/disable through the interface as I will need to disable it for the test and enable it for uploading the next build. I do not want to open the console and disassemble innards in order to get access to the Stick's USB port to do a direct code update via cable!

Update @ 12.20pm - I can now disable OTA Async Web Server and Wifi separately whilst Mako is running using the physiclal GoPro case buttons. The current test run has lasted 53 minutes without a core dump / reboot, that's with OTA server disabled and WiFi still enabled. I am hoping we're done with this. I'll give it till the top of the hour, re-enable all the fancy stuff and run it again.

Discussions