Skip to content

Commit 642cc64

Browse files
committed
Zephyr: PR Fixes
Signed-off-by: Zingo Andersen <Zingo.Andersen@arm.com> Change-Id: I8fc09f92447475f0735686f1e29d9040f796b73f
1 parent 66dafd5 commit 642cc64

3 files changed

Lines changed: 16 additions & 9 deletions

File tree

.ci/scripts/test_zephyr.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,28 @@ Options:
3232
EOF
3333
}
3434

35+
require_value() {
36+
if [[ -z "${2:-}" || "${2:-}" == -* ]]; then
37+
echo "ERROR: $1 requires a non-empty argument" >&2
38+
usage >&2
39+
exit 1
40+
fi
41+
}
42+
3543
while [[ $# -gt 0 ]]; do
3644
case "$1" in
3745
--zephyr-samples-readme-path)
46+
require_value "$1" "${2:-}"
3847
ZEPHYR_SAMPLES_README_PATH="$2"
3948
shift 2
4049
;;
4150
--zephyr-dev-root)
51+
require_value "$1" "${2:-}"
4252
ZEPHYR_DEV_ROOT="$2"
4353
shift 2
4454
;;
4555
--targets)
56+
require_value "$1" "${2:-}"
4657
TARGETS_ARG="$2"
4758
shift 2
4859
;;

docs/source/zephyr_alif_tutorial.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,14 @@ I [executorch:main.cpp]
383383
I [executorch:main.cpp] MobileNetV2 Demo Complete
384384
I [executorch:main.cpp] Model size: 3380576 bytes
385385
I [executorch:main.cpp] Input: [1, 3, 224, 224] NCHW RGB tensor (150528 bytes)
386-
I [executorch:main.cpp] Output: 1000 ImageNet classes (top-5 shown)
386+
I [executorch:main.cpp] Output: 1000 classes (top-5 shown)
387387
I [executorch:main.cpp] Inference time: 30 ms
388388
I [executorch:main.cpp] ========================================
389389
```
390390

391-
All predictions show `0.0000` because `mv2_untrained` has random weights.
392-
Use `mv2` (with torchvision pretrained weights) for meaningful class scores.
391+
Use `mv2_untrained` instead of `mv2` if you want to avoid downloading
392+
pretrained weights. In that case the class scores are arbitrary and may all be
393+
close to `0.0000`.
393394

394395
## Troubleshooting
395396

examples/zephyr/x86_64-linux-arm-zephyr-eabi-gcc.cmake

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,7 @@ add_compile_definitions("$<$<NOT:$<CONFIG:DEBUG>>:NDEBUG>")
5656

5757
# Link options
5858
add_link_options(-mcpu=${GCC_CPU} -mthumb)
59-
60-
# Zephyr SDK GCC defaults to Picolibc and does not ship GNU Arm's
61-
# nosys.specs/rdimon.specs files.
62-
if(SEMIHOSTING)
63-
add_link_options(-lsemihost)
64-
endif()
59+
add_link_options("-T${CMAKE_CURRENT_LIST_DIR}/generic-no-memory.ld")
6560

6661
# Set floating point unit
6762
if(CMAKE_SYSTEM_PROCESSOR MATCHES "\\+fp")

0 commit comments

Comments
 (0)