Skip to content
This repository was archived by the owner on Nov 19, 2022. It is now read-only.

Commit e5b8b50

Browse files
committed
Add west utility
1 parent c4b8b4c commit e5b8b50

File tree

9 files changed

+32
-24
lines changed

9 files changed

+32
-24
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "system/zephyr"]
22
path = system/zephyr
33
url = https://github.com/zephyrproject-rtos/zephyr
4+
[submodule "system/.west/west"]
5+
path = system/.west/west
6+
url = https://github.com/zephyrproject-rtos/west

boards.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
bbc_microbit.name=BBC micro:bit
2-
bbc_microbit.upload.tool=intiki
3-
bbc_microbit.upload.protocol=intiki
2+
bbc_microbit.upload.tool=west
3+
bbc_microbit.upload.protocol=west
44
bbc_microbit.build.mcu=cortex-m0
55
bbc_microbit.build.board=bbc_microbit
66
bbc_microbit.build.f_cpu=32000000L
@@ -11,8 +11,8 @@ bbc_microbit.build.compiler.path.linux=/opt/zephyr-sdk/sysroots/x86_64-pokysdk-l
1111
bbc_microbit.build.compiler.triplet=arm-none-eabi
1212

1313
nrf52840_pca10056.name=nRF52840 Development Kit
14-
nrf52840_pca10056.upload.tool=intiki
15-
nrf52840_pca10056.upload.protocol=intiki
14+
nrf52840_pca10056.upload.tool=west
15+
nrf52840_pca10056.upload.protocol=west
1616
nrf52840_pca10056.build.mcu=cortex-m0
1717
nrf52840_pca10056.build.board=nrf52840_pca10056
1818
nrf52840_pca10056.build.f_cpu=32000000L

dist/platform_template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{
1717
"packager": "scirocco",
1818
"name": "intiki",
19-
"version": "1.0.1"
19+
"version": "1.0.2"
2020
}
2121
]
2222
}

dist/submodules.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
[
2+
{
3+
"path": "system/.west/west",
4+
"url": "https://github.com/zephyrproject-rtos/west",
5+
"revision": "ab560b5c64551cadffe191eecd79ff979cec3c8d"
6+
},
27
{
38
"path": "system/zephyr",
49
"url": "https://github.com/zephyrproject-rtos/zephyr",
5-
"revision": "7ab282703509b030b8bdc3ff9c247f860ebfabf9"
10+
"revision": "588d7b068c9166f043ccb0f9bf50bf39d0173cee"
611
}
712
]
13+

platform.txt

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ compiler.ar.extra_flags=
2626
# Makefile generate patterns
2727
# --------------------
2828

29-
build.unix.cmds.path={runtime.tools.msys2-contiki-build.path}
30-
build.usr.bin.path={build.unix.cmds.path}/usr/binx
31-
build.usr.bin.path.macosx=/usr/local/bin
3229
build.make.command=cmake
3330
build.make.command.windows={runtime.platform.path}/system/support/wsl_wrap.bat
3431
build.intiki.verbose=-1
@@ -38,7 +35,7 @@ intiki.cmd={runtime.tools.intiki.path}/intiki
3835
intiki.cmd-v={intiki.cmd} {compiler.warning_flags} -verbose {build.intiki.verbose}
3936
intiki.opts=
4037
intiki.opts.windows=-path.format msys -path.prefix /mnt
41-
make.paths=-build.usr.bin.path "{build.usr.bin.path}" -build.compiler.path "{build.compiler.path}" -build.system.path "{build.system.path}" -build.variant.path "{build.variant.path}" -build.core.path "{build.core.path}" -build.path "{build.path}" -build.variant {build.variant} -runtime.platform.path {runtime.platform.path} -platform.version {version} {intiki.opts}
38+
make.paths=-build.compiler.path "{build.compiler.path}" -build.system.path "{build.system.path}" -build.variant.path "{build.variant.path}" -build.core.path "{build.core.path}" -build.path "{build.path}" -build.variant {build.variant} -runtime.platform.path {runtime.platform.path} -platform.version {version} {intiki.opts}
4239
make.args=-E env {build.zephyr.env} cmake -DARDUINO_BUILD_PATH={build.path} -DARDUINO_VARIANT_PATH={build.variant.path} -DARDUINO_PREPROC_SOURCE={source_file} -DARDUINO_PREPROC_TARGET={preprocessed_file_path} -DBOARD={build.variant}
4340

4441
arduino.defines=-DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch}
@@ -80,17 +77,8 @@ recipe.hooks.objcopy.preobjcopy.1.pattern={intiki.cmd-v} -recipe makefile {make.
8077
recipe.hooks.objcopy.preobjcopy.2.pattern={intiki.cmd-v} -recipe make {make.paths} -make.command {build.make.command} -- {make.args} -P {build.system.path}/support/build.cmake
8178

8279

83-
tools.intiki.path={runtime.tools.intiki.path}
84-
tools.intiki.cmd.path={path}/intiki
85-
tools.intiki.cmd.path.windows={path}\intiki.exe
86-
tools.intiki.upload.pattern="{cmd.path}" -recipe make -make.command {build.make.command} -- -E chdir {build.path} {build.make.command} -E env ZEPHYR_BASE={build.system.path}/zephyr {build.make.command} --build . -- flash
87-
tools.intiki.build.unix.cmds.path={runtime.tools.msys2-contiki-build.path}
88-
tools.intiki.build.usr.bin.path={build.unix.cmds.path}/usr/binx
89-
tools.intiki.build.usr.bin.path.macosx=/usr/local/bin
90-
tools.intiki.build.intiki.verbose=-1
91-
tools.intiki.build.make.command=cmake
92-
tools.intiki.build.zephyr.env=ZEPHYR_BASE={build.system.path}/zephyr ZEPHYR_TOOLCHAIN_VARIANT=cross-compile CROSS_COMPILE={build.compiler.path}/{build.compiler.triplet}-
93-
94-
95-
tools.intiki.upload.params.verbose=
96-
tools.intiki.upload.params.quiet=
80+
tools.west.upload.cmd.windows={runtime.platform.path}/system/support/west_wrap.bat
81+
tools.west.upload.cmd={runtime.platform.path}/system/support/west_wrap.sh
82+
tools.west.upload.pattern={upload.cmd} -z {runtime.platform.path}/system/zephyr flash --skip-rebuild --build-dir {build.path} --hex-file {build.path}/zephyr/zephyr.hex
83+
tools.west.upload.params.verbose=
84+
tools.west.upload.params.quiet=

system/.west/config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[manifest]
2+
path = zephyr
3+

system/.west/west

Submodule west added at ab560b5

system/support/west_wrap.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@echo off
2+
set PATH=%PATH%;C:\Users\%USERNAME%\AppData\Roaming\Python\Python37\Scripts
3+
cd %~dp0\..
4+
west %*

system/support/west_wrap.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
cd `dirname $0`
3+
west $*

0 commit comments

Comments
 (0)