Skip to content

boards/adafruit-clue: add initial support#13276

Merged
aabadie merged 5 commits intoRIOT-OS:masterfrom
aabadie:pr/boards/adafruit-clue
Apr 8, 2020
Merged

boards/adafruit-clue: add initial support#13276
aabadie merged 5 commits intoRIOT-OS:masterfrom
aabadie:pr/boards/adafruit-clue

Conversation

@aabadie
Copy link
Contributor

@aabadie aabadie commented Feb 4, 2020

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:

  • I2C: all configured sensors are working
  • second SPI: it is connected to the screen, which is ILI9341 compliant => tests/driver_ili9341 works

The 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

  • Verify sensors/LEDs/buttons are correctly configured:
make BOARD=adafruit-clue -C example/default flash term

Issues/PRs references

This PR is based on #12304 for the bootloader management.

@aabadie aabadie added Type: new feature The issue requests / The PR implemements a new feature for RIOT State: waiting for other PR State: The PR requires another PR to be merged first Area: boards Area: Board ports labels Feb 4, 2020
@aabadie aabadie requested a review from fjmolinas February 4, 2020 07:16
@miri64
Copy link
Member

miri64 commented Feb 4, 2020

The board is flashed using nrfutil as it is the tool used by the Arduino IDE: I added a new makefile for managing nrfutil.

Are you aware of #13146?

@aabadie
Copy link
Contributor Author

aabadie commented Feb 4, 2020

Are you aware of #13146?

Yes, this is where I "took" the zip generation mechanism. But I had to readapt it for this board. Most of this PR is taken from #13194, especially the management of the bootloader. Maybe this can also be useful for #13146 ?

@miri64
Copy link
Member

miri64 commented Feb 4, 2020

Yes, this is where I "took" the zip generation mechanism. But I had to readapt it for this board. Most of this PR is taken from #13194, especially the management of the bootloader. Maybe this can also be useful for #13146 ?

Let's ask @chrysn ;-).

@aabadie aabadie force-pushed the pr/boards/adafruit-clue branch from 1c173a8 to 3d31c77 Compare February 4, 2020 07:39
@chrysn
Copy link
Member

chrysn commented Feb 4, 2020

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 makefiles/tools/nrfutil.inc.mk , and I think that based on your term-delay, I can come up with something even more precise (by having the programmer report its stat of $TERM to a file, and only blocking term while that is still the stat).

@aabadie
Copy link
Contributor Author

aabadie commented Feb 4, 2020

I hope #12304 will be merged soon, so the diff related to this PR will be more readable.

Otherwise, you can just use git diff b154382311accb3be92680ba8f9fcd77e6a81149...3d31c77641a78ab52e96379959c9d110769cad60 (but the commit hashes might change after some updates of this PR)...

@chrysn
Copy link
Member

chrysn commented Feb 14, 2020

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 pip3 install nrfutil --force).

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.

@aabadie
Copy link
Contributor Author

aabadie commented Feb 14, 2020

there are a few nontrivial differences both in the fflags

As I said, I started from your nrfutil configuration in #13146 and was surprised some options are so different.
So I had a second look, and I think I messed things up between the Nordic nrfutil and the Adafruit nrfutil. It seems both packages are not compatible (installing nrfutil breaks adafruit-nrfutil).
I'll have a look at that later.

@emmanuelsearch
Copy link
Member

@aabadie I also got hold of one of these boards fyi. Could test stuff!

@aabadie aabadie force-pushed the pr/boards/adafruit-clue branch from 3d31c77 to 00ff7a1 Compare February 25, 2020 11:34
@aabadie aabadie force-pushed the pr/boards/adafruit-clue branch 2 times, most recently from 9771a07 to 8a192a5 Compare March 11, 2020 07:23
@aabadie aabadie force-pushed the pr/boards/adafruit-clue branch from 8a192a5 to e63adf9 Compare March 18, 2020 10:45
@aabadie aabadie removed the State: waiting for other PR State: The PR requires another PR to be merged first label Mar 18, 2020
@aabadie aabadie force-pushed the pr/boards/adafruit-clue branch 2 times, most recently from 99e71ee to b0e2ceb Compare March 18, 2020 10:57
@aabadie aabadie added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 18, 2020
@aabadie aabadie force-pushed the pr/boards/adafruit-clue branch from b0e2ceb to bc1f787 Compare March 18, 2020 10:59
Comment on lines +12 to +15
ifneq (,$(filter auto_init_usbus,$(USEMODULE)))
# Use stdio over USB
USEMODULE += stdio_cdc_acm

