Skip to content

Instantly share code, notes, and snippets.

@mbolivar
Created January 31, 2020 18:44
Show Gist options
  • Save mbolivar/614e9bb41c399a2b7a80616ddd5c7e9d to your computer and use it in GitHub Desktop.
Save mbolivar/614e9bb41c399a2b7a80616ddd5c7e9d to your computer and use it in GitHub Desktop.
$ mkdir -p template-module/zephyr
$ touch template-module/zephyr/{CMakeLists.txt,Kconfig}
$ cat zephyr/samples/hello_world/CMakeLists.txt
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.13.1)
set(ZEPHYR_EXTRA_MODULES "/home/mbolivar/zp/template-module")
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(hello_world)
target_sources(app PRIVATE src/main.c)
$ west build -b qemu_cortex_m3 -s zephyr/samples/hello_world/ >/dev/null
$ grep template build/zephyr_modules.txt
"template-module":"/home/mbolivar/zp/template-module/zephyr"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment