Skip to content

Commit ae8a65b

Browse files
committed
wip
1 parent fbf3a62 commit ae8a65b

File tree

6 files changed

+40
-0
lines changed

6 files changed

+40
-0
lines changed

boards/vendor/custom_plank/board.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,13 @@ include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
1111
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
1212
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
1313
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)
14+
1415
include(${CMAKE_CURRENT_LIST_DIR}/example_runner.board.cmake)
16+
17+
# Create a custom simulator to run with the simulation runner during testing
18+
set(SUPPORTED_EMU_PLATFORMS custom)
19+
add_custom_target(run_custom
20+
COMMAND west simulate --runner=example
21+
DEPENDS ${logical_target_for_zephyr_elf}
22+
USES_TERMINAL
23+
)

boards/vendor/custom_plank/custom_plank.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ toolchain:
1212
- zephyr
1313
- gnuarmemb
1414
- xtools
15+
simulation:
16+
- name: custom
1517
supported:
1618
- gpio

tests/runner/example/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (c) 2024 Basalte bv
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
cmake_minimum_required(VERSION 3.20.0)
5+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
6+
project(app_example_runner_test)
7+
8+
list(APPEND CMAKE_MODULE_PATH ${ZEPHYR_BASE}/modules)
9+
include(west)
10+
11+
target_sources(app PRIVATE src/main.c)

tests/runner/example/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Intentionally empty

tests/runner/example/src/main.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright (c) 2024 Basalte bv
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
int main(void)
8+
{
9+
/* Intentionally empty */
10+
}

tests/runner/example/testcase.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
common:
2+
platform_allow:
3+
- custom_plank
4+
integration_platforms:
5+
- custom_plank
6+
tests:
7+
runner.example: {}

0 commit comments

Comments
 (0)