This option, if set, will add arguments to CMake whenever a new build
system is being generated.
It doesn't affect other invocations of CMake, such as when cmake(1) is
run in build tool mode to actually compile the application.
See the documentation changes for details.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The ARM Generic Interrupt Controller (GIC) supports multiple interrupt
types whose linear IRQ numbers are offset by a type-specific base
number.
This commit adds a function to automatically fix up ARM GIC interrupts
in order to output a linear IRQ number that is offset by the interrupt
type-specific base number.
For more details, refer to the issue #19860.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Make sure we do enable size tracking with options that depend on the
size of generated binaries to be available.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Shortens main() a bit and makes it easier to read.
Rename write_flash() to write_flash_node(), and let write_flash() be the
top-level function. Also move the looking-up of the /chosen properties
into the the various helper functions themselves, and shorten some names
that are clear in context.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Make the node/ordinal list a part of the header comment to make the
output prettier.
Before:
/*
* Generated by gen_defines.py
*
* DTS input file:
* rv32m1_vega_ri5cy.dts.pre.tmp
*
* Directories with bindings:
* $ZEPHYR_BASE/dts/bindings
*/
/* Nodes in dependency order (ordinal : path): */
/* 0 : / */
/* 1 : /aliases */
/* 2 : /chosen */
/* 3 : /connector */
/* 4 : /cpus */
/* 5 : /cpus/cpu@0 */
/* 6 : /gpio_keys */
/* 7 : /soc */
...
After:
/*
* Generated by gen_defines.py
*
* DTS input file:
* rv32m1_vega_ri5cy.dts.pre.tmp
*
* Directories with bindings:
* $ZEPHYR_BASE/dts/bindings
*
* Nodes in dependency order (ordinal and path):
* 0 /
* 1 /aliases
* 2 /chosen
* 3 /connector
* 4 /cpus
* 5 /cpus/cpu@0
* 6 /gpio_keys
* 7 /soc
* ...
*/
Also move the writing of the top comment and the node comments into
separate functions, to shorten main() and make it easier to follow.
Piggyback some minor comment-related simplifications.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
gcovr is already a dependency in scripts/requirements.txt. The
visualization is different, but the functionality should be the same.
Tested with gcovr 4.2.
Relates to #17626.
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
We now use EDTS and gen_defines.py to generate DTS defines. We
deprecated the old script and defines several releases ago, so lets now
remove them.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Print all tests using a tree structure (depends on anytree module). This
now can be done using --test-tree option.
sanitycheck --test-tree -T tests/kernel/
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Basic tool to help checking Kconfig options against a list of
hardening preferences.
This tool is available as a kconfig target, so to run it:
make/ninja hardenconfig
[Flavio Ceolin: Simplify logic and fix python lint issues]
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Erroring out for 'status = "ok"' broke backwards compatibility for a
downstream project. Accept it instead.
Maybe the error could be selectively re-enabled later.
The rest of the code only checks for 'status = "disabled"' (like the old
scripts), so no other updates are needed.
(It's a bit weird that we duplicate the property check in base.yaml.
Thinking of including base.yaml implicitly. Could clean things up then.)
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
There is no code to handle __syscall_inline so it is better removing
it from doxygen and checkpatch.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Use the folder the config file is in as an additional search directory
for openocd. This way additional files, like custom debug interface
files can be put in the support folder of a board and the openocd.cfg
can use them.
Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
We were parsing random FAIL messages from the output of test runs ad
testcases and capturing them in the xml output. Now we only parse the
name if it starts with test_.
Fixes#21162
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
gen_syscall_header.py is not longer necessary, it was just creating a
file including syscall.h. This header is now included directly by
gen_syscalls.py.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The blackmagicprobe runner's Python process fails to ignore SIGINT
when it runs GDB from the debug and flash callbacks, which is wrong.
The other runners tend to use run_server_and_client() to properly
handle this, since they start a GDB server and connect to it with a
client. The BMP USB device presents itself as a serial device which
speaks the GDB serial protocol instead, so there's no server/client,
and thus no call to run_server_and_client().
The problem is that blackmagicprobe essentially uses
subprocess.check_call() to start GDB directly, without ignoring SIGINT
in the python process. Easy fix.
Fixes: #21139
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Fixed bug in parsing testnames from source files. We added 1cpu testing
but did not update the regex and we have been passing wrong path to the
glob as well, meaning tests were not parsed at all.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
When storing an updated hardware list remove the serial property value
from entries that are not connected, to reduce confusion about exactly
what ttyACM0 is connected to.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Confirm to the user what devices were found and where they are before
starting a long run that might not have found everything it was supposed
to test.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Boards like mimxrt1060_evk are recognized by the scanner through their
USB device which has an ID, but in some cases the board may be
programmed using an external J-Link probe. Support this by adding a
probe_id key that can be added to the yaml dictionary to override the
use of id for this purpose.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add manufacturer and product identifiers to produce board information
for SiLabs and NXP hardware when using --generate-hardware-map.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit fixes the issue, that --enable-coverage alone did not create
coverage information. It also required to give --coverage-platform.
Now the fallback for coverage-platform to platform works as documented
also for enable-coverage, not only for coverage option.
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
The discard report is now generated for every run as
sanity-out/sanitycheck_discard.csv, the option --discard-report was
dropped.
Fixes#20804
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The interprocessor communication can be based on shared memory.
Allow to declare this memory as with a generic name derived from
chosen declaration.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
This command needs access to DT configuration, but can no longer
access it through BuildConfiguration since
9da1d41a12.
Import edtlib and use that instead.
Fix up some other error handling and output issues while we're here to
make the script's behavior easier to inspect and debug.
Fixes: #20545
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add support for boards that utilize the TI XDS110 like the CC3220SF,
CC3235SF, CC1352R1 and CC26x2R1 LaunchXL boards. The XDS110 can expose
multiple serial endpoints one for the uart device, but another for a
trace buffer. We assume that endpoint 0 will be the UART device.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add setting runner type to jlink for 'J-Link' and openocd for
'STM32 STLink' when generating the hardware map.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This makes the misc-flasher runner usable by passing the build
directory to the underlying tool.
Fixes: #20658
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit relocates the QEMU-specific code that currently resides in
ProjectBuilder.run to QEMUHandler.handle, in order to align with what
other handlers are doing.
For more details, refer to the PR #20573.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The current QEMUHandler implementation in sanitycheck does not check
for the process exit code and reports "PASS" even when either the QEMU
executable cannot be launched or exited immediately due to an error
(e.g. unsupported machine type, missing file, ...).
This commit adds QEMU process exit code check and error reporting when
the exit code is a non-zero value.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Python 3.5 and earlier do not preserve dictionary insertion order when
iterating over dictionaries, and do not give the same order between
runs. This broke the dtlib and edtlib test suites and made the output
jump around randomly between runs. It also made device INST_<n> numbers
non-deterministic, which broke some code on Python 3.5 (though
hardcoding device instance numbers in the code might be a bit shaky).
Fix it by using collections.OrderedDict instead of plain dict wherever
order matters. This makes the output identical on all supported Python
versions. It also allows testdtlib.py and testedtlib.py to run in CI,
which uses Python 3.5.
Fixes: #20571
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
edtlib is a library, and modifying yaml.(C)Loader directly interferes
with any binding loading in edtlib clients. To avoid that, add a custom
loader for bindings.
Internally, PyYAML does this, which is why defining a separate class
works:
@classmethod
def add_constructor(cls, tag, constructor):
if not 'yaml_constructors' in cls.__dict__:
cls.yaml_constructors = cls.yaml_constructors.copy()
cls.yaml_constructors[tag] = constructor
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
commit 0df4a53107 changed the behavior of
how openocd commands are passed to openocd. We used to add -c to each
command, now the commands are being added without -c causing an error.
This adds "-c" to all commands instead of just passing a list.
Also fixes#20449.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit extends the nrfjprog.py runner script so it adds
support for nRF53. In the wake of the changes done in the
runner script, we extend the testing done in test_nrfjprog.py,
adding the required coverage for the nRF53.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Promote the private z_arch_* namespace, which specifies
the interface between the core kernel and the
architecture code, to a new top-level namespace named
arch_*.
This allows our documentation generation to create
online documentation for this set of interfaces,
and this set of interfaces is worth treating in a
more formal way anyway.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Add API for accessing Electrically Erasable Programmable Read-Only
Memory (EEPROM) devices.
EEPROMs have an erase block size of 1 byte, a long lifetime, and allows
overwriting data on byte-by-byte access.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>