Skip to content

Commit

Permalink
Add nice!nano with limited packages
Browse files Browse the repository at this point in the history
  • Loading branch information
bill88t committed Jan 2, 2025
1 parent 9b58189 commit 3affd63
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 6 deletions.
5 changes: 5 additions & 0 deletions Boardfiles/nice_nano/boot.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
00-gpio.py
01-early-connection.py
02-LEDs.py
03-reload-hostname.py
05-advance-time.lja
2 changes: 2 additions & 0 deletions Boardfiles/nice_nano/drivers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
gpiochip
led_generic
3 changes: 3 additions & 0 deletions Boardfiles/nice_nano/packages.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sysinfo
jpkg
less
7 changes: 7 additions & 0 deletions Boardfiles/nice_nano/pinout.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Nice!Nano nRF52840

SoC : nRF52840
RAM : 256KB
Storage : QSPI (1MB)
Wi-fi : False
Bluetooth : True
23 changes: 23 additions & 0 deletions Boardfiles/nice_nano/settings.toml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Raspberry Pi:<br />

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

SAMD:<br />
- Seeed Wio Terminal<br />
Expand Down
25 changes: 19 additions & 6 deletions scripts/strap_kern.py
Original file line number Diff line number Diff line change
@@ -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/")
Expand All @@ -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)
Expand Down

0 comments on commit 3affd63

Please sign in to comment.