# This boards requires support for nrfutil bootloader.
FEATURES_REQUIRED += bootloader_nrfutil

# and for the board reset via USB mechanism
USEMODULE += usb_board_reset
endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto_init modules can not trigger dependency

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe its better to say they shouldn't, #13651.

@aabadie aabadie force-pushed the pr/boards/adafruit-clue branch from 1b9c394 to b8d4c55 Compare March 25, 2020 12:56
Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one looks good, one comemnt and some nit-picks.

Can you provide some test output? I can ACK it after that.

@aabadie
Copy link
Contributor Author

aabadie commented Mar 31, 2020

output of examples/default
make BOARD=adafruit-clue -C examples/default/ flash term --no-print-directory 
Building application "default" for "adafruit-clue" with MCU "nrf52".

"make" -C /work/riot/RIOT/boards/adafruit-clue
"make" -C /work/riot/RIOT/core
"make" -C /work/riot/RIOT/cpu/nrf52
"make" -C /work/riot/RIOT/cpu/cortexm_common
"make" -C /work/riot/RIOT/cpu/cortexm_common/periph
"make" -C /work/riot/RIOT/cpu/nrf52/periph
"make" -C /work/riot/RIOT/cpu/nrf52/radio/nrf802154
"make" -C /work/riot/RIOT/cpu/nrf5x_common
"make" -C /work/riot/RIOT/cpu/nrf5x_common/periph
"make" -C /work/riot/RIOT/drivers
"make" -C /work/riot/RIOT/drivers/apds99xx
"make" -C /work/riot/RIOT/drivers/bmx280
"make" -C /work/riot/RIOT/drivers/lis3mdl
"make" -C /work/riot/RIOT/drivers/netdev_ieee802154
"make" -C /work/riot/RIOT/drivers/periph_common
"make" -C /work/riot/RIOT/drivers/saul
"make" -C /work/riot/RIOT/drivers/saul/init_devs
"make" -C /work/riot/RIOT/drivers/sht3x
"make" -C /work/riot/RIOT/sys
"make" -C /work/riot/RIOT/sys/auto_init
"make" -C /work/riot/RIOT/sys/auto_init/usb
"make" -C /work/riot/RIOT/sys/checksum
"make" -C /work/riot/RIOT/sys/div
"make" -C /work/riot/RIOT/sys/event
"make" -C /work/riot/RIOT/sys/fmt
"make" -C /work/riot/RIOT/sys/isrpipe
"make" -C /work/riot/RIOT/sys/luid
"make" -C /work/riot/RIOT/sys/net/gnrc
"make" -C /work/riot/RIOT/sys/net/gnrc/netapi
"make" -C /work/riot/RIOT/sys/net/gnrc/netif
"make" -C /work/riot/RIOT/sys/net/gnrc/netif/hdr
"make" -C /work/riot/RIOT/sys/net/gnrc/netif/ieee802154
"make" -C /work/riot/RIOT/sys/net/gnrc/netif/init_devs
"make" -C /work/riot/RIOT/sys/net/gnrc/netreg
"make" -C /work/riot/RIOT/sys/net/gnrc/pkt
"make" -C /work/riot/RIOT/sys/net/gnrc/pktbuf
"make" -C /work/riot/RIOT/sys/net/gnrc/pktbuf_static
"make" -C /work/riot/RIOT/sys/net/gnrc/pktdump
"make" -C /work/riot/RIOT/sys/net/link_layer/ieee802154
"make" -C /work/riot/RIOT/sys/net/link_layer/l2util
"make" -C /work/riot/RIOT/sys/net/netif
"make" -C /work/riot/RIOT/sys/newlib_syscalls_default
"make" -C /work/riot/RIOT/sys/od
"make" -C /work/riot/RIOT/sys/phydat
"make" -C /work/riot/RIOT/sys/ps
"make" -C /work/riot/RIOT/sys/random
"make" -C /work/riot/RIOT/sys/random/tinymt32
"make" -C /work/riot/RIOT/sys/saul_reg
"make" -C /work/riot/RIOT/sys/shell
"make" -C /work/riot/RIOT/sys/shell/commands
"make" -C /work/riot/RIOT/sys/tsrb
"make" -C /work/riot/RIOT/sys/usb/usbus
"make" -C /work/riot/RIOT/sys/usb/usbus/cdc/acm
"make" -C /work/riot/RIOT/sys/usb_board_reset
"make" -C /work/riot/RIOT/sys/xtimer
   text	   data	    bss	    dec	    hex	filename
  46800	    164	   9408	  56372	   dc34	/work/riot/RIOT/examples/default/bin/adafruit-clue/default.elf
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --sd-req 0x00B6 --application /work/riot/RIOT/examples/default/bin/adafruit-clue/default.hex /work/riot/RIOT/examples/default/bin/adafruit-clue/default.hex.zip
Zip created at /work/riot/RIOT/examples/default/bin/adafruit-clue/default.hex.zip
adafruit-nrfutil dfu serial --port=/dev/ttyACM0 --baudrate=115200 --touch=1200 --package=/work/riot/RIOT/examples/default/bin/adafruit-clue/default.hex.zip --singlebank
Upgrading target on /dev/ttyACM0 with DFU package /work/riot/RIOT/examples/default/bin/adafruit-clue/default.hex.zip. Flow control is disabled, Single bank, Touch 1200
########################################
########################################
############
Activating new firmware
Device programmed.
sleep 2
/work/riot/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200" 
2020-03-31 14:28:05,649 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
2020-03-31 14:28:06,654 # main(): This is RIOT! (Version: 2020.04-devel-1747-g8d32f-pr/boards/adafruit-clue)
2020-03-31 14:28:06,655 # Welcome to RIOT!
> help
2020-03-31 14:29:28,259 #  help
2020-03-31 14:29:28,261 # Command              Description
2020-03-31 14:29:28,262 # ---------------------------------------
2020-03-31 14:29:28,264 # reboot               Reboot the node
2020-03-31 14:29:28,265 # version              Prints current RIOT_VERSION
2020-03-31 14:29:28,267 # ps                   Prints information about running threads.
2020-03-31 14:29:28,268 # random_init          initializes the PRNG
2020-03-31 14:29:28,271 # random_get           returns 32 bit of pseudo randomness
2020-03-31 14:29:28,274 # ifconfig             Configure network interfaces
2020-03-31 14:29:28,276 # txtsnd               Sends a custom string as is over the link layer
2020-03-31 14:29:28,278 # saul                 interact with sensors and actuators using SAUL
> ifconfig
2020-03-31 14:29:32,793 #  ifconfig
2020-03-31 14:29:32,794 # Iface  5  HWaddr: 8E:1F  Channel: 26  NID: 0x23
2020-03-31 14:29:32,796 # Long HWaddr: 38:92:E5:B1:D1:E8:8E:1F 
2020-03-31 14:29:32,797 #  TX-Power: 0dBm L2-PDU:102 Source address length: 2
2020-03-31 14:29:32,798 # 
> saul
2020-03-31 14:29:35,390 #  saul
2020-03-31 14:29:35,392 # ID	Class		Name
2020-03-31 14:29:35,393 # #0	ACT_SWITCH	LED0 (Red)
2020-03-31 14:29:35,393 # #1	SENSE_BTN	Button A
2020-03-31 14:29:35,394 # #2	SENSE_BTN	Button B
2020-03-31 14:29:35,395 # #3	SENSE_TEMP	NRF_TEMP
2020-03-31 14:29:35,396 # #4	SENSE_PROXIMITY	apds99xx
2020-03-31 14:29:35,397 # #5	SENSE_LIGHT	apds99xx
2020-03-31 14:29:35,398 # #6	SENSE_LIGHT	apds99xx
2020-03-31 14:29:35,399 # #7	SENSE_TEMP	bmp280
2020-03-31 14:29:35,400 # #8	SENSE_PRESS	bmp280
2020-03-31 14:29:35,401 # #9	SENSE_MAG	lis3mdl
2020-03-31 14:29:35,403 # #10	SENSE_TEMP	sht3x1
2020-03-31 14:29:35,404 # #11	SENSE_HUM	sht3x1
> saul write 0 1
2020-03-31 14:29:54,030 #  saul write 0 1
2020-03-31 14:29:54,032 # Writing to device #0 - LED0 (Red)
2020-03-31 14:29:54,033 # Data:	              1 
2020-03-31 14:29:54,034 # data successfully written to device #0
> saul write 0 0
2020-03-31 14:29:57,090 #  saul write 0 0
2020-03-31 14:29:57,092 # Writing to device #0 - LED0 (Red)
2020-03-31 14:29:57,093 # Data:	              0 
2020-03-31 14:29:57,094 # data successfully written to device #0
> saul read 1
2020-03-31 14:30:01,772 #  saul read 1
2020-03-31 14:30:01,772 # Reading from #1 (Button A|SENSE_BTN)
2020-03-31 14:30:01,773 # Data:	              0 
> 2020-03-31 14:30:06,159 #  saul read 1
2020-03-31 14:30:06,161 # Reading from #1 (Button A|SENSE_BTN)
2020-03-31 14:30:06,162 # Data:	              1 
> saul read 2
2020-03-31 14:30:11,403 #  saul read 2
2020-03-31 14:30:11,404 # Reading from #2 (Button B|SENSE_BTN)
2020-03-31 14:30:11,405 # Data:	              0 
> 2020-03-31 14:30:14,262 #  saul read 2
2020-03-31 14:30:14,263 # Reading from #2 (Button B|SENSE_BTN)
2020-03-31 14:30:14,264 # Data:	              1 
> saul read 3
2020-03-31 14:30:22,909 #  saul read 3
2020-03-31 14:30:22,910 # Reading from #3 (NRF_TEMP|SENSE_TEMP)
2020-03-31 14:30:22,911 # Data:	             27 °C
> saul read 4
2020-03-31 14:30:27,115 #  saul read 4
2020-03-31 14:30:27,117 # Reading from #4 (apds99xx|SENSE_PROXIMITY)
2020-03-31 14:30:27,118 # Data:	            255 cts
> 2020-03-31 14:30:31,775 #  saul read 4
2020-03-31 14:30:31,776 # Reading from #4 (apds99xx|SENSE_PROXIMITY)
2020-03-31 14:30:31,777 # Data:	              0 cts
> 2020-03-31 14:30:36,458 #  saul read 4
2020-03-31 14:30:36,460 # Reading from #4 (apds99xx|SENSE_PROXIMITY)
2020-03-31 14:30:36,461 # Data:	            122 cts
> saul read 5
2020-03-31 14:30:42,243 #  saul read 5
2020-03-31 14:30:42,245 # Reading from #5 (apds99xx|SENSE_LIGHT)
2020-03-31 14:30:42,246 # Data:	            201 cts
> 2020-03-31 14:30:45,378 #  saul read 5
2020-03-31 14:30:45,379 # Reading from #5 (apds99xx|SENSE_LIGHT)
2020-03-31 14:30:45,380 # Data:	           3037 cts
> 2020-03-31 14:30:49,044 #  saul read 5
2020-03-31 14:30:49,046 # Reading from #5 (apds99xx|SENSE_LIGHT)
2020-03-31 14:30:49,047 # Data:	              7 cts
> saul read 6
2020-03-31 14:30:59,686 #  saul read 6
2020-03-31 14:30:59,688 # Reading from #6 (apds99xx|SENSE_LIGHT)
2020-03-31 14:30:59,690 # Data:	[0]           4 cts
2020-03-31 14:30:59,691 # 	[1]           2 cts
2020-03-31 14:30:59,692 # 	[2]           2 cts
> 2020-03-31 14:31:03,917 #  saul read 6
2020-03-31 14:31:03,919 # Reading from #6 (apds99xx|SENSE_LIGHT)
2020-03-31 14:31:03,920 # Data:	[0]        1161 cts
2020-03-31 14:31:03,921 # 	[1]        1090 cts
2020-03-31 14:31:03,922 # 	[2]        1174 cts
> 2020-03-31 14:31:08,233 #  saul read 6
2020-03-31 14:31:08,236 # Reading from #6 (apds99xx|SENSE_LIGHT)
2020-03-31 14:31:08,237 # Data:	[0]          15 cts
2020-03-31 14:31:08,238 # 	[1]          14 cts
2020-03-31 14:31:08,239 # 	[2]          14 cts
> 2020-03-31 14:31:24,789 #  saul read 6
2020-03-31 14:31:24,791 # Reading from #6 (apds99xx|SENSE_LIGHT)
2020-03-31 14:31:24,792 # Data:	[0]          31 cts
2020-03-31 14:31:24,793 # 	[1]          39 cts
2020-03-31 14:31:24,794 # 	[2]          43 cts
> saul read 7
2020-03-31 14:31:31,424 #  saul read 7
2020-03-31 14:31:31,432 # Reading from #7 (bmp280|SENSE_TEMP)
2020-03-31 14:31:31,433 # Data:	          25.74 °C
> saul read 8
2020-03-31 14:31:34,685 #  saul read 8
2020-03-31 14:31:34,693 # Reading from #8 (bmp280|SENSE_PRESS)
2020-03-31 14:31:34,695 # Data:	           1023 hPa
> saul read 9
2020-03-31 14:31:37,365 #  saul read 9
2020-03-31 14:31:37,367 # Reading from #9 (lis3mdl|SENSE_MAG)
2020-03-31 14:31:37,368 # Data:	[0]          -5 mGs
2020-03-31 14:31:37,369 # 	[1]           0 mGs
2020-03-31 14:31:37,370 # 	[2]          -1 mGs
> saul read 9
2020-03-31 14:31:42,199 #  saul read 9
2020-03-31 14:31:42,202 # Reading from #9 (lis3mdl|SENSE_MAG)
2020-03-31 14:31:42,203 # Data:	[0]          -6 mGs
2020-03-31 14:31:42,204 # 	[1]           2 mGs
2020-03-31 14:31:42,205 # 	[2]           1 mGs
> saul read 10
2020-03-31 14:31:49,257 #  saul read 10
2020-03-31 14:31:49,259 # Reading from #10 (sht3x1|SENSE_TEMP)
2020-03-31 14:31:49,260 # Data:	          25.87 °C
> saul read 11
2020-03-31 14:31:51,967 #  saul read 11
2020-03-31 14:31:51,969 # Reading from #11 (sht3x1|SENSE_HUM)
2020-03-31 14:31:51,970 # Data:	          33.83 %
> 2020-03-31 14:31:55,390 # Exiting Pyterm

