2011-03-12 16:36:28 +01:00
|
|
|
tools/README.txt
|
2012-11-13 21:24:30 +01:00
|
|
|
================
|
2011-03-12 16:36:28 +01:00
|
|
|
|
|
|
|
This README file addresses the contents of the NuttX tools/ directory.
|
|
|
|
|
|
|
|
The tools/ directory contains miscellaneous scripts and host C programs
|
2013-08-27 17:40:19 +02:00
|
|
|
that are necessary parts of the NuttX build system. These files
|
2011-03-12 16:36:28 +01:00
|
|
|
include:
|
|
|
|
|
2019-02-07 19:11:40 +01:00
|
|
|
cmpconfig.c
|
|
|
|
-----------
|
2018-05-29 20:14:55 +02:00
|
|
|
|
2019-02-07 19:11:40 +01:00
|
|
|
This C file can be used to build a utility for comparing two NuttX
|
|
|
|
configuration files.
|
2018-05-29 20:14:55 +02:00
|
|
|
|
2019-02-07 19:11:40 +01:00
|
|
|
Config.mk
|
2012-11-13 21:24:30 +01:00
|
|
|
---------
|
|
|
|
|
2018-05-29 20:14:55 +02:00
|
|
|
Config.mk contains common definitions used by many configuration files.
|
2012-11-13 21:24:30 +01:00
|
|
|
This file (along with <nuttx>/.config) must be included at the top of
|
|
|
|
each configuration-specific Make.defs file like:
|
|
|
|
|
2020-05-18 21:42:11 +02:00
|
|
|
include $(TOPDIR)/.config
|
2012-11-13 21:24:30 +01:00
|
|
|
include $(TOPDIR)/tools/Config.mk
|
|
|
|
|
|
|
|
Subsequent logic within the configuration-specific Make.defs file may then
|
|
|
|
override these default definitions as necessary.
|
2011-03-12 16:36:28 +01:00
|
|
|
|
2020-03-10 04:55:22 +01:00
|
|
|
checkpatch.sh
|
|
|
|
-------------
|
|
|
|
checkpatch.sh is a bash script that make use of nxstyle and codespell tools
|
|
|
|
to format patches and files conform to NuttX coding standard. For example,
|
|
|
|
it has been used in NuttX github action PR check build.
|
|
|
|
|
|
|
|
$ tools/checkpatch.sh -h
|
|
|
|
USAGE: ./tools/checkpatch.sh [options] [list|-]
|
|
|
|
|
|
|
|
Options:
|
|
|
|
-h
|
|
|
|
-c spell check with codespell(install with: pip install codespell)
|
|
|
|
-r range check only (coupled with -p or -g)
|
|
|
|
-p <patch list> (default)
|
|
|
|
-g <commit list>
|
|
|
|
-f <file list>
|
|
|
|
- read standard input mainly used by git pre-commit hook as below:
|
|
|
|
git diff --cached | ./tools/checkpatch.sh -
|
2020-04-13 10:55:47 +02:00
|
|
|
Where a <commit list> is any syntax supported by git for specifying git revision, see GITREVISIONS(7)
|
|
|
|
Where a <patch file names> is a space separated list of patch file names or wildcard. or *.patch
|
2020-03-10 04:55:22 +01:00
|
|
|
|
2011-03-12 16:36:28 +01:00
|
|
|
configure.sh
|
2013-01-04 22:37:31 +01:00
|
|
|
configure.bat
|
|
|
|
configure.c, cfgparser.c, and cfgparser.h
|
2012-11-13 21:24:30 +01:00
|
|
|
------------
|
2011-03-12 16:36:28 +01:00
|
|
|
|
2013-01-04 22:37:31 +01:00
|
|
|
configure.sh is a bash script that is used to configure NuttX for a given
|
|
|
|
target board in a environment that supports POSIX paths (Linux, Cygwin,
|
2020-10-19 06:09:06 +02:00
|
|
|
macOS, or similar). See boards/README.txt or Documentation/NuttXPortingGuide.html
|
2011-03-12 16:36:28 +01:00
|
|
|
for a description of how to configure NuttX with this script.
|
|
|
|
|
2013-01-04 22:37:31 +01:00
|
|
|
configure.c, cfgparser.c, and cfgparser.h can be used to build a work-alike
|
|
|
|
program as a replacement for configure.sh. This work-alike program would be
|
|
|
|
used in environments that do not support Bash scripting (such as the Windows
|
|
|
|
native environment).
|
|
|
|
|
|
|
|
configure.bat is a small Windows batch file that can be used as a replacement
|
|
|
|
for configure.sh in a Windows native environment. configure.bat is actually
|
2014-08-30 01:44:15 +02:00
|
|
|
just a thin layer that executes configure.exe if it is available. If
|
2013-01-04 22:37:31 +01:00
|
|
|
configure.exe is not available, then configure.bat will attempt to build it
|
|
|
|
first.
|
|
|
|
|
2019-08-19 19:30:12 +02:00
|
|
|
In order to build configure.exe from configure.c in the Windows native
|
2013-01-04 22:37:31 +01:00
|
|
|
environment, two assumptions are made:
|
|
|
|
|
|
|
|
1) You have installed the MinGW GCC toolchain. This toolchain can be
|
2019-08-19 19:30:12 +02:00
|
|
|
downloaded from http://www.mingw.org/. It is recommended that you not
|
2013-01-04 22:37:31 +01:00
|
|
|
install the optional MSYS components as there may be conflicts.
|
2019-08-19 19:30:12 +02:00
|
|
|
2) That path to the bin/ directory containing mingw-gcc.exe must be
|
2013-01-04 22:37:31 +01:00
|
|
|
included in the PATH variable.
|
|
|
|
|
2018-12-02 02:15:31 +01:00
|
|
|
convert-comments.c
|
|
|
|
------------------
|
|
|
|
|
|
|
|
Convert C++-style comments to C89 C-style comments. Usage:
|
|
|
|
|
2018-12-03 15:45:05 +01:00
|
|
|
convert-comments <source-file> <out-file>
|
|
|
|
|
|
|
|
detab.c
|
|
|
|
-------
|
|
|
|
|
|
|
|
Convert tabs to spaces in a file. Usage:
|
|
|
|
|
|
|
|
detab [-4] <source-file> <out-file>
|
|
|
|
|
|
|
|
Default <source-file> tab size is 8 spaces; -4 selects 4 space tab size.
|
2018-12-02 02:15:31 +01:00
|
|
|
|
2012-09-12 22:14:46 +02:00
|
|
|
discover.py
|
2012-11-13 21:24:30 +01:00
|
|
|
-----------
|
2012-09-12 22:14:46 +02:00
|
|
|
|
|
|
|
Example script for discovering devices in the local network.
|
|
|
|
It is the counter part to apps/netutils/discover
|
|
|
|
|
2018-03-20 14:31:13 +01:00
|
|
|
gencromfs.c
|
|
|
|
-----------
|
|
|
|
|
|
|
|
This is a C program that is used to generate CROMFS file system images.
|
|
|
|
Usage is simple:
|
|
|
|
|
|
|
|
gencromfs <dir-path> <out-file>
|
|
|
|
|
|
|
|
Where:
|
|
|
|
|
|
|
|
<dir-path> is the path to the directory will be at the root of the
|
|
|
|
new CROMFS file system image.
|
|
|
|
<out-file> the name of the generated, output C file. This file must
|
|
|
|
be compiled in order to generate the binary CROMFS file system
|
|
|
|
image.
|
|
|
|
|
2017-06-02 18:17:30 +02:00
|
|
|
initialconfig.c
|
|
|
|
---------------
|
|
|
|
|
2019-08-19 19:30:12 +02:00
|
|
|
This is a C file that can be used to create an initial configuration.
|
2017-06-02 18:17:30 +02:00
|
|
|
This permits creating a new configuration from scratch, without
|
|
|
|
relying on any existing board configuration in place. This utility
|
|
|
|
will create a barebones .config file sufficient only for
|
2019-08-19 19:30:12 +02:00
|
|
|
instantiating the symbolic links necessary to do a real configuration.
|
2017-06-02 18:17:30 +02:00
|
|
|
|
2013-04-20 22:18:08 +02:00
|
|
|
kconfig2html.c
|
|
|
|
--------------
|
|
|
|
|
2019-08-19 19:30:12 +02:00
|
|
|
This is a C file that can be used to build a utility for converting the
|
2013-04-20 22:18:08 +02:00
|
|
|
NuttX configuration in the Kconfig files to an HTML document. This
|
|
|
|
auto-generated documentation will, eventually, replace the manually
|
2019-08-19 19:30:12 +02:00
|
|
|
updated configuration documentation that is falling woefully behind.
|
2013-04-20 22:18:08 +02:00
|
|
|
|
2013-04-30 20:37:34 +02:00
|
|
|
$ tools/kconfig2html.exe -h
|
|
|
|
USAGE: tools/kconfig2html [-d] [-a <apps directory>] {-o <out file>] [<Kconfig root>]
|
|
|
|
tools/kconfig2html [-h]
|
2013-04-23 00:46:15 +02:00
|
|
|
|
|
|
|
Where:
|
|
|
|
|
2019-08-19 19:30:12 +02:00
|
|
|
-a : Select relative path to the apps/ directory. This path is relative
|
2013-04-23 00:46:15 +02:00
|
|
|
to the <Kconfig directory>. Default: ../apps
|
|
|
|
-o : Send output to <out file>. Default: Output goes to stdout
|
|
|
|
-d : Enable debug output
|
|
|
|
-h : Prints this message and exits
|
|
|
|
<Kconfig root> is the directory containing the root Kconfig file.
|
|
|
|
Default <Kconfig directory>: .
|
|
|
|
|
2019-08-19 19:30:12 +02:00
|
|
|
NOTE: In order to use this tool, some configuration must be in-place with
|
2016-07-30 15:05:10 +02:00
|
|
|
all necessary symbolic links. You can establish the configured symbolic
|
|
|
|
links with:
|
|
|
|
|
|
|
|
make context
|
|
|
|
|
|
|
|
or more quickly with:
|
|
|
|
|
2021-12-28 18:21:50 +01:00
|
|
|
make .dirlinks
|
2016-07-30 15:05:10 +02:00
|
|
|
|
2019-02-07 19:11:40 +01:00
|
|
|
Libraries.mk, FlatLibs.mk, ProtectedLibs.mk, and KernelLib.mk
|
|
|
|
-------------------------------------------------------------
|
|
|
|
|
|
|
|
Libraries.mk has the build rules for all NuttX libraries.
|
|
|
|
|
|
|
|
FlatLibs.mk, ProtectedLibs.mk, and KernelLib.mk: These control the
|
|
|
|
selection of libraries to be built, depending on the selected build mode.
|
|
|
|
|
|
|
|
lowhex.c
|
|
|
|
--------
|
|
|
|
|
|
|
|
Convert hexadecimal representation in a file from upper- to lower-case.
|
|
|
|
Usage:
|
|
|
|
|
|
|
|
lowhex <source-file> <out-file>
|
|
|
|
|
|
|
|
Makefile.[unix|win]
|
|
|
|
-----------------
|
|
|
|
|
2022-01-04 22:06:58 +01:00
|
|
|
Unix.mk is the Makefile used when building NuttX in Unix-like systems.
|
|
|
|
It is selected from the top-level Makefile.
|
2019-02-07 19:11:40 +01:00
|
|
|
|
2022-01-04 22:06:58 +01:00
|
|
|
Win.mk is the Makefile used when building natively under Windows.
|
|
|
|
It is selected from the top-level Makefile.
|
2019-02-07 19:11:40 +01:00
|
|
|
|
|
|
|
mkconfig.c, cfgdefine.c, and cfgdefine.h
|
|
|
|
----------------------------------------
|
|
|
|
|
2019-08-19 19:30:12 +02:00
|
|
|
These are C files that are used to build mkconfig program. The mkconfig
|
2019-02-07 19:11:40 +01:00
|
|
|
program is used during the initial NuttX build.
|
|
|
|
|
|
|
|
When you configure NuttX, you will copy a configuration file called .config
|
2019-08-05 15:13:48 +02:00
|
|
|
in the top level NuttX directory (See boards/README.txt or
|
2020-10-19 06:09:06 +02:00
|
|
|
Documentation/NuttXPortingGuide.html). The first time you make NuttX,
|
2019-02-07 19:11:40 +01:00
|
|
|
the top-level makefile will build the mkconfig executable from mkconfig.c
|
2022-01-04 22:06:58 +01:00
|
|
|
(using Makefile.host). The top-level Makefile will then execute the mkconfig
|
|
|
|
program to convert the .config file in the top level directory into
|
|
|
|
include/nuttx/config.h. config.h is a another version of the NuttX
|
|
|
|
configuration that can be included by C files.
|
2019-02-07 19:11:40 +01:00
|
|
|
|
2013-04-23 00:46:15 +02:00
|
|
|
mkconfigvars.sh
|
|
|
|
---------------
|
|
|
|
|
|
|
|
The HTML documentation expects to have a copy of the auto-generated
|
2014-08-30 01:44:15 +02:00
|
|
|
configuration variable documentation Documentation/NuttXConfigVariables.html.
|
2013-04-23 00:46:15 +02:00
|
|
|
The script mkconfigvars.sh is a simple script that can be used to
|
|
|
|
re-generated that file as needed.
|
|
|
|
|
2013-04-30 20:37:34 +02:00
|
|
|
$ tools/mkconfigvars.sh -h
|
|
|
|
tools/mkconfigvars.sh is a tool for generation of configuration variable documentation
|
|
|
|
|
2020-04-18 20:47:04 +02:00
|
|
|
USAGE: tools/mkconfigvars.sh [-d|h] [-v <major.minor.patch>]
|
2013-04-30 20:37:34 +02:00
|
|
|
|
|
|
|
Where:
|
2020-04-18 20:47:04 +02:00
|
|
|
-v <major.minor.patch>
|
|
|
|
The NuttX version number expressed as a major, minor and patch number separated
|
2013-04-30 20:37:34 +02:00
|
|
|
by a period
|
|
|
|
-d
|
|
|
|
Enable script debug
|
|
|
|
-h
|
|
|
|
show this help message and exit
|
|
|
|
|
2022-01-04 22:06:58 +01:00
|
|
|
mkexport.sh and Export.mk
|
2012-11-13 21:24:30 +01:00
|
|
|
-------------------------------
|
2011-07-12 05:21:27 +02:00
|
|
|
|
|
|
|
These implement part of the top-level Makefile's 'export' target. That
|
|
|
|
target will bundle up all of the NuttX libraries, header files, and the
|
|
|
|
startup object into an export-able, binary NuttX distribution. The
|
2022-01-04 22:06:58 +01:00
|
|
|
Export.mk is used only by the mkexport.sh script to parse out options
|
|
|
|
from the top-level Make.defs file.
|
2011-07-12 05:21:27 +02:00
|
|
|
|
2020-08-31 08:40:02 +02:00
|
|
|
USAGE: tools/mkexport.sh [-d] [-z] [-u] -t <top-dir> [-x <lib-ext>] -l "lib1 [lib2 [lib3 ...]]"
|
2016-05-06 12:49:25 +02:00
|
|
|
|
2019-08-19 19:30:12 +02:00
|
|
|
This script also depends on the environment variable MAKE which is set
|
2016-05-06 12:49:25 +02:00
|
|
|
in the top-level Makefile before starting mkexport.sh. If MAKE is not
|
|
|
|
defined, the script will set it to `which make`.
|
|
|
|
|
2012-09-01 02:26:37 +02:00
|
|
|
mkfsdata.pl
|
2012-11-13 21:24:30 +01:00
|
|
|
-----------
|
2012-09-01 02:26:37 +02:00
|
|
|
|
|
|
|
This perl script is used to build the "fake" file system and CGI support
|
|
|
|
as needed for the apps/netutils/webserver. It is currently used only
|
|
|
|
by the Makefile at apps/examples/uip. That example serves as an example
|
|
|
|
of how to configure the uIP webserver "fake" file system.
|
|
|
|
|
|
|
|
NOTE: This perl script comes from uIP and was (probably) written
|
|
|
|
by Adam Dunkels. uIP has a license that is compatible with NuttX.
|
|
|
|
|
2013-01-04 17:00:38 +01:00
|
|
|
mkversion.c, cfgdefine.c, and cfgdefine.h
|
2012-11-13 21:24:30 +01:00
|
|
|
-----------------------------------------
|
2011-04-14 21:17:41 +02:00
|
|
|
|
|
|
|
This is C file that is used to build mkversion program. The mkversion
|
|
|
|
program is used during the initial NuttX build.
|
|
|
|
|
|
|
|
When you build NuttX there should be a version file called .version in
|
2020-10-19 06:09:06 +02:00
|
|
|
the top level NuttX directory (See Documentation/NuttXPortingGuide.html).
|
2019-08-19 19:30:12 +02:00
|
|
|
The first time you make NuttX, the top-level makefile will build the
|
2022-01-04 22:06:58 +01:00
|
|
|
mkversion executable from mkversion.c (using Makefile.host). The top-level
|
|
|
|
Makefile will then execute the mkversion program to convert the
|
2011-04-14 21:17:41 +02:00
|
|
|
.version file in the top level directory into include/nuttx/version.h.
|
|
|
|
version.h provides version information that can be included by C files.
|
|
|
|
|
2012-09-01 17:33:33 +02:00
|
|
|
mksyscall.c, cvsparser.c, and cvsparser.h
|
2012-11-13 21:24:30 +01:00
|
|
|
-----------------------------------------
|
2011-03-31 06:23:17 +02:00
|
|
|
|
2011-07-23 15:53:59 +02:00
|
|
|
This is a C file that is used to build mksyscall program. The mksyscall
|
2011-03-31 06:23:17 +02:00
|
|
|
program is used during the initial NuttX build by the logic in the top-
|
|
|
|
level syscall/ directory.
|
|
|
|
|
|
|
|
If you build NuttX as a separately compiled, monolithic kernel and separate
|
|
|
|
applications, then there is a syscall layer that is used to get from the
|
|
|
|
user application space to the NuttX kernel space. In the user application
|
|
|
|
"proxies" for each of the kernel functions are provided. The proxies have
|
|
|
|
the same function signature as the kernel function, but only execute a
|
|
|
|
system call.
|
|
|
|
|
|
|
|
Within the kernel, there are "stubs" for each of the system calls. The
|
|
|
|
stubs receive the marshalled system call data, and perform the actually
|
|
|
|
kernel function call (in kernel-mode) on behalf of the proxy function.
|
|
|
|
|
|
|
|
Information about the stubs and proxies is maintained in a comma separated
|
|
|
|
value (CSV) file in the syscall/ directory. The mksyscall program will
|
|
|
|
accept this CVS file as input and generate all of the required proxy or
|
2018-07-09 02:24:45 +02:00
|
|
|
stub files as output. See syscall/README.txt for additional information.
|
2011-03-31 06:23:17 +02:00
|
|
|
|
2012-09-01 17:33:33 +02:00
|
|
|
mksymtab.c, cvsparser.c, and cvsparser.h
|
2012-11-13 21:24:30 +01:00
|
|
|
----------------------------------------
|
2012-09-01 17:33:33 +02:00
|
|
|
|
2019-08-19 19:30:12 +02:00
|
|
|
This is a C file that is used to build symbol tables from comma separated
|
2012-09-01 17:33:33 +02:00
|
|
|
value (CSV) files. This tool is not used during the NuttX build, but
|
|
|
|
can be used as needed to generate files.
|
|
|
|
|
2019-09-30 21:46:33 +02:00
|
|
|
USAGE: ./mksymtab [-d] <cvs-file> <symtab-file> [<symtab-name> [<nsymbols-name>]]
|
2012-09-01 17:33:33 +02:00
|
|
|
|
|
|
|
Where:
|
|
|
|
|
2019-09-30 21:46:33 +02:00
|
|
|
<cvs-file> : The path to the input CSV file (required)
|
|
|
|
<symtab-file> : The path to the output symbol table file (required)
|
|
|
|
<symtab-name> : Optional name for the symbol table variable
|
|
|
|
Default: "g_symtab"
|
|
|
|
<nsymbols-name> : Optional name for the symbol table variable
|
|
|
|
Default: "g_nsymbols"
|
|
|
|
-d : Enable debug output
|
2012-09-01 17:33:33 +02:00
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
cd nuttx/tools
|
2014-06-27 16:14:07 +02:00
|
|
|
cat ../syscall/syscall.csv ../lib/libc.csv | sort >tmp.csv
|
2012-09-01 17:33:33 +02:00
|
|
|
./mksymtab.exe tmp.csv tmp.c
|
|
|
|
|
2013-11-23 13:49:40 +01:00
|
|
|
mkctags.sh
|
|
|
|
----------
|
|
|
|
|
2013-11-23 17:06:33 +01:00
|
|
|
A script for creating ctags from Ken Pettit. See http://en.wikipedia.org/wiki/Ctags
|
|
|
|
and http://ctags.sourceforge.net/
|
2013-11-23 13:49:40 +01:00
|
|
|
|
2015-10-08 20:48:40 +02:00
|
|
|
nxstyle.c
|
|
|
|
---------
|
|
|
|
|
2019-08-19 19:30:12 +02:00
|
|
|
I am embarrassed that this is here. This program is a complete hack
|
2015-10-08 20:48:40 +02:00
|
|
|
but, unfortunately, it has become so useful to me that I need to keep
|
|
|
|
it here.
|
|
|
|
|
|
|
|
A little background: I have tinkered with pretty printers for some
|
|
|
|
time and have not been happy with the results. An alternative that
|
|
|
|
occurred to me would be just a standard checker that examines a C
|
|
|
|
file that gives warnings for violations of the coding standard.
|
|
|
|
|
|
|
|
This turns out to be more difficult that you might think. A pretty
|
|
|
|
printer understands C syntax: They break the file up into its C
|
|
|
|
components then reassembles the output in the format. But parsing the
|
|
|
|
C loses the original file layout and so it not useful in this case.
|
|
|
|
|
|
|
|
This program instead, uses a collection of heuristics (i.e., hacks and
|
|
|
|
bandaids) to examine the C file for obvious violations of the coding
|
|
|
|
standard. This program is completely ignorant of C syntax; it simply
|
|
|
|
performs crude pattern matching to check the file.
|
|
|
|
|
2020-01-31 16:15:01 +01:00
|
|
|
Prints formatted messages that are classified as info, warn, error,
|
2019-12-30 19:34:43 +01:00
|
|
|
fatal. In a parsable format that can be used by editors and IDEs.
|
|
|
|
|
2020-01-12 17:07:54 +01:00
|
|
|
Usage: nxstyle [-m <excess>] [-v <level>] [-r <start,count>] <filename>
|
|
|
|
nxstyle -h this help
|
|
|
|
nxstyle -v <level> where level is
|
|
|
|
0 - no output
|
|
|
|
1 - PASS/FAIL
|
|
|
|
2 - output each line (default)
|
2015-10-08 20:48:40 +02:00
|
|
|
|
2018-04-12 02:47:59 +02:00
|
|
|
See also indent.sh and uncrustify.cfg
|
2018-04-11 14:59:57 +02:00
|
|
|
|
2012-06-20 21:29:20 +02:00
|
|
|
pic32mx
|
2012-11-13 21:24:30 +01:00
|
|
|
-------
|
2012-06-20 21:29:20 +02:00
|
|
|
|
2020-02-22 23:23:50 +01:00
|
|
|
This directory contains build tools used only for PIC32MX/Z platforms
|
2012-06-20 21:29:20 +02:00
|
|
|
|
2011-07-23 15:53:59 +02:00
|
|
|
bdf-convert.c
|
2012-11-13 21:24:30 +01:00
|
|
|
-------------
|
2011-07-23 15:53:59 +02:00
|
|
|
|
|
|
|
This C file is used to build the bdf-converter program. The bdf-converter
|
2019-08-19 19:30:12 +02:00
|
|
|
program can be used to convert fonts in Bitmap Distribution Format (BDF)
|
2011-07-23 15:53:59 +02:00
|
|
|
into fonts that can be used in the NX graphics system.
|
|
|
|
|
|
|
|
Below are general instructions for creating and installing a new font
|
|
|
|
in the NX graphic system:
|
|
|
|
|
|
|
|
1. Locate a font in BDF format,
|
|
|
|
2. Use the bdf-converter program to convert the BDF font to the NuttX
|
|
|
|
font format. This will result in a C header file containing
|
2014-08-30 01:44:15 +02:00
|
|
|
definitions. That header file should be installed at, for example,
|
2017-01-02 21:02:20 +01:00
|
|
|
libnx/nxfonts/nxfonts_myfont.h.
|
2011-07-23 15:53:59 +02:00
|
|
|
|
|
|
|
Create a new NuttX configuration variable. For example, suppose
|
|
|
|
you define the following variable: CONFIG_NXFONT_MYFONT. Then
|
|
|
|
you would need to:
|
2014-04-14 00:22:22 +02:00
|
|
|
|
2011-07-23 15:53:59 +02:00
|
|
|
3. Define CONFIG_NXFONT_MYFONT=y in your NuttX configuration file.
|
|
|
|
|
|
|
|
A font ID number has to be assigned for each new font. The font ID
|
2011-07-24 22:49:01 +02:00
|
|
|
is defined in the file include/nuttx/nx/nxfonts.h. Those definitions
|
2011-07-23 15:53:59 +02:00
|
|
|
have to be extended to support your new font. Look at how the font ID
|
|
|
|
enabled by CONFIG_NXFONT_SANS23X27 is defined and add an ID for your
|
|
|
|
new font in a similar fashion:
|
|
|
|
|
2019-08-19 19:30:12 +02:00
|
|
|
4. include/nuttx/nx/nxfonts.h. Add your new font as a possible system
|
2011-07-23 15:53:59 +02:00
|
|
|
default font:
|
2014-04-14 00:22:22 +02:00
|
|
|
|
2011-07-23 15:53:59 +02:00
|
|
|
#if defined(CONFIG_NXFONT_SANS23X27)
|
|
|
|
# define NXFONT_DEFAULT FONTID_SANS23X27
|
|
|
|
#elif defined(CONFIG_NXFONT_MYFONT)
|
|
|
|
# define NXFONT_DEFAULT FONTID_MYFONT
|
|
|
|
#endif
|
|
|
|
|
|
|
|
Then define the actual font ID. Make sure that the font ID value
|
|
|
|
is unique:
|
2014-04-14 00:22:22 +02:00
|
|
|
|
2011-07-23 15:53:59 +02:00
|
|
|
enum nx_fontid_e
|
|
|
|
{
|
|
|
|
FONTID_DEFAULT = 0 /* The default font */
|
|
|
|
#ifdef CONFIG_NXFONT_SANS23X27
|
|
|
|
, FONTID_SANS23X27 = 1 /* The 23x27 sans serif font */
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_NXFONT_MYFONT
|
|
|
|
, FONTID_MYFONT = 2 /* My shiny, new font */
|
|
|
|
#endif
|
|
|
|
...
|
2014-04-14 00:22:22 +02:00
|
|
|
|
2019-08-19 19:30:12 +02:00
|
|
|
Now add the font to the NX build system. There are several files that
|
|
|
|
you have to modify to do this. Look how the build system uses the
|
2014-08-30 01:44:15 +02:00
|
|
|
font CONFIG_NXFONT_SANS23X27 for examples:
|
2011-07-23 15:53:59 +02:00
|
|
|
|
|
|
|
5. nuttx/graphics/Makefile. This file needs logic to auto-generate
|
|
|
|
a C source file from the header file that you generated with the
|
|
|
|
the bdf-converter program. Notice NXFONTS_FONTID=2; this must be
|
|
|
|
set to the same font ID value that you defined in the
|
2011-07-24 22:49:01 +02:00
|
|
|
include/nuttx/nx/nxfonts.h file.
|
2011-07-23 15:53:59 +02:00
|
|
|
|
|
|
|
genfontsources:
|
|
|
|
ifeq ($(CONFIG_NXFONT_SANS23X27),y)
|
2020-09-14 18:53:37 +02:00
|
|
|
@$(MAKE) -C nxfonts -f Makefile.sources NXFONTS_FONTID=1 EXTRAFLAGS=$(EXTRAFLAGS)
|
2011-07-23 15:53:59 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(CONFIG_NXFONT_MYFONT),y)
|
2020-09-14 18:53:37 +02:00
|
|
|
@$(MAKE) -C nxfonts -f Makefile.sources NXFONTS_FONTID=2 EXTRAFLAGS=$(EXTRAFLAGS)
|
2011-07-23 15:53:59 +02:00
|
|
|
endif
|
|
|
|
|
2017-01-02 21:02:20 +01:00
|
|
|
6. nuttx/libnx/nxfonts/Make.defs. Set the make variable NXFSET_CSRCS.
|
2011-07-23 15:53:59 +02:00
|
|
|
NXFSET_CSRCS determines the name of the font C file to build when
|
|
|
|
NXFONTS_FONTID=2:
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_NXFONT_SANS23X27),y)
|
2012-04-12 01:06:30 +02:00
|
|
|
NXFSET_CSRCS += nxfonts_bitmaps_sans23x27.c
|
2011-07-23 15:53:59 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(CONFIG_NXFONT_MYFONT),y)
|
2012-04-12 01:06:30 +02:00
|
|
|
NXFSET_CSRCS += nxfonts_bitmaps_myfont.c
|
2011-07-23 15:53:59 +02:00
|
|
|
endif
|
|
|
|
|
2017-01-02 21:02:20 +01:00
|
|
|
7. nuttx/libnx/nxfonts/Makefile.sources. This is the Makefile used
|
2011-07-23 15:53:59 +02:00
|
|
|
in step 5 that will actually generate the font C file. So, given
|
|
|
|
your NXFONTS_FONTID=2, it needs to determine a prefix to use for
|
|
|
|
auto-generated variable and function names and (again) the name of
|
2014-08-30 01:44:15 +02:00
|
|
|
the auto-generated file to create (this must be the same name that
|
2017-01-02 21:02:20 +01:00
|
|
|
was used in nuttx/libnx/nxfonts/Make.defs):
|
2011-07-23 15:53:59 +02:00
|
|
|
|
|
|
|
ifeq ($(NXFONTS_FONTID),1)
|
2012-04-12 01:06:30 +02:00
|
|
|
NXFONTS_PREFIX := g_sans23x27_
|
|
|
|
GEN_CSRC = nxfonts_bitmaps_sans23x27.c
|
2011-07-23 15:53:59 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(NXFONTS_FONTID),2)
|
2012-04-12 01:06:30 +02:00
|
|
|
NXFONTS_PREFIX := g_myfont_
|
|
|
|
GEN_CSRC = nxfonts_bitmaps_myfont.c
|
2011-07-23 15:53:59 +02:00
|
|
|
endif
|
|
|
|
|
2017-01-02 21:02:20 +01:00
|
|
|
8. graphics/libnx/nxfonts_bitmaps.c. This is the file that contains
|
2011-07-23 15:53:59 +02:00
|
|
|
the generic font structures. It is used as a "template" file by
|
2017-01-02 21:02:20 +01:00
|
|
|
nuttx/libnx/nxfonts/Makefile.sources to create your customized
|
2011-07-23 15:53:59 +02:00
|
|
|
font data set.
|
|
|
|
|
|
|
|
#if NXFONTS_FONTID == 1
|
|
|
|
# include "nxfonts_sans23x27.h"
|
|
|
|
#elif NXFONTS_FONTID == 2
|
|
|
|
# include "nxfonts_myfont.h"
|
|
|
|
#else
|
|
|
|
# error "No font ID specified"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
Where nxfonts_myfont.h is the NuttX font file that we generated in
|
|
|
|
step 2 using the bdf-converter tool.
|
|
|
|
|
2017-01-02 21:02:20 +01:00
|
|
|
9. libnx/nxfonts/nxfonts_getfont.c. Finally, we need to extend the
|
2011-07-26 00:21:38 +02:00
|
|
|
logic that does the run-time font lookups so that can find our new
|
|
|
|
font. The lookup function is NXHANDLE nxf_getfonthandle(enum nx_fontid_e fontid).
|
|
|
|
The new font information needs to be added to data structures used by
|
2011-07-23 15:53:59 +02:00
|
|
|
that function:
|
2014-04-14 00:22:22 +02:00
|
|
|
|
2011-07-23 15:53:59 +02:00
|
|
|
#ifdef CONFIG_NXFONT_SANS23X27
|
|
|
|
extern const struct nx_fontpackage_s g_sans23x27_package;
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_NXFONT_MYFONT
|
|
|
|
extern const struct nx_fontpackage_s g_myfont_package;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static FAR const struct nx_fontpackage_s *g_fontpackages[] =
|
|
|
|
{
|
|
|
|
#ifdef CONFIG_NXFONT_SANS23X27
|
|
|
|
&g_sans23x27_package,
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_NXFONT_MYFONT
|
|
|
|
&g_myfont_package,
|
|
|
|
#endif
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2019-02-07 19:11:40 +01:00
|
|
|
define.sh and define.bat
|
|
|
|
------------------------
|
2011-04-14 21:17:41 +02:00
|
|
|
|
|
|
|
Different compilers have different conventions for specifying pre-
|
|
|
|
processor definitions on the compiler command line. This bash
|
2019-08-19 19:30:12 +02:00
|
|
|
script allows the build system to create command line definitions
|
2011-04-14 21:17:41 +02:00
|
|
|
without concern for the particular compiler in use.
|
2011-03-12 16:36:28 +01:00
|
|
|
|
2012-11-21 18:44:14 +01:00
|
|
|
The define.bat script is a counterpart for use in the native Windows
|
|
|
|
build.
|
|
|
|
|
2020-02-22 23:23:50 +01:00
|
|
|
flash_writer.py
|
|
|
|
---------------
|
|
|
|
|
|
|
|
This flash writer is using the xmodem for firmware transfer on
|
2021-04-05 01:47:55 +02:00
|
|
|
boards based on cxd56 chip (Ex. Spresense). This tool depends on
|
|
|
|
the xmodem package (https://pypi.org/project/xmodem/).
|
2020-02-22 23:23:50 +01:00
|
|
|
|
|
|
|
for flashing the .spk image to the board please use:
|
|
|
|
tools/flash_writer.py -s -c /dev/ttyUSB0 -d -b 115200 -n nuttx.spk
|
|
|
|
|
2016-04-09 01:26:16 +02:00
|
|
|
ide_exporter.py
|
|
|
|
---------------
|
|
|
|
|
2017-11-16 15:51:49 +01:00
|
|
|
This Python script will help to create NuttX project in the IAR and
|
2016-04-09 01:26:16 +02:00
|
|
|
uVision IDEs. These are few simple the steps to export the IDE
|
2017-11-16 15:51:49 +01:00
|
|
|
workspaces.
|
|
|
|
|
|
|
|
1) Start the NuttX build from the Cygwin command line before trying to
|
|
|
|
create your project by running:
|
|
|
|
|
|
|
|
make V=1 |& tee build_log
|
|
|
|
|
|
|
|
This is necessary to certain auto-generated files and directories that
|
|
|
|
will be needed. This will provide the build log to construct the IDE
|
|
|
|
project also.
|
|
|
|
|
|
|
|
2) Export the IDE project base on that make log. The script usage:
|
|
|
|
|
|
|
|
usage: ide_exporter.py [-h] [-v] [-o OUT_DIR] [-d] build_log {iar,uvision_armcc,uvision_gcc} template_dir
|
|
|
|
|
|
|
|
positional arguments:
|
|
|
|
build_log Log file from make V=1
|
|
|
|
{iar,uvision_armcc,uvision_gcc}
|
|
|
|
The target IDE: iar, uvision_gcc, (uvision_armcc is experimental)
|
|
|
|
template_dir Directory that contains IDEs template projects
|
|
|
|
|
|
|
|
optional arguments:
|
|
|
|
-h, --help show this help message and exit
|
|
|
|
-v, --version show program's version number and exit
|
|
|
|
-o OUT_DIR, --output OUT_DIR
|
|
|
|
Output directory
|
|
|
|
-d, --dump Dump project structure tree
|
|
|
|
|
|
|
|
Example:
|
|
|
|
cd nuttx
|
|
|
|
make V=1 |& tee build_log
|
|
|
|
|
2019-08-08 17:16:30 +02:00
|
|
|
./tools/ide_exporter.py makelog_f2nsh_c iar ./boards/<arch>/<chip>/<board>/ide/template/iar -o ./boards/<arch>/<chip>/<board>/ide/nsh/iar
|
2017-11-16 15:51:49 +01:00
|
|
|
|
|
|
|
or
|
|
|
|
|
2019-08-08 17:16:30 +02:00
|
|
|
./tools/ide_exporter.py makelog_f2nsh_c uvision_gcc ./boards/<arch>/<chip>/<board>/ide/template/uvision_gcc/ -o ./boards/<arch>/<chip>/<board>/ide/nsh/uvision
|
2017-11-16 15:51:49 +01:00
|
|
|
|
|
|
|
3) Limitations:
|
|
|
|
- IAR supports C only. Iar C++ does not compatible with g++ so disable
|
|
|
|
C++ if you want to use IAR.
|
|
|
|
- uvision_armcc : nuttx asm (inline and .asm) can't be compiled with
|
|
|
|
armcc so do not use this option.
|
|
|
|
- uvision_gcc : uvision project that uses gcc. Need to specify path to
|
|
|
|
gnu toolchain.
|
|
|
|
In uVison menu, select:
|
|
|
|
|
|
|
|
Project/Manage/Project Items.../FolderExtension/Use GCC compiler/ PreFix, Folder
|
|
|
|
|
|
|
|
4) Template projects' constrains:
|
|
|
|
- mcu, core, link script shall be configured in template project
|
|
|
|
- Templates' name are fixed:
|
|
|
|
- template_nuttx.eww : IAR nuttx workspace template
|
|
|
|
- template_nuttx_lib.ewp : IAR nuttx library project template
|
|
|
|
- template_nuttx_main.ewp : IAR nuttx main project template
|
|
|
|
- template_nuttx.uvmpw : uVision workspace
|
|
|
|
- template_nuttx_lib.uvproj : uVision library project
|
|
|
|
- template_nuttx_main.uvproj : uVision main project
|
|
|
|
- iar:
|
|
|
|
- Library option shall be set to 'None' so that IAR could use nuttx
|
|
|
|
libc
|
|
|
|
- __ASSEMBLY__ symbol shall be defined in assembler
|
|
|
|
- uVision_gcc:
|
|
|
|
- There should be one fake .S file in projects that has been defined
|
|
|
|
__ASSEMBLY__ in assembler.
|
|
|
|
- In Option/CC tab : disable warning
|
|
|
|
- In Option/CC tab : select Compile thump code (or Misc control =
|
|
|
|
-mthumb)
|
|
|
|
- template_nuttx_lib.uvproj shall add 'Post build action' to copy .a
|
|
|
|
file to .\lib
|
|
|
|
- template_nuttx_main.uvproj Linker:
|
|
|
|
- Select 'Do not use Standard System Startup Files' and 'Do not
|
|
|
|
use Standard System Libraries'
|
|
|
|
- Do not select 'Use Math libraries'
|
|
|
|
- Misc control = --entry=__start
|
|
|
|
|
|
|
|
5) How to create template for other configurations:
|
|
|
|
1) uVision with gcc toolchain:
|
|
|
|
- Copy 3 uVision project files
|
|
|
|
- Select the MCU for main and lib project
|
|
|
|
- Correct the path to ld script if needed
|
|
|
|
2) iar:
|
2019-08-19 19:30:12 +02:00
|
|
|
- Check if the arch supports IAR (only armv7-m is support IAR
|
2017-11-16 15:51:49 +01:00
|
|
|
now)
|
|
|
|
- Select the MCU for main and lib project
|
|
|
|
- Add new ld script file for IAR
|
|
|
|
|
|
|
|
NOTE: Due to bit rot, the template files for the stm3220g-eval and for
|
|
|
|
the stm32f429-disco have been removed from the NuttX repository. For
|
2019-08-19 19:30:12 +02:00
|
|
|
reference, they can be found in the Obsoleted repository at
|
2017-11-16 15:51:49 +01:00
|
|
|
Obsoleted/stm32f429i_disco/ltcd/template and at
|
|
|
|
Obsoleted/stm3220g-eval/template.
|
2016-04-09 01:26:16 +02:00
|
|
|
|
2020-05-29 21:19:32 +02:00
|
|
|
incdir.sh, incdir.bat, and incdir.c
|
|
|
|
-----------------------------------
|
2011-03-12 16:36:28 +01:00
|
|
|
|
|
|
|
Different compilers have different conventions for specifying lists
|
2013-08-27 17:40:19 +02:00
|
|
|
of include file paths on the compiler command line. This incdir.sh
|
2012-11-13 22:10:50 +01:00
|
|
|
bash script allows the build system to create include file paths without
|
2011-03-12 16:36:28 +01:00
|
|
|
concern for the particular compiler in use.
|
|
|
|
|
2012-11-13 22:10:50 +01:00
|
|
|
The incdir.bat script is a counterpart for use in the native Windows
|
2012-11-21 18:44:14 +01:00
|
|
|
build. However, there is currently only one compiler supported in
|
2012-11-13 22:10:50 +01:00
|
|
|
that context: MinGW-GCC.
|
|
|
|
|
2020-05-29 21:19:32 +02:00
|
|
|
incdir.c is a higher performance version of incdir.sh, converted to C.
|
|
|
|
|
2020-02-22 23:23:50 +01:00
|
|
|
indent.sh
|
|
|
|
---------
|
|
|
|
|
|
|
|
This script can be used to indent .c and .h files in a manner similar
|
|
|
|
to the NuttX coding style. It doesn't do a really good job, however
|
|
|
|
(see below and the comments at the top of the indent.sh file).
|
|
|
|
|
|
|
|
USAGE:
|
|
|
|
tools/indent.sh [-d] [-p] -o <out-file> <in-file>
|
|
|
|
tools/indent.sh [-d] [-p] <in-file-list>
|
|
|
|
tools/indent.sh [-d] -h
|
|
|
|
|
|
|
|
Where:
|
|
|
|
-<in-file>
|
|
|
|
A single, unformatted input file
|
|
|
|
-<in-file-list>
|
|
|
|
A list of unformatted input files that will be reformatted in place.
|
|
|
|
-o <out-file>
|
|
|
|
Write the single, reformatted <in-file> to <out-file>. <in-file>
|
|
|
|
will not be modified.
|
|
|
|
-d
|
|
|
|
Enable script debug
|
|
|
|
-p
|
|
|
|
Comments are pre-formatted. Do not reformat.
|
|
|
|
-h
|
|
|
|
Show this help message and exit
|
|
|
|
|
|
|
|
The conversions make by the indent.sh script differs from the NuttX coding
|
|
|
|
style in that:
|
|
|
|
|
|
|
|
1. The coding standard requires that the trailing */ of a multi-line
|
|
|
|
comment be on a separate line. By default, indent.sh will put the
|
|
|
|
final */ on the same line as the last comment text. If your C file
|
|
|
|
already has properly formatted comments then using the -p option will
|
|
|
|
eliminate that bad behavior
|
|
|
|
2. If your source file has highly formatted comments containing things
|
|
|
|
such as tables or lists, then use the -p option to preserve those
|
|
|
|
pre-formatted comments.
|
|
|
|
3. I usually align things vertically (like '=' in assignments),
|
|
|
|
4. indent.sh puts a bogus blank line at the top of the file,
|
|
|
|
5. I don't like the way it handles nested conditional compilation
|
|
|
|
intermixed with code. I prefer the preprocessor conditional tests
|
|
|
|
be all right justified in that case.
|
|
|
|
6. I also indent brackets differently on structures than does this script.
|
|
|
|
7. I normally use no spaces in casts. indent.sh adds spaces in casts like
|
|
|
|
"(FAR void *)&foo" becomes "(FAR void *) & foo".
|
|
|
|
8. When used with header files, the initial idempotence conditional test
|
|
|
|
causes all preprocessor directives to be indented in the file. So for
|
|
|
|
header files, you will need to substitute "^# " with "#" in the
|
|
|
|
converted header file.
|
|
|
|
|
|
|
|
You will manually need to check for the issues listed above after
|
|
|
|
performing the conversions. nxstyle.c provides a good test that will
|
|
|
|
catch most of the indent.sh screw-ups. Together, they do a pretty good
|
|
|
|
job of formatting.
|
|
|
|
|
|
|
|
See also nxstyle.c and uncrustify.cfg
|
|
|
|
|
2019-02-07 19:11:40 +01:00
|
|
|
kconfig.bat
|
|
|
|
-----------
|
|
|
|
|
|
|
|
Recent versions of NuttX support building NuttX from a native Windows
|
|
|
|
CMD.exe shell. But kconfig-frontends is a Linux tool and is not yet
|
|
|
|
available in the pure CMD.exe environment. At this point, there are
|
|
|
|
only a few options for the Windows user (see the top-level README.txt
|
|
|
|
file).
|
|
|
|
|
|
|
|
You can, with some effort, run the Cygwin kconfig-mconf tool directly
|
|
|
|
in the CMD.exe shell. In this case, you do not have to modify the
|
|
|
|
.config file, but there are other complexities: You need to
|
2019-08-19 19:30:12 +02:00
|
|
|
temporarily set the Cygwin directories in the PATH variable and
|
2019-02-07 19:11:40 +01:00
|
|
|
then run kconfig-mconf outside of the Make system.
|
|
|
|
|
|
|
|
kconfig.bat is a Windows batch file at tools/kconfig.bat that automates
|
|
|
|
these steps. It is used from the top-level NuttX directory like:
|
|
|
|
|
|
|
|
tools/kconfig menuconfig
|
|
|
|
|
2019-08-19 19:30:12 +02:00
|
|
|
NOTE: There is currently an issue with accessing DOS environment
|
2019-02-07 19:11:40 +01:00
|
|
|
variables from the Cygwin kconfig-mconf running in the CMD.exe shell.
|
|
|
|
The following change to the top-level Kconfig file seems to work around
|
|
|
|
these problems:
|
|
|
|
|
|
|
|
config APPSDIR
|
|
|
|
string
|
|
|
|
- option env="APPSDIR"
|
|
|
|
+ default "../apps"
|
|
|
|
|
|
|
|
link.sh, link.bat, copydir.sh, copydir.bat, unlink.sh, and unlink.bat
|
|
|
|
---------------------------------------------------------------------
|
2011-03-12 16:36:28 +01:00
|
|
|
|
2019-08-19 19:30:12 +02:00
|
|
|
Different file systems have different capabilities for symbolic links.
|
|
|
|
Some Windows file systems have no native support for symbolic links.
|
|
|
|
Cygwin running under Windows has special links built in that work with
|
2011-03-12 16:36:28 +01:00
|
|
|
all cygwin tools. However, they do not work when Windows native tools
|
|
|
|
are used with cygwin. In that case something different must be done.
|
|
|
|
|
|
|
|
If you are building under Linux or under cygwin with a cygwin tool
|
|
|
|
chain, then your Make.defs file may have definitions like the
|
|
|
|
following:
|
|
|
|
|
|
|
|
DIRLINK = $(TOPDIR)/tools/link.sh
|
|
|
|
DIRUNLINK = (TOPDIR)/tools/unlink.sh
|
|
|
|
|
|
|
|
The first definition is not always present because link.sh is the
|
|
|
|
default. link.sh is a bash script that performs a normal, Linux-style
|
|
|
|
symbolic link; unlink.sh is a do-it-all unlinking script.
|
|
|
|
|
2012-12-08 17:37:43 +01:00
|
|
|
But if you are building under cygwin using a Windows native toolchain
|
|
|
|
within a POSIX framework (such as Cygwin), then you will need something
|
|
|
|
like the following in you Make.defs file:
|
2011-03-12 16:36:28 +01:00
|
|
|
|
2012-12-08 17:37:43 +01:00
|
|
|
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
2011-03-12 16:36:28 +01:00
|
|
|
DIRUNLINK = (TOPDIR)/tools/unlink.sh
|
|
|
|
|
2012-12-08 17:37:43 +01:00
|
|
|
copydir.sh will copy the whole directory instead of linking it.
|
2011-03-12 16:36:28 +01:00
|
|
|
|
2012-12-08 17:37:43 +01:00
|
|
|
Finally, if you are running in a pure native Windows environment with
|
|
|
|
a CMD.exe shell, then you will need something like this:
|
|
|
|
|
|
|
|
DIRLINK = $(TOPDIR)/tools/copydir.bat
|
|
|
|
DIRUNLINK = (TOPDIR)/tools/unlink.bat
|
|
|
|
|
2019-08-19 19:30:12 +02:00
|
|
|
Note that this will copy directories. link.bat might also be used in
|
2012-12-08 17:37:43 +01:00
|
|
|
this case. link.bat will attempt to create a symbolic link using the
|
|
|
|
NTFS mklink.exe command instead of copying files. That logic, however,
|
|
|
|
has not been verified as of this writing.
|
2011-03-12 16:36:28 +01:00
|
|
|
|
2020-02-22 23:23:50 +01:00
|
|
|
Makefile.host
|
|
|
|
-------------
|
2011-03-12 16:36:28 +01:00
|
|
|
|
2020-02-22 23:23:50 +01:00
|
|
|
This is the makefile that is used to make the mkconfig program from
|
|
|
|
the mkconfig.c C file, the cmpconfig program from cmpconfig.c C file,
|
|
|
|
the mkversion program from the mkconfig.c C file, or the mksyscall
|
|
|
|
program from the mksyscall.c file. Usage:
|
2011-03-12 16:36:28 +01:00
|
|
|
|
2020-02-22 23:23:50 +01:00
|
|
|
cd tools/
|
|
|
|
make -f Makefile.host <program>
|
2016-01-16 19:22:54 +01:00
|
|
|
|
2020-02-22 23:23:50 +01:00
|
|
|
mkromfsimg.sh
|
|
|
|
-------------
|
2016-01-16 19:22:54 +01:00
|
|
|
|
2020-02-22 23:23:50 +01:00
|
|
|
This script may be used to automate the generation of a ROMFS file system
|
|
|
|
image. It accepts an rcS script "template" and generates an image that
|
|
|
|
may be mounted under /etc in the NuttX pseudo file system.
|
2017-01-18 21:19:27 +01:00
|
|
|
|
2020-02-22 23:23:50 +01:00
|
|
|
TIP: Edit the resulting header file and mark the generated data values
|
|
|
|
as 'const' so that they will be stored in FLASH.
|
2017-01-18 21:19:27 +01:00
|
|
|
|
2020-02-22 23:23:50 +01:00
|
|
|
mkdeps.c, cnvwindeps.c, mkwindeps.sh, and mknulldeps.sh
|
|
|
|
-------------------------------------------------------
|
2017-01-18 21:19:27 +01:00
|
|
|
|
2020-02-22 23:23:50 +01:00
|
|
|
NuttX uses the GCC compiler's capabilities to create Makefile dependencies.
|
|
|
|
The program mkdeps is used to run GCC in order to create the dependencies.
|
|
|
|
If a NuttX configuration uses the GCC toolchain, its Make.defs file (see
|
|
|
|
boards/README.txt) will include a line like:
|
|
|
|
|
|
|
|
MKDEP = $(TOPDIR)/tools/mkdeps[.exe] (See NOTE below)
|
|
|
|
|
|
|
|
If the NuttX configuration does not use a GCC compatible toolchain, then
|
|
|
|
it cannot use the dependencies and instead it uses mknulldeps.sh:
|
|
|
|
|
|
|
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
|
|
|
|
|
|
|
The mknulldeps.sh is a stub script that does essentially nothing.
|
|
|
|
|
|
|
|
mkwindeps.sh is a version that creates dependencies using the Windows
|
|
|
|
native toolchain. That generates Windows native paths in the dependency
|
|
|
|
file. But the mkwindeps.sh uses cnvwindeps.c to convert the Windows
|
|
|
|
paths to POSIX paths. This adds some time to the Windows dependency
|
|
|
|
generation but is generally the best option available for that mixed
|
|
|
|
environment of Cygwin with a native Windows GCC toolchain.
|
|
|
|
|
|
|
|
mkdeps.c generates mkdeps (on Linux) or mkdeps.exe (on Windows).
|
|
|
|
However, this version is still under-development. It works well in
|
|
|
|
the all POSIX environment or in the all Windows environment but also
|
|
|
|
does not work well in mixed POSIX environment with a Windows toolchain.
|
|
|
|
In that case, there are still issues with the conversion of things like
|
|
|
|
'c:\Program Files' to 'c:program files' by bash. Those issues may,
|
|
|
|
eventually be solvable but for now continue to use mkwindeps.sh in
|
|
|
|
that mixed environment.
|
2018-04-11 14:59:57 +02:00
|
|
|
|
2020-02-25 01:44:51 +01:00
|
|
|
netusb.sh
|
|
|
|
---------
|
|
|
|
|
|
|
|
Helper script used to set up the CDC ECM Ethernet Over USB driver,
|
|
|
|
host routes, and IP Tables rules to support networking with a NuttX
|
|
|
|
system that has a CDC ECM Ethernet Over USB driver configured. Only
|
|
|
|
supported on Linux.
|
|
|
|
|
|
|
|
General usage:
|
|
|
|
|
|
|
|
$ ./tools/netusb.sh
|
|
|
|
Usage: tools/netusb.sh <main-interface> <usb-net-interface> <on|off>
|
|
|
|
|
|
|
|
This has been tested on the SAMA5D3-Xplained board; see
|
|
|
|
`boards/arm/sama5/sama5d3-xplained/README.txt` for more information on how
|
|
|
|
to configure the CDC ECM driver for that board.
|
|
|
|
|
2019-02-07 19:11:40 +01:00
|
|
|
README.txt
|
2016-08-04 00:31:35 +02:00
|
|
|
----------
|
|
|
|
|
2019-02-07 19:11:40 +01:00
|
|
|
This file!
|
2016-08-04 00:31:35 +02:00
|
|
|
|
2014-08-30 01:44:15 +02:00
|
|
|
refresh.sh
|
|
|
|
----------
|
|
|
|
|
2017-07-10 04:05:59 +02:00
|
|
|
[NOTE: This script with --silent is really obsolete. refresh with the
|
|
|
|
silent option really adds default values. However, as of 217-07-09,
|
|
|
|
defconfig files are retained in a compressed format, i.e., with default
|
2019-08-19 19:30:12 +02:00
|
|
|
values removed. So the --silent option will accomplish nothing.
|
2017-07-10 04:05:59 +02:00
|
|
|
Without --silent, you will have the opportunity over override the default
|
|
|
|
value from the command line and, in that case, the script may still have
|
|
|
|
some minimal value.]
|
|
|
|
|
2014-08-30 01:44:15 +02:00
|
|
|
This is a bash script that automatics refreshing of board default
|
|
|
|
configuration (defconfig) files. It does not do anything special
|
2016-06-24 02:28:25 +02:00
|
|
|
that you cannot do manually, but is useful for me when I have to
|
2019-08-19 19:30:12 +02:00
|
|
|
update dozens of configuration files.
|
2014-08-30 01:44:15 +02:00
|
|
|
|
|
|
|
Configuration files have to be updated because over time, the
|
|
|
|
configuration settings change: New configurations are added and
|
|
|
|
new dependencies are added. So an old configuration file may
|
|
|
|
not be usable anymore until it is refreshed.
|
|
|
|
|
2016-03-11 00:24:48 +01:00
|
|
|
Help is also available:
|
|
|
|
|
|
|
|
$ tools/refresh.sh --help
|
|
|
|
tools/refresh.sh is a tool for refreshing board configurations
|
|
|
|
|
2020-03-20 05:14:26 +01:00
|
|
|
USAGE: ./refresh.sh [options] <board>/<config>+
|
2016-03-11 00:24:48 +01:00
|
|
|
|
2018-06-02 03:44:02 +02:00
|
|
|
Where [options] include:
|
2016-03-11 00:24:48 +01:00
|
|
|
--debug
|
|
|
|
Enable script debug
|
|
|
|
--silent
|
|
|
|
Update board configuration without interaction
|
2018-06-02 03:44:02 +02:00
|
|
|
--defaults
|
|
|
|
Do not prompt for new default selections; accept all recommended default values
|
2016-03-11 00:24:48 +01:00
|
|
|
--help
|
|
|
|
Show this help message and exit
|
|
|
|
<board>
|
2019-08-05 15:24:57 +02:00
|
|
|
The board directory under nuttx/boards
|
2016-03-11 00:24:48 +01:00
|
|
|
<config>
|
2019-08-08 17:16:30 +02:00
|
|
|
The board configuration directory under nuttx/boards/<arch>/<chip>/<board>
|
2016-03-11 00:24:48 +01:00
|
|
|
|
|
|
|
The steps to refresh the file taken by refresh.sh are:
|
2014-08-30 01:44:15 +02:00
|
|
|
|
|
|
|
1. Make tools/cmpconfig if it is not already built.
|
2017-05-11 21:35:56 +02:00
|
|
|
2. Copy the defconfig file to the top-level NuttX
|
2014-08-30 01:44:15 +02:00
|
|
|
directory as .config (being careful to save any previous
|
|
|
|
.config file that you might want to keep!).
|
|
|
|
3. Execute 'make oldconfig' to update the configuration.
|
|
|
|
'make oldconfig' will prompt you for each change in the
|
|
|
|
configuration that requires that you make some decision.
|
2016-03-11 00:24:48 +01:00
|
|
|
With the --silent option, the script will use 'make
|
|
|
|
oldefconfig' instead and you won't have to answer any
|
|
|
|
questions; the refresh will simply accept the default
|
|
|
|
value for any new configuration settings.
|
2014-08-30 01:44:15 +02:00
|
|
|
4. Then it runs tools/cmpconfig to show the real differences
|
|
|
|
between the configuration files. Configuration files are
|
|
|
|
complex and things can move around so a simple 'diff' between
|
|
|
|
two configuration files is often not useful. But tools/cmpconfig
|
|
|
|
will show only the meaningful differences between the two
|
|
|
|
configuration files.
|
2014-08-30 15:00:52 +02:00
|
|
|
4. It will edit the .config file to comment out the setting
|
|
|
|
of the CONFIG_APPS_DIR= setting. This setting should not
|
|
|
|
be in checked-in defconfig files because the actually must
|
|
|
|
be determined at the next time that the configuration is
|
|
|
|
installed.
|
2014-08-30 01:44:15 +02:00
|
|
|
5. Finally, the refreshed defconfig file is copied back in
|
|
|
|
place where it can be committed with the next set of
|
2016-03-11 00:24:48 +01:00
|
|
|
difference to the command line. If you select the --silent
|
2019-08-19 19:30:12 +02:00
|
|
|
option, this file copy will occur automatically. Otherwise,
|
2016-03-11 00:24:48 +01:00
|
|
|
refresh.sh will prompt you first to avoid overwriting the
|
|
|
|
defconfig file with changes that you may not want.
|
2015-06-30 22:38:01 +02:00
|
|
|
|
2019-02-07 19:11:40 +01:00
|
|
|
rmcr.c
|
|
|
|
------
|
|
|
|
|
|
|
|
Removes all white space from the end of lines. Whitespace here
|
|
|
|
includes space characters, TAB characters, horizontal and vertical
|
|
|
|
TABs, and carriage returns. Lines will be terminated with the
|
|
|
|
newline character only.
|
|
|
|
|
|
|
|
sethost.sh
|
|
|
|
----------
|
|
|
|
|
|
|
|
Saved configurations may run on Linux, Cygwin (32- or 64-bit), or other
|
|
|
|
platforms. The platform characteristics can be changed use 'make
|
|
|
|
menuconfig'. Sometimes this can be confusing due to the differences
|
|
|
|
between the platforms. Enter sethost.sh
|
|
|
|
|
|
|
|
sethost.sh is a simple script that changes a configuration to your
|
|
|
|
host platform. This can greatly simplify life if you use many different
|
|
|
|
configurations. For example, if you are running on Linux and you
|
|
|
|
configure like this:
|
|
|
|
|
2019-08-06 00:53:39 +02:00
|
|
|
$ tools/configure.sh board:configuration
|
2019-02-07 19:11:40 +01:00
|
|
|
|
|
|
|
The you can use the following command to both (1) make sure that the
|
|
|
|
configuration is up to date, AND (2) the configuration is set up
|
|
|
|
correctly for Linux:
|
|
|
|
|
|
|
|
$ tools/sethost.sh -l
|
|
|
|
|
|
|
|
Or, if you are on a Windows/Cygwin 64-bit platform:
|
|
|
|
|
2020-01-19 18:29:34 +01:00
|
|
|
$ tools/sethost.sh -c
|
2019-02-07 19:11:40 +01:00
|
|
|
|
|
|
|
Other options are available:
|
|
|
|
|
|
|
|
$ ./sethost.sh -h
|
|
|
|
|
2020-10-18 15:28:35 +02:00
|
|
|
USAGE: ./sethost.sh [-l|m|c|g|n] [make-opts]
|
2019-02-07 19:11:40 +01:00
|
|
|
./sethost.sh -h
|
|
|
|
|
|
|
|
Where:
|
2020-10-18 15:28:35 +02:00
|
|
|
-l|m|c|g|n selects Linux (l), macOS (m), Cygwin (c),
|
|
|
|
MSYS/MSYS2 (g) or Windows native (n). Default Linux
|
2020-03-20 05:08:27 +01:00
|
|
|
make-opts directly pass to make
|
2019-02-07 19:11:40 +01:00
|
|
|
-h will show this help test and terminate
|
|
|
|
|
2020-02-25 01:34:35 +01:00
|
|
|
simhostroute.sh
|
|
|
|
---------------
|
|
|
|
|
|
|
|
Helper script used to set up the tap driver, host routes,
|
|
|
|
and IP Tables rules to support networking with the
|
|
|
|
simulator under Linux. General usage:
|
|
|
|
|
|
|
|
$ tools/simhostroute.sh
|
|
|
|
Usage: tools/simhostroute.sh <interface> <on|off>
|
|
|
|
|
|
|
|
See boards/sim/sim/sim/NETWORK-LINUX.txt for further information
|
|
|
|
|
2019-09-28 18:54:54 +02:00
|
|
|
simbridge.sh
|
|
|
|
------------
|
|
|
|
|
|
|
|
Helper script used to set up a bridge to support networking with the
|
|
|
|
simulator under Linux. General usage:
|
|
|
|
|
|
|
|
$ tools/simbridge.sh
|
|
|
|
Usage: tools/simbridge.sh <interface> <on|off>
|
|
|
|
|
2019-10-01 19:10:16 +02:00
|
|
|
See boards/sim/sim/sim/NETWORK-LINUX.txt for further information
|
|
|
|
|
2016-11-28 19:00:10 +01:00
|
|
|
showsize.sh
|
|
|
|
-----------
|
|
|
|
|
|
|
|
Show the top 10 biggest memory hogs in code and data spaces. This
|
|
|
|
must be executed from the top-level NuttX directory like:
|
|
|
|
|
|
|
|
$ tools/showsize.sh
|
|
|
|
TOP 10 BIG DATA
|
|
|
|
...
|
|
|
|
TOP 10 BIG CODE
|
|
|
|
...
|
|
|
|
|
2015-06-30 23:05:36 +02:00
|
|
|
testbuild.sh
|
|
|
|
------------
|
2015-06-30 22:38:01 +02:00
|
|
|
|
2015-06-30 23:18:57 +02:00
|
|
|
This script automates building of a set of configurations. The intent is
|
|
|
|
simply to assure that the set of configurations build correctly. The -h
|
|
|
|
option shows the usage:
|
2015-06-30 22:38:01 +02:00
|
|
|
|
2015-06-30 23:18:57 +02:00
|
|
|
$ ./testbuild.sh -h
|
2015-06-30 22:38:01 +02:00
|
|
|
|
2022-01-31 03:40:55 +01:00
|
|
|
USAGE: ./testbuild.sh [-l|m|c|g|n] [-d] [-e <extraflags>] [-x] [-j <ncpus>] [-a <appsdir>] [-t <topdir>] [-p] [-G] <testlist-file>
|
2018-06-02 03:44:02 +02:00
|
|
|
./testbuild.sh -h
|
2015-06-30 22:38:01 +02:00
|
|
|
|
2018-06-02 03:44:02 +02:00
|
|
|
Where:
|
2020-10-18 15:28:35 +02:00
|
|
|
-l|m|c|g|n selects Linux (l), macOS (m), Cygwin (c),
|
2022-01-31 03:40:55 +01:00
|
|
|
MSYS/MSYS2 (g) or Windows native (n). Default Linux
|
2018-06-02 03:44:02 +02:00
|
|
|
-d enables script debug output
|
2022-01-31 03:40:55 +01:00
|
|
|
-e pass extra c/c++ flags such as -Wno-cpp via make command line
|
2018-06-02 03:44:02 +02:00
|
|
|
-x exit on build failures
|
2020-04-03 04:35:30 +02:00
|
|
|
-j <ncpus> passed on to make. Default: No -j make option.
|
|
|
|
-a <appsdir> provides the relative path to the apps/ directory. Default ../apps
|
2022-01-31 03:40:55 +01:00
|
|
|
-t <topdir> provides the absolute path to top nuttx/ directory. Default ../nuttx
|
2020-04-03 04:35:30 +02:00
|
|
|
-p only print the list of configs without running any builds
|
2022-01-31 03:40:55 +01:00
|
|
|
-A store the build executable artifact in ARTIFACTDIR (defaults to ../buildartifacts
|
2020-11-10 15:15:22 +01:00
|
|
|
-C Skip tree cleanness check.
|
2020-04-03 04:35:30 +02:00
|
|
|
-G Use "git clean -xfdq" instead of "make distclean" to clean the tree.
|
|
|
|
This option may speed up the builds. However, note that:
|
|
|
|
* This assumes that your trees are git based.
|
|
|
|
* This assumes that only nuttx and apps repos need to be cleaned.
|
|
|
|
* If the tree has files not managed by git, they will be removed
|
|
|
|
as well.
|
2015-06-30 23:18:57 +02:00
|
|
|
-h will show this help test and terminate
|
|
|
|
<testlist-file> selects the list of configurations to test. No default
|
2015-06-30 22:38:01 +02:00
|
|
|
|
2015-06-30 23:18:57 +02:00
|
|
|
Your PATH variable must include the path to both the build tools and the
|
|
|
|
kconfig-frontends tools
|
2015-06-30 22:38:01 +02:00
|
|
|
|
2015-06-30 23:18:57 +02:00
|
|
|
These script needs two pieces of information.
|
2015-06-30 22:38:01 +02:00
|
|
|
|
2020-01-19 18:29:34 +01:00
|
|
|
a. A description of the platform that you are testing on. This description
|
2020-10-18 15:28:35 +02:00
|
|
|
is provided by the optional -l, -m, -c, -g and -n options.
|
2015-06-30 23:18:57 +02:00
|
|
|
b. A list of configurations to build. That list is provided by a test
|
|
|
|
list file. The final, non-optional parameter, <testlist-file>,
|
|
|
|
provides the path to that file.
|
2015-06-30 22:38:01 +02:00
|
|
|
|
2020-02-23 09:50:23 +01:00
|
|
|
The test list file is a sequence of build descriptions, one per line. One
|
2015-06-30 23:18:57 +02:00
|
|
|
build descriptions consists of two comma separated values. For example:
|
2015-06-30 22:38:01 +02:00
|
|
|
|
2020-01-20 17:51:26 +01:00
|
|
|
stm32f429i-disco:nsh,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
|
2020-10-26 18:10:40 +01:00
|
|
|
arduino-due:nsh,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
|
2020-01-20 17:51:26 +01:00
|
|
|
/arm,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
|
2021-12-26 17:18:22 +01:00
|
|
|
/risc-v,CONFIG_RISCV_TOOLCHAIN_GNU_RVGL
|
2015-06-30 22:38:01 +02:00
|
|
|
|
2015-06-30 23:18:57 +02:00
|
|
|
The first value is the usual configuration description of the form
|
2020-01-20 17:51:26 +01:00
|
|
|
<board-name>:<configuration-name> or /<folder-name> and must correspond to a
|
|
|
|
configuration or folder in the nuttx/boards directory.
|
2015-06-30 22:38:01 +02:00
|
|
|
|
2015-06-30 23:18:57 +02:00
|
|
|
The second value is valid name for a toolchain configuration to use
|
|
|
|
when building the configuration. The set of valid toolchain
|
|
|
|
configuration names depends on the underlying architecture of the
|
|
|
|
configured board.
|
2015-06-30 22:38:01 +02:00
|
|
|
|
2020-02-23 09:50:23 +01:00
|
|
|
The prefix '-' can be used to skip a configuration:
|
2020-10-26 18:44:23 +01:00
|
|
|
-stm32f429i-disco/nsh
|
|
|
|
|
|
|
|
or skip a configuration on a specific host(e.g. Darwin):
|
|
|
|
-Darwin,sim:rpserver
|
2015-07-05 16:40:56 +02:00
|
|
|
|
2018-04-11 14:59:57 +02:00
|
|
|
uncrustify.cfg
|
|
|
|
--------------
|
|
|
|
|
|
|
|
This is a configuration script for the uncrustify code beautifier.
|
|
|
|
Uncrustify does well with forcing braces into "if" statements and
|
2020-10-19 06:09:06 +02:00
|
|
|
indenting per the NuttX C coding standard. It correctly does things
|
2018-04-11 14:59:57 +02:00
|
|
|
like placing all braces on separate lines at the proper indentation
|
|
|
|
level. It cannot handle certain requirements of the coding standard
|
|
|
|
such as
|
|
|
|
|
|
|
|
- FAR attributes in pointer declarations.
|
2020-10-19 06:09:06 +02:00
|
|
|
- The NuttX standard function header block comments.
|
2018-04-11 22:39:54 +02:00
|
|
|
- Naming violations such as use of CamelCase variable names,
|
|
|
|
lower case pre-processor definitions, etc.
|
2018-04-11 14:59:57 +02:00
|
|
|
|
|
|
|
Comment blocks, function headers, files headers, etc. must be formatted
|
|
|
|
manually.
|
|
|
|
|
|
|
|
Its handling of block comments is fragile. If the comment is perfect,
|
|
|
|
it leaves it alone, but if the block comment is deemed to need a fix
|
|
|
|
it starts erroneously indenting the continuation lines of the comment.
|
|
|
|
|
2018-04-11 23:45:39 +02:00
|
|
|
- uncrustify.cfg messed up the indent of most block comments.
|
|
|
|
cmt_sp_before_star_cont is applied inconsistently. I added
|
|
|
|
|
|
|
|
cmt_indent_multi = false # disable all multi-line comment changes
|
|
|
|
|
|
|
|
to the .cfg file to limit its damage to block comments.
|
|
|
|
- It is very strict at wrapping lines at column 78. Even when column 79
|
|
|
|
just contained the '/' of a closing "*/". That created many
|
|
|
|
bad continuation lines.
|
|
|
|
- It moved '{' that opened a struct to the line defining the struct.
|
|
|
|
nl_struct_brace = add (or force) seemed to be ignored.
|
|
|
|
- It also aligned variable names in declarations and '=' signs in
|
|
|
|
assignment statements in a seemingly arbitrary manner. Making changes
|
|
|
|
that were not necessary.
|
|
|
|
|
2018-04-11 22:39:54 +02:00
|
|
|
NOTE: uncrustify.cfg should *ONLY* be used with new files that have an
|
|
|
|
inconsistent coding style. uncrustify.cfg should get you in the ballpark,
|
|
|
|
but you should expect to review and hand-edit the files to assume 100%
|
|
|
|
compliance.
|
|
|
|
|
|
|
|
WARNING: *NEVER* use uncrustify.cfg for modifications to existing NuttX
|
|
|
|
files. It will probably corrupt the style in subtle ways!
|
|
|
|
|
2018-04-11 14:59:57 +02:00
|
|
|
This was last verified against uncrustify 0.66.1 by Bob Feretich.
|
|
|
|
|
|
|
|
About uncrustify: Uncrustify is a highly configurable, easily modifiable
|
|
|
|
source code beautifier. To learn more about uncrustify:
|
|
|
|
|
|
|
|
http://uncrustify.sourceforge.net/
|
|
|
|
|
|
|
|
Source code is available on GitHub:
|
|
|
|
|
|
|
|
https://github.com/uncrustify/uncrustify
|
|
|
|
|
|
|
|
Binary packages are available for Linux via command line installers.
|
2019-08-19 19:30:12 +02:00
|
|
|
Binaries for both Windows and Linux are available at:
|
2018-04-11 14:59:57 +02:00
|
|
|
|
|
|
|
https://sourceforge.net/projects/uncrustify/files/
|
|
|
|
|
2018-04-12 02:47:59 +02:00
|
|
|
See also indent.sh and nxstyle.c
|
|
|
|
|
2020-02-22 23:23:50 +01:00
|
|
|
zds
|
|
|
|
---
|
|
|
|
|
|
|
|
This directory contains build tools used only with the ZDS-II
|
|
|
|
platforms (z8, ez80, zNeo).
|
|
|
|
|
2011-03-12 16:36:28 +01:00
|
|
|
zipme.sh
|
2012-11-13 21:24:30 +01:00
|
|
|
--------
|
2011-03-12 16:36:28 +01:00
|
|
|
|
|
|
|
I use this script to create the nuttx-xx.yy.tar.gz tarballs for
|
2020-04-09 01:31:22 +02:00
|
|
|
release. It is handy because it also does the kind of clean up
|
|
|
|
that you need to do to make a clean code release.
|
|
|
|
It can also PGP sign the final tarballs and create their SHA512 hash.
|
|
|
|
Any VCS files or directories are excluded from the final tarballs.
|
|
|
|
|
|
|
|
$ ./tools/zipme.sh -h
|
2020-04-21 06:22:56 +02:00
|
|
|
USAGE="USAGE: ./tools/zipme.sh [-d|h|v|s] [-b <build]> [-e <exclude>] [-k <key-id>] [<major.minor.patch>]"
|
2020-04-09 01:31:22 +02:00
|
|
|
Examples:
|
2020-04-18 20:47:04 +02:00
|
|
|
./tools/zipme.sh -s 9.0.0
|
|
|
|
Create version 9.0.0 tarballs and sign them.
|
|
|
|
./tools/zipme.sh -s -k XXXXXX 9.0.0
|
2020-04-09 01:31:22 +02:00
|
|
|
Same as above but use the key-id XXXXXX to sign the tarballs
|
2020-04-18 20:47:04 +02:00
|
|
|
./tools/zipme.sh -e "*.swp tmp" 9.0.0
|
|
|
|
Create the tarballs but exclude any .swp file and the "tmp" directory.
|