Skip to content

Commit 3affd63

Browse files
committed
Add nice!nano with limited packages
1 parent 9b58189 commit 3affd63

File tree

7 files changed

+60
-6
lines changed

7 files changed

+60
-6
lines changed

Boardfiles/nice_nano/boot.txt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
00-gpio.py
2+
01-early-connection.py
3+
02-LEDs.py
4+
03-reload-hostname.py
5+
05-advance-time.lja

Boardfiles/nice_nano/drivers.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
gpiochip
2+
led_generic

Boardfiles/nice_nano/packages.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sysinfo
2+
jpkg
3+
less

Boardfiles/nice_nano/pinout.map

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Nice!Nano nRF52840
2+
3+
SoC : nRF52840
4+
RAM : 256KB
5+
Storage : QSPI (1MB)
6+
Wi-fi : False
7+
Bluetooth : True

Boardfiles/nice_nano/settings.toml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
CIRCUITPY_PYSTACK_SIZE = 6144
2+
3+
[BERYLLIUM]
4+
setup = true
5+
6+
fs_label = "BERYLLIUM"
7+
8+
serial_console_enabled = true
9+
usb_msc_available = true
10+
usb_hid_available = true
11+
usb_midi_available = true
12+
wifi_available = false
13+
ble_available = false
14+
blc_available = false
15+
usb_msc_enabled = false
16+
usb_hid_enabled = false
17+
usb_midi_enabled = false
18+
tz_offset = 2
19+
20+
ledtype = "generic"
21+
led = "LED"
22+
23+
DEBUG = false

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Raspberry Pi:<br />
5959

6060
Nordic:<br />
6161
- Seeed XIAO nRF52840 (Sense)<br />
62+
- Nice!Nano (Limited storage and preinstalled packages)<br />
6263

6364
SAMD:<br />
6465
- Seeed Wio Terminal<br />

scripts/strap_kern.py

+19-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from os import system, listdir, path, getcwd, environ, chdir
1+
from os import system, listdir, path, getcwd, environ, chdir, remove
22
from sys import path as spath
33

44
spath.append("../scripts/CircuitMPY/")
@@ -16,16 +16,29 @@
1616
)
1717
exit(1)
1818

19+
low_storage = False
20+
if board in ["nice_nano"]:
21+
low_storage = True
22+
23+
target_root = f"{boardpath}/Beryllium"
24+
25+
if low_storage:
26+
print("Removing manual pages to save space..")
27+
for i in listdir(f"{target_root}/usr/share/man"):
28+
remove(f"{target_root}/usr/share/man/{i}")
29+
1930
olddir = getcwd()
2031
print("[-/-] Strapping core packages..")
2132
chdir("../scripts/jpkgstrap/")
22-
target_root = boardpath + "/Beryllium"
2333
if target_root.startswith("build"):
24-
target_root = "../../source/" + target_root
34+
target_root = f"../../source/{target_root}"
2535
target_root = path.abspath(target_root)
26-
cmd = "python3 jpkgstrap.py " + target_root + " -U"
27-
for i in ["cptoml", "jcurses", "jz", "kernel", "manual"]:
28-
cmd += " ../../source/core_packages/" + i + ".jpk"
36+
cmd = f"python3 jpkgstrap.py {target_root} -U"
37+
core_pkgs = ["cptoml", "jcurses", "jz", "kernel"]
38+
if not low_storage:
39+
core_pkgs.append("manual")
40+
for i in core_pkgs:
41+
cmd += f" ../../source/core_packages/{i}.jpk"
2942
system(cmd)
3043

3144
chdir(olddir)

0 commit comments

Comments
 (0)