You couldn't see it but the LED0 switch worked, the button A and B read were correct (right button + right state).

@aabadie aabadie force-pushed the pr/boards/adafruit-clue branch from b8d4c55 to 35833a5 Compare March 31, 2020 12:35
@aabadie
Copy link
Contributor Author

aabadie commented Mar 31, 2020

@fjmolinas I also applied your suggestions. Let's see what Murdock has to say.

@aabadie aabadie force-pushed the pr/boards/adafruit-clue branch from 35833a5 to b4e6bcd Compare April 1, 2020 19:56
@aabadie
Copy link
Contributor Author

aabadie commented Apr 1, 2020

I pushed a fix similar to the one in #13664. Hope this will make Murdock happy this time.

@aabadie aabadie force-pushed the pr/boards/adafruit-clue branch from b4e6bcd to 81eaeb9 Compare April 2, 2020 14:25
@aabadie
Copy link
Contributor Author

aabadie commented Apr 2, 2020

No more build issues on Murdock! @fjmolinas, are you ok to squash ?

@fjmolinas
Copy link
Contributor

No more build issues on Murdock! @fjmolinas, are you ok to squash ?

Yes go ahead.

@aabadie aabadie force-pushed the pr/boards/adafruit-clue branch from 81eaeb9 to c7b365c Compare April 2, 2020 17:01
@aabadie
Copy link
Contributor Author

