-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
boards/adafruit-clue: add initial support #13276
Conversation
Are you aware of #13146? |
1c173a8
to
3d31c77
Compare
Ad 1200 baud for nrf52840-dongle: I'd prefer to not introduce the 1200 baud rate hack to devices where it's not the manufacturer (or otherwise brand conventional, as in Arduino) endorsed way to enter the bootloader -- at least not unless it's advertised in some way (something like the CDC-ACM subprotocol, maybe, but those can only be allocated with USB-IF registration IIUC). When we have the choice of picking what to do, I'd rather implement a specified DFU reset rather than doing the only thing the particular hardware that happened to be used first with Arduino could do. But thanks for alerting me to this, I'm still looking through the PR, but it's a tad hard to tell for me what is actually part of the PR itself (it says it's based on #12304 and thus aabadie/pr/boards/arduino-mkr_stdio, but from that I get an even larger delta as from master). Anyway, I'm probably gonna "steal back" the |
I hope #12304 will be merged soon, so the diff related to this PR will be more readable. Otherwise, you can just use |
I've tried to incorporate your nrfutil.inc.mk into #13146, but there are a few nontrivial differences both in the fflags. Are we even running the same nrfutil here? (Mine doesn't recognize --baudrate, touch or singlebank, even though I just updated it from With that, it might be more prudent to not make this a common nrfutil.inc yet but to have it per board, and later compare them to the point where we can unify. |
As I said, I started from your nrfutil configuration in #13146 and was surprised some options are so different. |
@aabadie I also got hold of one of these boards fyi. Could test stuff! |
3d31c77
to
00ff7a1
Compare
9771a07
to
8a192a5
Compare
8a192a5
to
e63adf9
Compare
99e71ee
to
b0e2ceb
Compare
b0e2ceb
to
bc1f787
Compare
b8d4c55
to
35833a5
Compare
@fjmolinas I also applied your suggestions. Let's see what Murdock has to say. |
35833a5
to
b4e6bcd
Compare
I pushed a fix similar to the one in #13664. Hope this will make Murdock happy this time. |
b4e6bcd
to
81eaeb9
Compare
No more build issues on Murdock! @fjmolinas, are you ok to squash ? |
Yes go ahead. |
81eaeb9
to
c7b365c
Compare
Done! |
@aabadie is this targeted at the release? |
I hope it will be merged tomorrow. So yes :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general everything looks good, only some nit-picks. I do not have the BOARD
to test, I will trust @aabadie on this one regarding testing, if possible next time give some test results in the PR description.
boards/adafruit-clue/doc.txt
Outdated
|
||
The board is flashed using the `nrfutil` Python package. | ||
|
||
Once `nrfutil` is installed, ase `BOARD=adafruit-clue` with the `make` command.<br/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once `nrfutil` is installed, ase `BOARD=adafruit-clue` with the `make` command.<br/> | |
Once `nrfutil` is installed, use `BOARD=adafruit-clue` with the `make` command.<br/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH this phrase is weird, I would simply remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line removed
|
||
#include "usb_board_reset.h" | ||
|
||
#define NRF52_DOUBLE_TAP_MAGIC_NUMBER (0x4e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What this for? Mind adding a comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment added.
FLASHFILE = $(HEXFILE) | ||
FLASHDEPS += $(HEXFILE).zip | ||
FLASHER = adafruit-nrfutil | ||
FFLAGS = dfu serial --port=${PORT} --baudrate=115200 --touch=1200 --package=$(HEXFILE).zip --singlebank |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FFLAGS = dfu serial --port=${PORT} --baudrate=115200 --touch=1200 --package=$(HEXFILE).zip --singlebank | |
FFLAGS = dfu serial --port=${PORT} --baudrate=${BAUD}--touch=1200 --package=$(HEXFILE).zip --singlebank |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
boards/adafruit-clue/doc.txt
Outdated
|
||
### Flash the board | ||
|
||
The board is flashed using the `nrfutil` Python package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The board is flashed using the `nrfutil` Python package. | |
The board is flashed using the `nrfutil` Python package: | |
$ pip install nrfutil --user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed, note that the doc was wrong, the package to install is adafruit-nrfutil.
c7b365c
to
155d6ec
Compare
Also I tested
|
@aabadie please squash! |
155d6ec
to
04f890f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK.
Contribution description
This PR adds an initial support for the Adafruit Clue board. This board has the same form factor as the micro:bit but is running on an nrf52840 MCU, which gives much more possibilities. There are also plenty of sensors and a TFT LCD screen.
Almost all sensors are already supported by RIOT: bmp280, sth31, lis3mdl. Support for the apds9960 is provided by #10420 (I tested it and the basic version works).
What was tested with success:
tests/driver_ili9341
worksThe accelerometer, an LSM6DS33, is not tested/supported yet (maybe it's similar to the LSM6DSL) ?
The board is flashed using nrfutil as it is the tool used by the Arduino IDE: I added a new makefile for managing nrfutil.
The other thing is the management of the bootloader: I reuse the same approach used for the
arduino-nano-33-ble
board (see #13194) to trigger a reboot in bootloader mode. nrfutil is able to handle the serial "touch" at 1200bauds and to flash afterwards.Testing procedure
compile_and_test_for_board.py
and check the results (but will need Makefile.dep: auto_init_% as DEFAULT_MODULES #13089 to work well).Issues/PRs references
This PR is based on #12304 for the bootloader management.