Skip to content

Commit 2a4ccc2

Browse files
authored
Merge pull request #10932 from FoamyGuy/zephyr_aesio_
enable aesio in Zephyr port & native_sim build container
2 parents 83749c8 + f0d6f58 commit 2a4ccc2

File tree

30 files changed

+417
-53
lines changed

30 files changed

+417
-53
lines changed

ports/zephyr-cp/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,33 @@ make BOARD=nordic_nrf7002dk
2828
This uses Zephyr's cmake to generate Makefiles that then delegate to
2929
`tools/cpbuild/build_circuitpython.py` to build the CircuitPython bits in parallel.
3030

31+
## Native simulator build container
32+
33+
Building the native sim requires `libsdl2-dev:i386` and other 32bit dependencies that
34+
can cause conflicts on 64bit systems resulting in the removal of 64bit versions of critical
35+
software such as the display manager and network manager. A Containerfile and a few scripts
36+
are provided to set up a container to make the native sim build inside without affecting the
37+
host system.
38+
39+
The container automatically mounts this instance of the circuitpython repo inside at
40+
`/home/dev/circuitpython`. Changes made in the repo inside the container and on the host PC
41+
will sync automatically between host and container.
42+
43+
To use the container file:
44+
45+
1. Build the container with `podman build -t zephyr-cp-dev -f native_sim_build_Containerfile .`
46+
2. Run/Start the container by running `./native_sim_build_run_container.sh` on the host PC.
47+
The script will automatically run or start based on whether the container has been run before.
48+
3. Init requirements inside the container with `./native_sim_build_init_container.sh`
49+
50+
To delete the container and cleanup associated files:
51+
```sh
52+
podman ps -a --filter ancestor=zephyr-cp-dev -q | xargs -r podman rm -f
53+
podman rmi zephyr-cp-dev
54+
podman image prune -f
55+
podman rm -f zcp
56+
```
57+
3158
## Running the native simulator
3259

3360
From `ports/zephyr-cp`, run:

ports/zephyr-cp/boards/adafruit/feather_nrf52840_zephyr/autogen_board_info.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ _pixelmap = false
1010
_stage = false
1111
adafruit_bus_device = false
1212
adafruit_pixelbuf = false
13-
aesio = false
13+
aesio = true
1414
alarm = false
1515
analogbufio = false
1616
analogio = false
@@ -71,7 +71,7 @@ memorymap = false
7171
memorymonitor = false
7272
microcontroller = true
7373
mipidsi = false
74-
msgpack = false
74+
msgpack = true
7575
neopixel_write = false
7676
nvm = true # Zephyr board has nvm
7777
onewireio = false

ports/zephyr-cp/boards/adafruit/feather_rp2040_zephyr/autogen_board_info.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ _pixelmap = false
1010
_stage = false
1111
adafruit_bus_device = false
1212
adafruit_pixelbuf = false
13-
aesio = false
13+
aesio = true
1414
alarm = false
1515
analogbufio = false
1616
analogio = false

ports/zephyr-cp/boards/native/native_sim/autogen_board_info.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ _pixelmap = false
1010
_stage = false
1111
adafruit_bus_device = false
1212
adafruit_pixelbuf = false
13-
aesio = false
13+
aesio = true
1414
alarm = false
1515
analogbufio = false
1616
analogio = false

ports/zephyr-cp/boards/native/nrf5340bsim/autogen_board_info.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ _pixelmap = false
1010
_stage = false
1111
adafruit_bus_device = false
1212
adafruit_pixelbuf = false
13-
aesio = false
13+
aesio = true
1414
alarm = false
1515
analogbufio = false
1616
analogio = false
@@ -71,7 +71,7 @@ memorymap = false
7171
memorymonitor = false
7272
microcontroller = true
7373
mipidsi = false
74-
msgpack = false
74+
msgpack = true
7575
neopixel_write = false
7676
nvm = false
7777
onewireio = false

ports/zephyr-cp/boards/nordic/nrf5340dk/autogen_board_info.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ _pixelmap = false
1010
_stage = false
1111
adafruit_bus_device = false
1212
adafruit_pixelbuf = false
13-
aesio = false
13+
aesio = true
1414
alarm = false
1515
analogbufio = false
1616
analogio = false
@@ -71,7 +71,7 @@ memorymap = false
7171
memorymonitor = false
7272
microcontroller = true
7373
mipidsi = false
74-
msgpack = false
74+
msgpack = true
7575
neopixel_write = false
7676
nvm = false
7777
onewireio = false

ports/zephyr-cp/boards/nordic/nrf54h20dk/autogen_board_info.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ _pixelmap = false
1010
_stage = false
1111
adafruit_bus_device = false
1212
adafruit_pixelbuf = false
13-
aesio = false
13+
aesio = true
1414
alarm = false
1515
analogbufio = false
1616
analogio = false
@@ -71,7 +71,7 @@ memorymap = false
7171
memorymonitor = false
7272
microcontroller = true
7373
mipidsi = false
74-
msgpack = false
74+
msgpack = true
7575
neopixel_write = false
7676
nvm = false
7777
onewireio = false

ports/zephyr-cp/boards/nordic/nrf54l15dk/autogen_board_info.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ _pixelmap = false
1010
_stage = false
1111
adafruit_bus_device = false
1212
adafruit_pixelbuf = false
13-
aesio = false
13+
aesio = true
1414
alarm = false
1515
analogbufio = false
1616
analogio = false
@@ -71,7 +71,7 @@ memorymap = false
7171
memorymonitor = false
7272
microcontroller = true
7373
mipidsi = false
74-
msgpack = false
74+
msgpack = true
7575
neopixel_write = false
7676
nvm = false
7777
onewireio = false

ports/zephyr-cp/boards/nordic/nrf7002dk/autogen_board_info.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ i2cdisplaybus = true # Zephyr board has busio
5656
i2cioexpander = false
5757
i2ctarget = false
5858
imagecapture = false
59-
ipaddress = false
59+
ipaddress = true # Zephyr networking enabled
6060
is31fl3741 = false
6161
jpegio = false
6262
keypad = false
@@ -71,7 +71,7 @@ memorymap = false
7171
memorymonitor = false
7272
microcontroller = true
7373
mipidsi = false
74-
msgpack = false
74+
msgpack = true
7575
neopixel_write = false
7676
nvm = false
7777
onewireio = false

ports/zephyr-cp/boards/nordic/nrf7002dk/circuitpython.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ CIRCUITPY_BUILD_EXTENSIONS = ["elf"]
22
USB_VID=0x239A
33
USB_PID=0x8168
44
BLOBS=["nrf_wifi"]
5+
DISABLED_MODULES=["aesio"]

0 commit comments

Comments
 (0)