Skip to content

Commit db2d03d

Browse files
committed
Zephyr fixes
1. Fix flash writing with more than 32 filesystem blocks per erase page and add a test for it. 2. Fix Feather UF2 to place code in the right spot (the code partition).
1 parent f30c408 commit db2d03d

File tree

8 files changed

+324
-111
lines changed

8 files changed

+324
-111
lines changed

ports/zephyr-cp/Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ifeq ($(DEBUG),1)
2121
WEST_CMAKE_ARGS += -Dzephyr-cp_EXTRA_CONF_FILE=$(DEBUG_CONF_FILE)
2222
endif
2323

24-
.PHONY: $(BUILD)/zephyr-cp/zephyr/zephyr.elf flash recover debug debug-jlink debugserver attach run run-sim clean menuconfig all clean-all test fetch-port-submodules
24+
.PHONY: $(BUILD)/zephyr-cp/zephyr/zephyr.elf flash recover debug debug-jlink debugserver attach run run-sim clean menuconfig all clean-all sim clean-sim test fetch-port-submodules
2525

2626
$(BUILD)/zephyr-cp/zephyr/zephyr.elf:
2727
python cptools/pre_zephyr_build_prep.py $(BOARD)
@@ -87,6 +87,13 @@ all:
8787
clean-all:
8888
rm -rf build build-*
8989

90+
# Build all sim boards concurrently using the same jobserver as `make all`.
91+
sim:
92+
+python cptools/build_all_boards.py --vendor native --continue-on-error
93+
94+
clean-sim:
95+
rm -rf $(wildcard build-native_*)
96+
9097
test: build-native_native_sim/zephyr-cp/zephyr/zephyr.exe
9198
pytest cptools/tests
9299
pytest tests/ -v

ports/zephyr-cp/cptools/build_all_boards.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,12 @@ def main():
426426
action="store_true",
427427
help="Continue building remaining boards even if one fails",
428428
)
429+
parser.add_argument(
430+
"--vendor",
431+
type=str,
432+
default=None,
433+
help="Only build boards from this vendor (e.g. 'native' for sim boards)",
434+
)
429435

430436
args = parser.parse_args()
431437

@@ -439,6 +445,9 @@ def main():
439445
# Discover all boards
440446
boards = discover_boards(port_dir)
441447

448+
if args.vendor:
449+
boards = [(v, b) for v, b in boards if v == args.vendor]
450+
442451
if not boards:
443452
print("ERROR: No boards found!")
444453
return 1

ports/zephyr-cp/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
CONFIG_SYS_HEAP_RUNTIME_STATS=n
22
CONFIG_FLASH=y
33
CONFIG_FLASH_MAP=y
4+
CONFIG_USE_DT_CODE_PARTITION=y
45

56
CONFIG_DYNAMIC_INTERRUPTS=y
67
CONFIG_UART_INTERRUPT_DRIVEN=y

0 commit comments

Comments
 (0)