aabadie commented Apr 2, 2020

Yes go ahead.

Done!

@emmanuelsearch
Copy link
Member

@aabadie is this targeted at the release?

@aabadie
Copy link
Contributor Author

aabadie commented Apr 6, 2020

is this targeted at the release?

I hope it will be merged tomorrow. So yes :)

Copy link
Contributor

@fjmolinas fjmolinas left a 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.


The board is flashed using the `nrfutil` Python package.

Once `nrfutil` is installed, ase `BOARD=adafruit-clue` with the `make` command.<br/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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/>

Copy link
Contributor

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.

Copy link
Contributor Author

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)
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


### Flash the board

The board is flashed using the `nrfutil` Python package.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The board is flashed using the `nrfutil` Python package.
The board is flashed using the `nrfutil` Python package:
$ pip install nrfutil --user

Copy link
Contributor Author

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.

@fjmolinas fjmolinas self-assigned this Apr 7, 2020
@aabadie aabadie force-pushed the pr/boards/adafruit-clue branch from c7b365c to 155d6ec Compare April 7, 2020 16:12
@aabadie
Copy link
Contributor Author

aabadie commented Apr 7, 2020

Also I tested examples/default with the recent changes:

Details
make BOARD=adafruit-clue -C examples/default/ clean flash term
make: Entering directory '/work/riot/RIOT/examples/default'
Building application "default" for "adafruit-clue" with MCU "nrf52".

