19050: boards/common/cc26xx cc13xx: clean up and fix flash configs r=benpicco a=maribu
### Contribution description
- Add support for XDS110 debugger via `OPENOCD_DEBUG_ADAPTER=xds110`
- Clean up OpenOCD configs in `boards/common/cc26xx_cc13xx`
- No longer hardcode the debugger to xds110, but use `OPENOCD_DEBUG_ADATER ?= xds110`
- Add support for cc13x0, cc13x2, cc26x0
- `boards/cc2650*`: drop custom OpenOCD config in favor of shared one
- add variables needed to support flashing with `PROGRAMMER=jlink`
- allow specifying a custom OpenOCD command to bring the device to a halt state, as the default `reset halt` (which causes a second reset) is causing issues with the ICEPick JTAG routers in the CC26xx - CC13xx devices
- Use `halt` instead of `reset halt` for CC26xx / CC13xx boards in OpenOCD to avoid issues in flashing
### Testing procedure
```
make BOARD=cc2650-launchpad -C examples/default flash
```
Should now work. The same should still work for other cc26xx cc13xx boards.
### Issues/PRs references
Partially fixes: https://github.com/RIOT-OS/RIOT/issues/18750
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Typically, OpenOCD is already performing a reset on connect. A
`reset halt` to bring the target to a `halt` state for flashing will
result in the device going through a second reset cycle. This can be
problematic with some device, such as the CC26xx MCUs. For these
devices, an `OPENOCD_CMD_RESET_HALT := -c 'halt'` will avoid the second
reset that is causing the issues.
19099: dist/tools/usb-serial: Clean up legacy scripts r=aabadie a=maribu
### Contribution description
Refactor the old bash scripts to use `ttys.py` instead and update the documentation.
### Testing procedure
The pi fleet should still work without modification.
### Issues/PRs references
Fixes https://github.com/RIOT-OS/RIOT/issues/15814
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
This commits add documentation to the HDC1000 params and adds generic
exclude patters to the doc check, so that when boards provide custom
HDC1000 params they do not need to document them again. The reasoning
is that the documentation in the central place is sufficient.
This commits add documentation to the FXOS8700 params and adds generic
exclude patters to the doc check, so that when boards provide custom
FXOS8700 params they do not need to document them again. The reasoning
is that the documentation in the central place is sufficient.
In addition, a generic exclude patter is added to match FXOS8700_REG_*,
as the register names are relatively self-explaining and an
implementation detail of the driver that doesn't need public
documentation.
This commits add documentation to the AT86RF2xx params and adds generic
exclude patters to the doc check, so that when boards provide custom
AT86RF2xx params they do not need to document them again. The reasoning
is that the documentation in the central place is sufficient.
Add generic patterns to allow XTIMER_DEV, XTIMER_HZ, XTIMER_WIDTH,
XTIMER_CHAN, XTIMER_BACKOFF, and XTIMER_ISR_BACKOFF to be undocumented.
The reasoning is that having them documented once is enough and warnings
for missing doc in every boards is just noise.
This commits add documentation to the TMP00X params and adds generic
exclude patters to the doc check, so that when boards provide custom
TMP00X params they do not need to document them again. The reasoning is
that the documentation in the central place is sufficient.
This commits add documentation to the pulse counter params and adds
generic exclude patters to the doc check, so that when boards provide
custom pulse counter params they do not need to document them again. The
reasoning is that the documentation in the central place is sufficient.
This commits add documentation to the PIR params and adds generic
exclude patters to the doc check, so that when boards provide custom PIR
params they do not need to document them again. The reasoning is that
the documentation in the central place is sufficient.
19039: Ensure C locale when querying the compiler for compile commands r=maribu a=janhenke
### Contribution description
This fixes generating the compile commands with localization enabled GCC and non-English shell locale. The python script uses regexes to extract the required information. These only match on the default English output. GCC supports localized output messages which break the regexes used. Instead of matching any possible localization, this fix forces the C locale for message output on the compiler invocation, thus ensuring the regexes can match.
### Testing procedure
Needed: arm-none-eabi.gcc with localization support and non-English system locale.
Invoke the compile-commands make target (`make compile-commands`).
It should generate the `compile_commands.json` file correctly.
### Issues/PRs references
None found, fix was trivial enough to fix it directly.
Co-authored-by: Jan Henke <Jan.Henke@taujhe.de>
GCC supports localized outputs, depending on the currently set locale.
This broke the compile-commands target, as the regexes only match the
English output. By invoking the compiler explicitly with the C locale,
it ensures the expected English language output.
19012: boards/arduino-mega2560: add TTY_BOARD_FILTER r=gschorcht a=maribu
### Contribution description
This allows automatically selecting TTY actually belonging to an
Arduino Mega2560 if `MOST_RECENT_PORT=1` is set.
### Testing procedure
```
make BOARD=arduino-mega2560 MOST_RECENT_PORT=1 -C examples/default flash term
```
Should automatically select the TTY of the most recently connected Arduino Mega2560, even if a board of a different type is connect more recently.
### Issues/PRs references
- [x] depends on (and includes) https://github.com/RIOT-OS/RIOT/pull/19011
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
If no TTY serial (matching the given filters, if any) was found, use
the exit code `1`. The idea is that simple shell scripts falling back
to alternative variants of a board can be used via
```.sh
ttys.py --most-recent --model Fooboard --vendor Footronic || \
ttys.py --most-recent --model Barboard --vendor Bartronic
```
Just adding a regex that would accept both vendors and models would
have different semantics: If both a Fooboard and a Barboard are
attached, it would pick the most recently connected of both. The shell
expression above would always prefer a Fooboard over a Borboard.
The use case cheap Arduino clones that replace the ATmega16U2 used
as USB UART bridge with cheap single purpose chips. The original
ATmega16U2 has the advantage that it provides identification data
unique the specific Arduino board, while the clones cannot be told
apart from standalone USB UART bridges or Arduino clones of other
models. Hence, we want to pick the genuine Arduino board if connected,
and only fall back to matching cheap USB UART bridges if no genuine
Arduino board is connected.
18803: dist/tools: Add compile_like_murdock r=benpicco a=MrKevinWeiss
### Contribution description
Helper script to pre-test murdock build conditions.
This is intended to compile like murdock giving control for only a subset of boards or applications. One can use this if only a limited change should be build tested. Defaults boards and apps are selected to be an early warning if something is wrong.
This should be used before triggering much larger murdock builds.
The following use cases are:
I made a change to something in the stm32 clocks... ./compile_like_murdock.py -c stm32
I changed a driver the DHT driver
./compile_like_murdock.py -a tests/driver_dht tests/saul
I changed a nucleo-f103rb board...
./compile_like_murdock.py -a tests/driver_dht tests/saul
### Testing procedure
View the help...
```
./dist/tools/compile_test/compile_like_murdock.py -h
```
Do a dry run of the cpu...
```
./dist/tools/compile_test/compile_like_murdock.py -c stm -d
```
Play with each of the args, try adding a module to hello-world to get a module mismatch.
### Issues/PRs references
<!--
Examples: Fixes#1234. See also #5678. Depends on PR #9876.
Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
-->
Co-authored-by: MrKevinWeiss <weiss.kevin604@gmail.com>
Helper script to pre-test murdock build conditions.
This is intended to compile like murdock giving control for only a subset of
boards or applications. One can use this if only a limited change should be
build tested. Defaults boards and apps are selected to be an early warning
if something is wrong.
This should be used before triggering much larger murdock builds.
The following use cases are:
I made a change to something in the stm32 clocks...
./compile_like_murdock.py -c stm32
I changed a driver the DHT driver
./compile_like_murdock.py -a tests/driver_dht tests/saul
I changed a nucleo-f103rb board...
./compile_like_murdock.py -a tests/driver_dht tests/saul
For some TTY interfaces no DB entry exists, which is reflected by
having a `None` in `tty[key]`. Trying to match a regex against `None`
in turn resulted then in an exception.
This fixes the issue by treating a filter applied on a non-existing
entry as not matching.
It turned out that 4983f8bb60 was not
enough to allow the tool to be executed from within
`dist/tools/backport_pr`. With this, I successfully tested it :)
Add `search_parent_directories=True` to `git.Repo()` so that
`backport_pr.py` can be called anywhere within the RIOT git repo
without manually passing the repo root path via `--gitdir`.
Previously the tool had to be called from the RIOT base repo.
flatc uses `strto<foo>_l()` over `strto<foo>()` when available, so that
they behave reproducible. The musl libc has no locale support, which
has the added benefit of reproducible behavior being the default.
For some reason a `strtof_l()` compatibility wrapper was added in
musl, but the other `strto<foo>_l()` wrappers are missing. This
adds a patch to check for `strtoull_l()` instead of `strtof_l()`. This
will not make a difference on a libc that supports all of them, but
fixes compilation on musl.
The argument regif was removed from the shell command in https://github.com/RIOT-OS/RIOT/pull/18053,
so there is not much need to keep it in the ShellInteraction for that command.
- most were trivial
- missing group close or open
- extra space
- no doxygen comment
- name commad might open an implicit group
this hould also be implicit cosed but does not happen somtimes
- crazy: internal declared groups have to be closed internal
JLink presumably has information about the device's RAM available
internally. Not passing the precise symbol area (which would be
available in the ELF file) because a) that'd make the terminal break
when the flashed firmware does not equal the built one, and b) that
would introduce a dependency from `term` to the ELF file that other
terminals don't have.
detect_includes_and_version_gcc() previously only detected the includes,
but has been extended to also return the version. This is done by
returning a tuple, with the first item being the list of include paths,
and the second being the version. In the error handling the script still
returns only an empty list of includes, but not an empty version. This
fixes the issue.
This removes the existing hack, in which we wrote the configuration to
/dev/null to trigger its evaluation. Instead a function for this
specific purpose is added.
We can't use PB13/PB12 which would be the 'standard' UART pins on
the -xpro EXT connectors since only SERCOM4 can map to those - and
that's already used on EXT1.
So use the adjacent PA08/PA09 with SERCOM0.
This is a follow-up for [16775], and was not caught there as that search
was limited to `which`.
Note that while this line can be simplified, the redirects ensure that
GNU Make < 4.3 will not optimize it into its own built-in shell that
does not know `command`.
[16775]: https://github.com/RIOT-OS/RIOT/pull/16775
While this could theoretically be desired, it's usually just a mishap.
It is unlikely that legitimate cases will be needed in the build system;
if so, they can exclude themselves.
See-Also: https://github.com/RIOT-OS/RIOT/pull/16775
Use regular expressions instead of matching literal strings for all
attributes instead of the serial number to be more flexible.
The idea is to aid users when multiple boards are connected to a machine
but each of a different type. If a board would define filter arguments
for dist/tools/usb-serial/ttys.py it could be possible to detect the
right TTY automatically, without user-side modifications. However,
some boards present different model names depending on the firmware
version of the programmer. Support for regular expressions can provide
the flexibility needed to just match all revisions and variants of a
board.
- Provide a new tool to list and filter TTYs
- Change `Makefile.include` to use `$(RIOTTOOLS)/usb-serial/ttys.py`
instead of `$(Q)$(RIOTTOOLS)/usb-serial/list-ttys.sh` to implement
`make list-ttys`
- Extend `makefiles/tools/serial.inc.mk` to allow using the most recent
port by passing `MOST_RECENT_PORT=1` as environment variable or
parameter to make
Co-authored-by: chrysn <chrysn@fsfe.org>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
The directory `dist/tools/esptool` already contains a couple of ESP tools and not only esptool.py. As the location for a couple of ESP related tools, it is more clear to call it `esptools` instead of `esptool`.
Positions in the topology are handed out first come first serve.
This makes it hard to have a reproducable setup if the ZEP dispatcher is
restarted (e.g. to modify the topology).
Fix this by allowing to specify a MAC address for each node.
If a node with a pinned MAC address connects, it will always be assigned to
the same topology node.
On Ubuntu KEA expects this directory to be present, but it is not
created automatically.
/run is also a tmpfs, so we have to create the directory after each
reboot.
Add a basic SenML module and submodules with support for:
- Encoding SenML values as CBOR using NanoCBOR.
- Converting from Phydat to SenML.
- Reading and encoding SAUL sensors.
This adds a list of variables that should always be passed to docker
since they are commonly set in Makefile/Makefile.include and therefore
can not be checked for their origin.
The device ID returned on WLR089 is 0x13 instead of 0x12, but it appears to
work just like sx1276.
Also check for the other device ID to make the driver work on this module.
... instead of manual filtering
Some -Wwarning-type flags were removed because in combination with
-Werror they caused clang to fail when the warning type was unknown.
Rather than enumerating them (a manual process with the extra risk of
leaving warnings disabled longer than necessary), this adds
`-Wno-unknown-arning-option` which disables the warnings (that are
becoming erors through -Werror) raised when a warning's name is unknown.
The module previously called net_ieee802154 is renamed to capture that
it is about interacting the frames and headers, and moved "into" the new
topic in the documentation tree.
Exceptions for undocumented headers are updated.
Murdock does not support IPv6 on link-local interfaces.
Therefore in order to being able to use ZEP dispatcher in automated tests
on CI, we have to add dual-stack support.
There can only be a single sniffer, but instead of ignoring any subsequent
sniffers, replace the existing one.
This avoids the silly behaviour that you can't attach the sniffer anymore
should you ever quit it.
cppcheck produces too many false positives to be useful.
This is likely due to a configuration error (not all header files are included?)
but until this is sorted out, disable the tool as it currently does more harm
than good.