Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/githubci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ jobs:

- name: Build blink for ${{ matrix.board }}
run: pio run -d tests/blink -e ${{ matrix.board }}

- name: Build the bundled libraries for ${{ matrix.board }}
run: pio run -d tests/libraries -e ${{ matrix.board }}
10 changes: 10 additions & 0 deletions tests/libraries/platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
; Compile test for the libraries bundled with the framework. Blink only pulls
; in the core, so without this CI never builds them.
;
; Boards, platform and the framework symlink come from tests/blink, so the two
; tests can't drift apart:
;
; pio run -d tests/libraries -e xiao_nrf54l15

[platformio]
extra_configs = ../blink/platformio.ini
57 changes: 57 additions & 0 deletions tests/libraries/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#include <Arduino.h>

// Compile test for the libraries bundled with the framework: every library is
// included and used, so CI builds and links each of them for every board.
// Nothing here is meant to run on hardware; the pins are just valid numbers.
//
// Left out:
// - BLEAdafruitService needs Adafruit sensor libraries from the registry.
// - PDM and Servo stop with #error on anything but nRF52, and BLEHomekit
// doesn't compile here: none of the three has been ported to the nRF54L.

#include <Adafruit_LittleFS.h>
#include <InternalFileSystem.h>
#include <RotaryEncoder.h>
#include <SPI.h>
#include <SoftwareSerial.h>
#include <Wire.h>
#include <bluefruit.h>
#include <nRF54Crypto.h>

using namespace Adafruit_LittleFS_Namespace;

BLEUart bleuart;
SoftwareSerial swSerial(PIN_SERIAL1_RX, PIN_SERIAL1_TX);

void setup() {
Serial.begin(115200);
Serial.println("libraries");
Serial.flush();
Serial.end();

uint8_t buf[16];
nRF54Crypto.begin();
nRF54Crypto.random(buf, sizeof(buf));
nRF54Crypto.end();

InternalFS.begin();
File file = InternalFS.open("/test", FILE_O_WRITE);
if (file) {
file.write(buf, sizeof(buf));
file.close();
}

Bluefruit.begin();
bleuart.begin();
Bluefruit.Advertising.addService(bleuart);
Bluefruit.Advertising.start(0);

Wire.begin();
SPI.begin();
swSerial.begin(9600);
RotaryEncoder.begin(PIN_SERIAL1_RX, PIN_SERIAL1_TX);
}

void loop() {
delay(1000);
}
9 changes: 9 additions & 0 deletions variants/nrf54l05dk/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,21 @@ static const uint8_t SCK = PIN_SPI_SCK;

/*
* Wire Interfaces
*
* TWIM22, as on the nRF54L15 boards. The default NRF_TWIM0 alias is TWIM20,
* which shares SERIAL20 with UARTE20 (Serial2): both would define
* SERIAL20_IRQHandler, and a sketch using Wire wouldn't link.
*/
#define WIRE_INTERFACES_COUNT 1

#define PIN_WIRE_SDA (37) // P1.05 (or adjust per DK routing)
#define PIN_WIRE_SCL (38) // P1.06

#define WIRE_TWIM NRF_TWIM22
#define WIRE_TWIS NRF_TWIS22
#define WIRE_IRQN SERIAL22_IRQn
#define WIRE_IRQ_HANDLER SERIAL22_IRQHandler

#ifdef __cplusplus
}
#endif
Expand Down
9 changes: 9 additions & 0 deletions variants/nrf54l10dk/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,21 @@ static const uint8_t SCK = PIN_SPI_SCK;

/*
* Wire Interfaces
*
* TWIM22, as on the nRF54L15 boards. The default NRF_TWIM0 alias is TWIM20,
* which shares SERIAL20 with UARTE20 (Serial2): both would define
* SERIAL20_IRQHandler, and a sketch using Wire wouldn't link.
*/
#define WIRE_INTERFACES_COUNT 1

#define PIN_WIRE_SDA (37) // P1.05 (or adjust per DK routing)
#define PIN_WIRE_SCL (38) // P1.06

#define WIRE_TWIM NRF_TWIM22
#define WIRE_TWIS NRF_TWIS22
#define WIRE_IRQN SERIAL22_IRQn
#define WIRE_IRQ_HANDLER SERIAL22_IRQHandler

#ifdef __cplusplus
}
#endif
Expand Down
Loading