"make" -C /work/riot/RIOT/boards/adafruit-clue
"make" -C /work/riot/RIOT/core
"make" -C /work/riot/RIOT/cpu/nrf52
"make" -C /work/riot/RIOT/cpu/cortexm_common
"make" -C /work/riot/RIOT/cpu/cortexm_common/periph
"make" -C /work/riot/RIOT/cpu/nrf52/periph
"make" -C /work/riot/RIOT/cpu/nrf52/radio/nrf802154
"make" -C /work/riot/RIOT/cpu/nrf5x_common
"make" -C /work/riot/RIOT/cpu/nrf5x_common/periph
"make" -C /work/riot/RIOT/drivers
"make" -C /work/riot/RIOT/drivers/apds99xx
"make" -C /work/riot/RIOT/drivers/bmx280
"make" -C /work/riot/RIOT/drivers/lis3mdl
"make" -C /work/riot/RIOT/drivers/netdev_ieee802154
"make" -C /work/riot/RIOT/drivers/periph_common
"make" -C /work/riot/RIOT/drivers/saul
"make" -C /work/riot/RIOT/drivers/saul/init_devs
"make" -C /work/riot/RIOT/drivers/sht3x
"make" -C /work/riot/RIOT/sys
"make" -C /work/riot/RIOT/sys/auto_init
"make" -C /work/riot/RIOT/sys/auto_init/usb
"make" -C /work/riot/RIOT/sys/checksum
"make" -C /work/riot/RIOT/sys/div
"make" -C /work/riot/RIOT/sys/event
"make" -C /work/riot/RIOT/sys/fmt
"make" -C /work/riot/RIOT/sys/isrpipe
"make" -C /work/riot/RIOT/sys/luid
"make" -C /work/riot/RIOT/sys/net/gnrc
"make" -C /work/riot/RIOT/sys/net/gnrc/netapi
"make" -C /work/riot/RIOT/sys/net/gnrc/netif
"make" -C /work/riot/RIOT/sys/net/gnrc/netif/hdr
"make" -C /work/riot/RIOT/sys/net/gnrc/netif/ieee802154
"make" -C /work/riot/RIOT/sys/net/gnrc/netif/init_devs
"make" -C /work/riot/RIOT/sys/net/gnrc/netreg
"make" -C /work/riot/RIOT/sys/net/gnrc/pkt
"make" -C /work/riot/RIOT/sys/net/gnrc/pktbuf
"make" -C /work/riot/RIOT/sys/net/gnrc/pktbuf_static
"make" -C /work/riot/RIOT/sys/net/gnrc/pktdump
"make" -C /work/riot/RIOT/sys/net/link_layer/ieee802154
"make" -C /work/riot/RIOT/sys/net/link_layer/l2util
"make" -C /work/riot/RIOT/sys/net/netif
"make" -C /work/riot/RIOT/sys/newlib_syscalls_default
"make" -C /work/riot/RIOT/sys/od
"make" -C /work/riot/RIOT/sys/phydat
"make" -C /work/riot/RIOT/sys/ps
"make" -C /work/riot/RIOT/sys/random
"make" -C /work/riot/RIOT/sys/random/tinymt32
"make" -C /work/riot/RIOT/sys/saul_reg
"make" -C /work/riot/RIOT/sys/shell
"make" -C /work/riot/RIOT/sys/shell/commands
"make" -C /work/riot/RIOT/sys/tsrb
"make" -C /work/riot/RIOT/sys/usb/usbus
"make" -C /work/riot/RIOT/sys/usb/usbus/cdc/acm
"make" -C /work/riot/RIOT/sys/usb_board_reset
"make" -C /work/riot/RIOT/sys/xtimer
   text	   data	    bss	    dec	    hex	filename
  46800	    164	   9408	  56372	   dc34	/work/riot/RIOT/examples/default/bin/adafruit-clue/default.elf
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --sd-req 0x00B6 --application /work/riot/RIOT/examples/default/bin/adafruit-clue/default.hex /work/riot/RIOT/examples/default/bin/adafruit-clue/default.hex.zip
Zip created at /work/riot/RIOT/examples/default/bin/adafruit-clue/default.hex.zip
adafruit-nrfutil dfu serial --port=/dev/ttyACM0 --baudrate=115200 --touch=1200 --package=/work/riot/RIOT/examples/default/bin/adafruit-clue/default.hex.zip --singlebank
Upgrading target on /dev/ttyACM0 with DFU package /work/riot/RIOT/examples/default/bin/adafruit-clue/default.hex.zip. Flow control is disabled, Single bank, Touch 1200
########################################
########################################
############
Activating new firmware
Device programmed.
sleep 2
/work/riot/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200" 
2020-04-07 18:11:23,941 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
2020-04-07 18:11:24,947 # main(): This is RIOT! (Version: 2020.04-devel-1985-g155d6-pr/boards/adafruit-clue)
2020-04-07 18:11:24,948 # Welcome to RIOT!
> help
2020-04-07 18:11:26,901 #  help
2020-04-07 18:11:26,902 # Command              Description
2020-04-07 18:11:26,904 # ---------------------------------------
2020-04-07 18:11:26,905 # reboot               Reboot the node
2020-04-07 18:11:26,906 # version              Prints current RIOT_VERSION
2020-04-07 18:11:26,907 # ps                   Prints information about running threads.
2020-04-07 18:11:26,907 # random_init          initializes the PRNG
2020-04-07 18:11:26,907 # random_get           returns 32 bit of pseudo randomness
2020-04-07 18:11:26,907 # ifconfig             Configure network interfaces
2020-04-07 18:11:26,908 # txtsnd               Sends a custom string as is over the link layer
2020-04-07 18:11:26,908 # saul                 interact with sensors and actuators using SAUL
> ifconfig
2020-04-07 18:11:29,255 #  ifconfig
2020-04-07 18:11:29,256 # Iface  5  HWaddr: 8E:1F  Channel: 26  NID: 0x23
2020-04-07 18:11:29,257 # Long HWaddr: 38:92:E5:B1:D1:E8:8E:1F 
2020-04-07 18:11:29,259 #  TX-Power: 0dBm L2-PDU:102 Source address length: 2
2020-04-07 18:11:29,259 # 
> saul
2020-04-07 18:11:32,477 #  saul
2020-04-07 18:11:32,478 # ID	Class		Name
2020-04-07 18:11:32,479 # #0	ACT_SWITCH	LED0 (Red)
2020-04-07 18:11:32,480 # #1	SENSE_BTN	Button A
2020-04-07 18:11:32,481 # #2	SENSE_BTN	Button B
2020-04-07 18:11:32,482 # #3	SENSE_TEMP	NRF_TEMP
2020-04-07 18:11:32,482 # #4	SENSE_PROXIMITY	apds99xx
2020-04-07 18:11:32,483 # #5	SENSE_LIGHT	apds99xx
2020-04-07 18:11:32,483 # #6	SENSE_LIGHT	apds99xx
2020-04-07 18:11:32,483 # #7	SENSE_TEMP	bmp280
2020-04-07 18:11:32,483 # #8	SENSE_PRESS	bmp280
2020-04-07 18:11:32,483 # #9	SENSE_MAG	lis3mdl
2020-04-07 18:11:32,483 # #10	SENSE_TEMP	sht3x1
2020-04-07 18:11:32,484 # #11	SENSE_HUM	sht3x1
> 2020-04-07 18:11:34,171 # Exiting Pyterm

@fjmolinas
Copy link
Contributor

@aabadie please squash!

@aabadie aabadie force-pushed the pr/boards/adafruit-clue branch from 155d6ec to 04f890f Compare April 8, 2020 07:35
Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK.

@aabadie aabadie merged commit 75c6c38 into RIOT-OS:master Apr 8, 2020
@aabadie aabadie deleted the pr/boards/adafruit-clue branch April 8, 2020 07:50
@leandrolanzieri leandrolanzieri added this to the Release 2020.04 milestone Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: boards Area: Board ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants