File tree 3 files changed +65
-8
lines changed
3 files changed +65
-8
lines changed Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
5
- TOOL_NAME=$( basename $1 )
6
- VERSION=$2
5
+ TOOL_DIR=$( readlink -f ${1:- .} )
6
+ TOOL_NAME=$( basename $TOOL_DIR )
7
+ VERSION=${2:- dev}
7
8
8
- BASE_DIR=$( readlink -f $( dirname $0 ) /..)
9
- TOOL_DIR=" $BASE_DIR /extra/$TOOL_NAME "
10
- if ! [ -d " $TOOL_DIR " ] || [ -z " $VERSION " ] ; then
11
- echo " Usage: $0 <tool_name> <version>"
9
+ if ! [ -f " $TOOL_DIR /go.mod" ] ; then
10
+ echo " Not a valid tool directory: $TOOL_DIR "
11
+ echo " Usage: $0 [<tool_dir>] [<version>]"
12
12
exit 1
13
13
fi
14
14
15
+ BASE_DIR=$( readlink -f $( dirname $0 ) /..)
15
16
DIR=${BASE_DIR} /distrib
16
17
17
18
hash_file () {
@@ -71,5 +72,9 @@ build_for_arch "linux" "amd64" "x86_64-linux-gnu"
71
72
build_for_arch " linux" " arm64" " aarch64-linux-gnu"
72
73
build_for_arch " darwin" " amd64" " i386-apple-darwin11"
73
74
build_for_arch " windows" " 386" " i686-mingw32"
74
- build_json
75
- echo " Build completed for $TOOL_NAME $VERSION : $DIR /$TOOL_NAME -$VERSION .json"
75
+ if [ " ${VERSION} " == " dev" ] ; then
76
+ echo " Build completed for $TOOL_NAME $VERSION in $DIR "
77
+ else
78
+ build_json
79
+ echo " Build completed for $TOOL_NAME $VERSION : $DIR /$TOOL_NAME -$VERSION .json"
80
+ fi
Original file line number Diff line number Diff line change
1
+ ## Sync Zephyr Artifacts tool
2
+
3
+ This tool fetches the pre-built files that are associated with the current
4
+ revision of the Arduino core for Zephyr. This makes it possible to use the
5
+ repository as a local core with the Arduino IDE without the need to have the
6
+ full Zephyr build system installed and configured.
7
+
8
+ Pre-built files are generated only for the most recent commits in each branch.
9
+ If in doubt, checkout the current version of the branch you are interested in
10
+ before running the tool.
11
+
12
+ ### Getting the tool
13
+
14
+ If you have installed the Arduino IDE and the Arduino core for Zephyr, you can
15
+ find the pre-built files in the ` .arduino15/packages/arduino/tools/ ` folder in
16
+ your home directory. You can directly use the tool from there.
17
+
18
+ ### Building manually
19
+
20
+ To build the tool, you need to have the Go programming language installed; make
21
+ sure you have the ` go ` command available in your PATH. Then, use the ` go build `
22
+ command to build the tool for your platform.
23
+
24
+ To build the full set of binaries for all platforms, run the ` package_tool.sh `
25
+ script in the parent directory with ` ../package_tool.sh ` , or provide the path
26
+ to this directory as an argument.
Original file line number Diff line number Diff line change
1
+ ## Zephyr Sketch Tool
2
+
3
+ This tool converts various binary files into a format that can be used
4
+ by the Zephyr loader.
5
+
6
+ The loader expects to find a specific header in a fixed location in the binary
7
+ file, with information about the sketch and the build options chosen by the
8
+ user. The location of the header was selected so that it affects unused bytes
9
+ in the ELF file format; when dealing with binary files, 16 bytes are added at
10
+ the beginning to reserve space for the header.
11
+
12
+ ### Getting the tool
13
+
14
+ If you have installed the Arduino IDE and the Arduino core for Zephyr, you can
15
+ find the pre-built files in the ` .arduino15/packages/arduino/tools/ ` folder in
16
+ your home directory. You can directly use the tool from there.
17
+
18
+ ### Building manually
19
+
20
+ To build the tool, you need to have the Go programming language installed; make
21
+ sure you have the ` go ` command available in your PATH. Then, use the ` go build `
22
+ command to build the tool for your platform.
23
+
24
+ To build the full set of binaries for all platforms, run the ` package_tool.sh `
25
+ script in the parent directory with ` ../package_tool.sh ` , or provide the path
26
+ to this directory as an argument.
You can’t perform that action at this time.
0 commit comments