diff --git a/Boardfiles/nice_nano/boot.txt b/Boardfiles/nice_nano/boot.txt
new file mode 100644
index 0000000..e0f85ad
--- /dev/null
+++ b/Boardfiles/nice_nano/boot.txt
@@ -0,0 +1,5 @@
+00-gpio.py
+01-early-connection.py
+02-LEDs.py
+03-reload-hostname.py
+05-advance-time.lja
diff --git a/Boardfiles/nice_nano/drivers.txt b/Boardfiles/nice_nano/drivers.txt
new file mode 100644
index 0000000..a0dc4e8
--- /dev/null
+++ b/Boardfiles/nice_nano/drivers.txt
@@ -0,0 +1,2 @@
+gpiochip
+led_generic
diff --git a/Boardfiles/nice_nano/packages.txt b/Boardfiles/nice_nano/packages.txt
new file mode 100644
index 0000000..7a78979
--- /dev/null
+++ b/Boardfiles/nice_nano/packages.txt
@@ -0,0 +1,3 @@
+sysinfo
+jpkg
+less
diff --git a/Boardfiles/nice_nano/pinout.map b/Boardfiles/nice_nano/pinout.map
new file mode 100644
index 0000000..f1d9d43
--- /dev/null
+++ b/Boardfiles/nice_nano/pinout.map
@@ -0,0 +1,7 @@
+Nice!Nano nRF52840
+
+SoC : nRF52840
+RAM : 256KB
+Storage : QSPI (1MB)
+Wi-fi : False
+Bluetooth : True
diff --git a/Boardfiles/nice_nano/settings.toml b/Boardfiles/nice_nano/settings.toml
new file mode 100644
index 0000000..f665b8b
--- /dev/null
+++ b/Boardfiles/nice_nano/settings.toml
@@ -0,0 +1,23 @@
+CIRCUITPY_PYSTACK_SIZE = 6144
+
+[BERYLLIUM]
+setup = true
+
+fs_label = "BERYLLIUM"
+
+serial_console_enabled = true
+usb_msc_available = true
+usb_hid_available = true
+usb_midi_available = true
+wifi_available = false
+ble_available = false
+blc_available = false
+usb_msc_enabled = false
+usb_hid_enabled = false
+usb_midi_enabled = false
+tz_offset = 2
+
+ledtype = "generic"
+led = "LED"
+
+DEBUG = false
diff --git a/README.md b/README.md
index d128455..1d4ca42 100644
--- a/README.md
+++ b/README.md
@@ -59,6 +59,7 @@ Raspberry Pi:
Nordic:
- Seeed XIAO nRF52840 (Sense)
+ - Nice!Nano (Limited storage and preinstalled packages)
SAMD:
- Seeed Wio Terminal
diff --git a/scripts/strap_kern.py b/scripts/strap_kern.py
index 5be8eb9..5611120 100644
--- a/scripts/strap_kern.py
+++ b/scripts/strap_kern.py
@@ -1,4 +1,4 @@
-from os import system, listdir, path, getcwd, environ, chdir
+from os import system, listdir, path, getcwd, environ, chdir, remove
from sys import path as spath
spath.append("../scripts/CircuitMPY/")
@@ -16,16 +16,29 @@
)
exit(1)
+low_storage = False
+if board in ["nice_nano"]:
+ low_storage = True
+
+target_root = f"{boardpath}/Beryllium"
+
+if low_storage:
+ print("Removing manual pages to save space..")
+ for i in listdir(f"{target_root}/usr/share/man"):
+ remove(f"{target_root}/usr/share/man/{i}")
+
olddir = getcwd()
print("[-/-] Strapping core packages..")
chdir("../scripts/jpkgstrap/")
-target_root = boardpath + "/Beryllium"
if target_root.startswith("build"):
- target_root = "../../source/" + target_root
+ target_root = f"../../source/{target_root}"
target_root = path.abspath(target_root)
-cmd = "python3 jpkgstrap.py " + target_root + " -U"
-for i in ["cptoml", "jcurses", "jz", "kernel", "manual"]:
- cmd += " ../../source/core_packages/" + i + ".jpk"
+cmd = f"python3 jpkgstrap.py {target_root} -U"
+core_pkgs = ["cptoml", "jcurses", "jz", "kernel"]
+if not low_storage:
+ core_pkgs.append("manual")
+for i in core_pkgs:
+ cmd += f" ../../source/core_packages/{i}.jpk"
system(cmd)
chdir(olddir)