Non-bangle bangle flashing #7534
Replies: 1 comment
-
Posted at 2021-07-10 by @MaBecker Can't see Posted at 2021-07-11 by Ivor Thanks, pretty sure I'd had that on an earlier flash, just retried with that and does the same. Is that warning in the flash output anything significant?
Posted at 2021-07-11 by Ivor and great success! Thanks, the problem was the bootloader was too large... doh. Posted at 2021-07-26 by Ivor While I wait for a Bangle2... I was tinkering with getting the ANT+ 332 softdevice working to use with secondary HRM's (only reason for going ANT rather the BLE is all my HR straps here are ANT+) So I picked up another F18 type board to play with, interestingly this one doesn't have GPS or use an IO expander so everything's a direct link to the NRF52. So the question I wanted to know/ask was what options there are for getting some/any debug logging out from the firmware? Is there any way to generate a debug message that can be passed back out to openocd or similar? or since the web bluetooth connection seems to be working is there any way from from the firmware to log to that? (I couldn't see either but I may have missed it) Posted at 2021-07-26 by @gfwilliams Glad you got it working!
Yes, I'd say just use jsiConsolePrintf in your C code (or Posted at 2021-07-26 by @fanoush
I think with segger tools this is pretty straightforward - google for Segger RTT. With OpenOCD google for SWO tracing - however this need GPIO pin 18 = TRACEDATA[0] to be free. RTT does not need any extra pins since this is just preallocated buffer in SRAM read over SWD. Or maybe opeocd already has Segger RTT support merged https://www.reddit.com/r/embedded/comments/80dg3a/how_exactly_does_the_segger_rtt_work/ that works with any SWD dongle? Or as a poor man's RTT you can allocate fixed buffer, write to it and dump it periodically from openocd via memory dump commands, it s not needed to stop CPU to read memory. Of course you can also setup plain uart with just TX pin and log to that. Posted at 2021-07-26 by Ivor Perfect thanks, lots of ideas cheers! will give it a spin tonight. Having a huge amount of fun with these. Posted at 2021-07-26 by Ivor Thanks! lots of jsiConsolePrintf's and using Bluetooth logging was just the ticket! (couldn't get RTT working, might try that again sometime). All up and running now, going to be really handy having a permanently SWD connected unit to tinker with. It only needs minor changes to work with this model (disabling GPS and IO expander, oh and speaker! and redirecting the IO lines). Attachments: Posted at 2021-08-02 by @gfwilliams I think in general, if it's something there's an easy way to get hold of, I'm up for PRs for BOARD.py files as long as there aren't loads of ifdefs for the specific watch. Like P8/DK08/etc I'd be interested in getting proper board files for I reckon. However, if there isn't even an obvious way to buy other devices, it's probably not a good idea for a PR in this case :( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2021-07-10 by Ivor
Firstly apologies for going 'off-piste'...
but since I was intended to do some heavy hacking I didn't want to accidentally brick/destroy an official bangle.js but had no qualms blatting a generic watch I could easilly replace. So picked up an (I think identical?) unbranded version. (and I was rather taken with the red case! :) (pic1)
I'm connected via SWD, an STLink2 and OpenOCD (as I said I intended to do some hacking, bootloader changes, different NRF softdevice etc)
I thought everything was going well, but now I seem to be at an impasse, I assume I've missed something obvious or done something stupid, so any suggestions welcome. However obvious!
I've got a local build of Espruino using current git code.
After flashing then hex through OpenOCD:
On reboot, says "storage is corrupt, erasing" then shows a ">" cursor. (pic2)
I thought/wondered if this was just because no apps had been uploaded/bundled and I can connect to the watch via "bangle.js/apps" from there if I run "Install Default Apps" the "Erasing..." happens but then it proceeds to uploading bootloader, displays "Uploading boot..." and hangs. (pic3)
Not sure if it's a related problem, but if I connect to the watch via nRFConnect it shows up as 'Nordic UART Service' with no DFU service.
Any suggestions what I've missed or what I should/could try?
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions