The same tool 'gen_esp32part.py' is used for the generation of partition tables on ESP8266 as well as n ESP32. The tool is therefore added to 'dist/tools/esptool'
OpenOCD already ships config files for the EFM32 and EFR32 family, no
need to duplicate them in RIOT; this removes the "file exists" check for
files that are clearly OpenOCD-shipped board configurations, as the
script can't (and shouldn't) know OpenOCD's include paths.
Allow specifying index of `flash bank` to read configuration from
in cases where the configuration provided in openocd is incorrect.
This is the case for the majority of stm32 boards where it relies
on `flash probe` to get the correct value.
This tool generates a random hexadecimal value of a given maximum size.
This is useful for generating random canary values during compile-time
for the ssp module which currently uses a constant value.
Prepare for handling pkg state with files. So it requires having the
path defined before declaring targets. In addition, it cleans up the
old git-download target.
Some systems use dash as system shell, others use bash. The shell used
by make can also be different, and unrelated to the system shell.
Differences in this variable can cause problems when testing PRs and
reporting bugs.
The default shell is important system information that should be reported.
For some boards `make reset` is only possible if a serial connection
is not already open or its execution might disrupt it. This
causes some tests to fail since before running a test the board
is reset.
`make reset` is currently used as a synchronization mechanism between
the application and the test script. With `test_utils_interactive_sync`
this is no longer needed so call `make reset` before `cleanterm` instead
of after when `test_utils_interactive_sync` is used.
Allow setting TESTRUNNER_RESET_AFTER_TERM=1 to keep the previous
behaviour for `examples/%/tests`.
The modified version esptool.py from RTOS SDK that is required for flashing an image, is now placed in `dist/tools/esptool.py` and used directly from there. The advantage is that `esptool.py` hasn't to be installed explicitly anymore. Having RIOT is enough. The documentation is adapted accordingly. The oly prerequisite is that python and the pyserial module are installed.
This check verifies the APPLICATION variable is not set by tests application Makefiles. These applications should include the common test Makefile, where this variable is automatically set
Added a script to determine the sizes of the default C11 atomic types and
generate an C++ header with preprocessor defines to access the sizes of the
types and an integer type of the same size (and therefore alignment
requirements).
changed wan -> WAN, codespell help says:
"Words are case sensitive based on how they are written in the dictionary file"
Thus WAN doesn't match but "wan" does.
Also added "dout" (short form of digital out).
- Enforce that all applications do not manage BOARD_INSUFFICIENT_MEMORY in the
Makefile
- Match also "BOARD_INSUFFICIENT_MEMORY +=", not only
"BOARD_INSUFFICIENT_MEMORY :=" or "BOARD_INSUFFICIENT_MEMORY =".
All if_lib tests are no longer in use so the if_lib is obsolete.
It is replace by robot framework tests, riot_pal, and philip_pal.
Check the RF_Tests repo for more information
This script can detect [Black Magic Probes](https://github.com/blacksphere/blackmagic/wiki) and act as a flashloader (and more).
It is compatible with Linux and macOS.
All important options that can be set via the monitor command are available as arguments.
Makefiles for using `make flash`, `make erase`, `make debug` and `make term` with the script are included.
This allow configuring the flash targets in the same way as the
compilation and test targets.
This is part of trying to flash with docker using a different flash target.
This is still currently a hack to hardcode it as the value can be deduced
from the `BOARD_MODULE` daughter board name.
But it requires more cleanup and could come in a separate step.
Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
This commit adds an example application showcasing SUIT draft v4
firmware updates.
It includes a test script suitable for local or CI testing.
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: Francisco Molina <femolina@uc.cl>
Add a script saving all applications and boards dependency resolution
variables and also aggregated files to compare between both dependencies
handling.
It is slow but should dump everything.
This commit adds support tools used by the SUIT firmware upgrade module.
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: Francisco Molina <femolina@uc.cl>
CPU and CPU_MODEL variables must now be defined by
`boards/**/Makefile.features` or 'cpu/CPU/Makefile.features' files
instead of `**/Makefile.include.
Currently blacklist the slwstk6000b that still define
'CPU_MODEL' in a file that is not a 'Makefile.features.
This allows getting this sanity check script in master
This allow using the variables when parsing dependencies.
CMake quoted strings do not accept having \ or " inside. So use the
"bracket argument" format.
I migrated all variables to use this format.
Migrate to 'printf' to not rely on having \" inside the string everywhere.
This prepares for having macros defined in the CFLAGS again.
pic32prog is a program for flashing pic32 boards from command line on Linux.
It works with:
* Microchip PICkit2
* Microchip PICkit3 with script firmware.
* Other ones: https://github.com/sergev/pic32prog/wiki
Change shebang in script from `/bin/bash` to `/usr/bin/env bash`,
which fixed problems when `bash` is not available in standard location,
e.g., on non-Linux OSes such as FreeBSD.
Change shebang in script from `/bin/bash` to `/usr/bin/env bash`,
which fixed problems when `bash` is not available in standard location,
e.g., on non-Linux OSes such as FreeBSD.
Change shebang in script from `/bin/bash` to `/usr/bin/env bash`,
which fixed problems when `bash` is not available in standard location,
e.g., on non-Linux OSes such as FreeBSD.
Change shebang in static-test.sh from `/bin/bash` to `/usr/bin/env bash`
This fixes problems when `bash` is not available in standard location,
but e.g. in `/usr/local/bin/` as on FreeBSD.
- Add a variable to add extra openocd commands before resetting
a board. These will not be called when `debug`, in contrast
to OPENOCD_CONFIG, OPENOCD_EXTRA_INIT and OPENOCD_ADAPTER_INIT.
- Add connect_assert_srst to reset config if
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST=1
Generate a module for arduino sketches in a subfolder of BINDIR.
This prevents issues when doing concurrent builds or out of tree build with
readonly sources.
Declare all generated files as `BUILDDEPS` to be re-created after
`clean` on parrallel `clean all`.
This Coccinelle script will warn when new code has the potential to use
the macro ARRAYSIZE instead of something like this
sizeof(some_array) / sizeof(some_array[0])
Add an option to only compile applications that have available test.
The target usage is when running hardware tests to save time by only
compiling what will be tested.
Few flashers require a longer time to flash code and reset the device and
requires the test script to wait for a longer time before timing out.
This commit adds a environment variable "RIOT_TEST_TIMEOUT" that can be
set by the user to vary the timeout in accordance to the requirements
of the system
on-behalf-of: @sparkmeter <sanju.kannioth@sparkmeter.io>
Handle putting the final error message by prepending the output.
This removes issue with errors being concatenated and gives an
interractive output.
The errors are now send to stderr.
The example in the tool documentation contains several things that are
wrong:
- exports PORT.
- Defines the port using :=.
- Defines PORT instead of PORT_LINUX, PORT_DARWIN
- ifeq-based logic (which will force an evaluation).
I have not tested the new example script.
Handle differently variables that are exported in `vars.inc.mk` from the
ones that should not.
This is needed for the upcoming variables change that should also be
removed from `vars.inc.mk` right now.
Keeping the old behavior will help migrating other variables more easily
by keeping them only exported in vars.inc.mk in the first time.
Some boards have a configuration of the flash bank with an address of 0
when it actually starts as 0x08000000 but openocd relies on probing
the hardware at runtime.
This now allows to first probe the board to get the actual value.
If probing fail for any reason, return the value from the configuration.
This can happen when the board is unreachable so at least give a valid
output instead of an error.
This will allow correct flash detection on for example the `stm32f3` and
`stm32l4` which have a configured address of 0.
4a6f93c961/tcl/target/stm32f3x.cfg (L64)4a6f93c961/tcl/target/stm32l4x.cfg (L51)
Remove the check that directory are git tracked or not.
This should not be done by the script and was a mistake.
If need be to be checked it should be moved to RIOT 'info-applications'
and running tests should be done in a clean environment anyway.
Currently giving an absolute or outside of RIOT application breaks the
result directory evaluation which can lead to deleting the application.
Add an assertion to detect it.
Check that some variables are not exported in the build system.
This should track variables that managed to not be exported anymore so
that they do not reappear in a BSP.
It is not a whitelist but just a way to keep things cleaned in the
future.
Otherwise, when an error occurs (e.g. credentials wrong on git push)
the worktree and the release branch still exists, which might be hard to
remove for a newcomer not knowing about `git worktree`.
The init_cmd feature is quite handy for automated pyterm runs but there
is no delay between the commands that are executed.
This adds a /sleep function that can be added between init_cmd commands
to prevent them from overflowing the RX buffer on the target.
On error Jlink exits with a no error code by default.
From the JLink User Guide:
'-ExitOnError' has the same meaning as the 'exitonerror' command
'exitonerror' command
This command toggles whether J-Link Commander exits on error or not.
1: J-Link Commander will now exit on Error.
0: J-Link Commander will no longer exit on Error.
Executing 'flash/reset' without a board connected now correctly returns an
error. For 'term' it does not show an error due to the way it is handled
internally.
It also returns an error when the board fails to do an operation when it
is in a state where it cannot be flashed for example.
Use the new 'test/available' target to detect if there are tests.
This prevents issues where calling make would print unrelated debug
messages that would be taken as an output.
The targets executed to check if there are tests can be set with
'--test-available-targets'.
The build system contains several instances of
INCLUDES += -I$(RIOTBASE)/sys/posix/include
This is bypassing the module management system, by directly accesing
headers without depending on a module. The module is the posix module.
That line is also added when one of the posix_* modules is requested.
According to the docs, the posix module provides headers only, but in
reality there is also inet.c.
This patch:
- Moves `inet.c` into `posix_inet`, leaving `posix` as a headers-only
module.
- Rename `posix` as `posix_headers` to make it clear the module only
includes headers.
- Makes `posix_*` modules depend on `posix_headers`, thus removing the
explicit `INCLUDES+=...` in `sys/Makefile.include`.
- Ocurrences of `INCLUDES+=...` are replaced by an explicit dependency
on `posix_headers`.