RIOT-OS / RIOT

RIOT - The friendly OS for IoT
https://riot-os.org
GNU Lesser General Public License v2.1
4.91k stars 1.99k forks source link

Bangle.JS2 board support #18493

Open nica-f opened 2 years ago

nica-f commented 2 years ago

Description

This is just a note that I am working on RIOT support for the Bangle.JS2 smart watch (nRF52840 platform). It already works, with display support, LVGL, touch screen support, some sensors - matching pull requests coming soon :-)

Useful links

My RIOT fork for board support, LCD driver etc.: https://github.com/nica-f/RIOT-Digitaluhr A little test hack app using the above board support: https://github.com/nica-f/RIOT-Digitaluhr-App

chrysn commented 2 years ago

I've just tried the fork, just be sure to check out the bangle-js2 branch in the RIOT-Digitaluhr repositiory. Flashing it is really just as simple as connecting the debugger and running make flash in the -App repository.

If you, for reasons I can not fathom, should deign to the heresy of reverting from RIOT, I've taken an image of the original firmware (original.zip -- don't ask me about the precise license, but it's a conglomerate of the upstream firmware and some version of the softdevice). If you're playing around with RIOT-Digitaluhr-App it's easiest to flash that using:

$ cd RIOT-Digitaluhr-Appl/wathcy
$ make debug     # it's just a simple way of starting OpenOCD right
[...]
(gdb) monitor flash write_image erase /tmp/original.bin
(gdb) monitor reset halt
(gdb) c

The original.bin file was obtained from one of the watches using the same procedure but (gdb) monitor flash read_bank 0 /tmp/original.bin instead.

maribu commented 2 years ago

With https://github.com/RIOT-OS/RIOT/pull/18478 and https://github.com/RIOT-OS/RIOT/pull/18526 being merged and https://github.com/RIOT-OS/RIOT/pull/18528 on the way in, is anything infrastructure-wise still needed for upstreaming board support?

maribu commented 2 years ago

Note: I wouldn't mind an incomplete state being PRed. E.g. sensors that are not yet upstream could just be documented as currently unsupported and be added later on. In fact, I think this would streamline the upstreaming process :)

nica-f commented 2 years ago

I need to really work on this... at least the board support should be mergable, the LCD driver contains some cruft from testing things back and forth I need to clean up. It's definitely on my todo list!