This adds a xtimer_no_ztimer_default that is currently always
selected in Makefile, but that can be switched off in Kconfig.
Removing its inclusion will allow switching the default xtimer
backend to ztimer, while allowing for an easy way back.
This PR removes the old xtimer based implementation for sema. Since
this implementation used 64bit timeout, backweard compatibility is
kept by having `sema_wait_timed` be implemented by `ztimer64_usec`
which is enabled by selecting `sema_deprecated`
With this 64bit `sema` api is now deprecated.
- 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`.
Many simple kconfig configurations are added to boards and brought in with the board name.
This makes a common import of these configs so one only requires adding a BOARD.config without having to alter the makefile.
Some DEFAULT_MODULEs in tree have dependencies of their own. This is
usually done for aliases of init modules, and do not have dependencies
themselves.
This adds the final stage to dependency resolutions where DEFAULT_MODULEs
dependencies MAY be included. These included modules MUST NOT have
dependencies themselves.
This allows for modules to disable DEFAULT_MODULEs during dependencies
resolution independent of the inclusion order.
auto_init and periph_init modules are moved to this outer-loop, allowing
therefore for modules to disable them during the dependency resolution
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.
Using EXTERNAL_MODULE_PATHS works fine when only using Kconfig for
configuratio, but when using it for dependencies this value is not
set since it depends on Kconfig. Instead use EXTERNAL_MODULE_DIRS
and filter matching on Kconfig files.
Implement a new module stdio_nimble, which uses nimble
for stdio. The characteristic for stdin is writable and
the characteristic for stdout uses the indicate mechanism
to publish the system's output to a connected device.
Data will be sent out asynchronously via callout functions.
The module can be enabled with "USEMODULE += stdio_nimble"
Co-authored-by: Francisco Molina <femolina@uc.cl>
By default if IoT-LAB Cli Tools V3 is used then BINFILE is used to
flash on IoT-LAB. But BINFILE is not built by default when RIOT_CI_BUILD
is set as a ci optimization.
But since before IOTLAB_NODE was not passed to docker when building it
did not know that it should BUILD BINFILE as well, which led to failures
if doing:
$ IOTLAB_NODE=iotlab-m3.grenoble.iot-lab.info BOARD=iotlab-m3 \
RIOT_CI_BUILD=1 BUILD_IN_DOCKER=1 make -C examples/hello-world/ flash
But if IOTLAB_NODE is passed at is checks for IoT-LAB cli Tools also
happen in the docker container which leads to a make error since those
are not present in docker.
Therefore add BINFILE to BUILD_FILES if RIOT_CI_BUILD is set, but unset
IOTLAB_NODE once INSIDE_DOCKER.
The check for `newlib-nano` assumes that a toolchain which provides `newlib-nano` provides both the normal version and the nano version of the `newlib`.The nano version of `newlib.h` is therefore stored in its own include directory. This is the case for toolchains which allow to use both the normal and the nano version, e.g. for ARM and RISC-V.
However, if the toolchain provides `newlib_nano` but only allows the use of the nano version, it will only have the nano version of `newlib.h` and no separate directory for it, e.g. for ESP32.
To still be able to use such toolchains with `newlib_nano`, the check is changed so that the setting of the `-isystem` option depends on the existence of the separate directory.
Without passing this through, any crate downloads would go to the
container's image's scratch space, to be re-downloaded for each build,
and with new time stamps that cause compilation to start anew as well.
A couple of `stdio` backend implementations allow to check for the number of available bytes for reading before the blocking `stdio_read` is called. This helps to implement non-blocking functionalities while waiting for `stdin`.
For RISC-V and Cortex-M-not-3, triples are known and have worked in some
configuration, but do not work at the moment and stay disabled until the
reference platforms (native, M3) have been established well.
This introduces KCONFIG_BOARD_CONFIG and KCONFIG_CPU_CONFIG variable for
boards and CPUs (including common directories) to add default
configuration files to be merged. The current approach, as it uses
Makefile.features, would include boards first, not allowing them to
override CPU configurations.
The pseudomodules used by the PCF7857x driver are correctly defined by `Makfefile.include` of the driver. However, by mistake they were left in `makefiles/pseudomodules.mk` when the very old PR was rebased to the current master. That is, they were only leftovers that have been overseen after rebasing an squashing dozens of fixup commits.
As the packages need to be downloaded before they can be included in menuconfig it becomes a bit pointless.
This also messes around with make info-packages, adding unwanted output
This PR makes `event_timeout` and `event_timeout_ztimer` two distinct
pseudomodules, where the only api difference is in the init function.
If only `event_timeout_ztimer` is selected then no default ZTIMER
backend is selected and the old init function is not implemented.
If only `event_timeout` is selected then `xtimer` is used unless
`ztimer_usec` is included. In which case the `xtimer` wrapper on top
of `ztimer` is used and `xtimer` is not directly selected. This
allows for the legacy api to be supported with `ztimer_usec` as
a drop-in replacement.
If `event_timeout` and `event_timeut_ztimer` are selected then
`event_timeout` SRC file is excluded from compilation.
If we
-include Makefile.ci
and `Makefile.ci` does not exist, but we provide `make` with a way
on how to do so, it will try to create `Makefile.ci`.
This is not what we want, but I don't know how to disable this automagic.
So rename the target to `create-Makefile.ci` to avoid the conflict.
Checksumming flash is not supported on xtensa platform:
Warn : not implemented yet
make: *** [.../RIOT/examples/saul/../../Makefile.include:796: flash] Error 1
The xfa.ld script is incompatible with binutils > 2.35.2 and results
in firmwares that wont boot. Sadly, I couldn't figure out an elegant
way to fix the issue. Instead, I modified the linker script provided
by binutils to also include XFA.
This will allow the generation of the bin-checksummed file needed by dfu-util flashtool and thus allow to flash the all particle-based board with RUN_IN_DOCKER=1
A generic application might select netdev_default instead of
gnrc_netdev_default to pull in the default network interface.
So pull in gnrc_netif if netdev_default is selected with GNRC.
Redirecting `2>&1 >/dev/null` moves stderr to stdout first and then
stdout to /dev/null; when checking for command existence or otherwise
silencing output, this is usually not desired (but only starts producing
errors when the actual command fails, which is often not tested).
Introduce XMEGA EBI driver. This enable EBI for use with all memory
supported by the device and peripherals. It include support to SRAM,
SDRAM, LCDs or any other external bus access.
Note: This feature only works for A1/A1U series, which are, the series
with EBI hardware.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This is a regression which was introduced in #16114, without resetting
the color the red color will be used for all following text written to
the terminal and will also cause the shell prompt etc. pp. to be colored
in red which is undesirable. This commit fixes this regression by using
the ANSI escape sequences to reset the color after the error message has
been written.
Prefix delegation used to be the only supported feature of our DHCPv6
client, but by now it also supports MUD, DNS recursive name servers and
IA_NA is on the horizon. So it makes sense to make IA_PD an optional
module like all those other features are as well.
The `udp` command is a valuable debugging tool that is also useful
outside of the gnrc_networking example.
To enable easy sending of udp messages in other applications during
development, move the `udp` command to the shell module and introduce
the `gnrc_udp_cmd` pseudo-module to enable it.
There is no real reason for that pseudo-module to use the `gnrc_`
prefix. Neither does it need GNRC-components (except, but optionally, as
a network stack of course), nor is it implemented with in the GNRC
network stack.
A lot of things break if `GNRC_NETIF_FLAGS_HAS_L2ADDR` is not set.
In order to handle router advertisements and auto-configureation,
generate a faux l2 address based on the netdev ID.
Previously, external modules had to be individually added to both
EXTERNAL_MODULE_DIRS and USEMODULE. If those where not in sync, this
resulted in build errors.
With this commit, search folders for external modules are added to
EXTERNAL_MODULE_DIRS instead. So lets say the file system structure is
like this
```
└── /path/to/external/modules
├── mod_a
│ ├── Makefile
│ ├── Makefile.dep
│ ├── Makefile.include
│ ├── foo.c
│ └── include
│ └── external_module.h
└── mod_b
├── Makefile
└── bar.c
```
One now adds `/path/to/external/modules` to EXTERNAL_MODULES and only
with `USEMODULE += mod_a` the corresponding module, dependencies and
include settings are actually used. Hence, it is possible to configure
`EXTERNAL_MODULE_DIRS` from `~/.profile` or `~/.bashrc` once and never
needs to worry about them again.
c_xxxx functions can be used to wrap a piece of text in a
$(COLOR_X)...$(COLOR_RESET) block, thereby avoiding the easy mistake
of forgetting to place a COLOR_RESET.
The escape codes and special chars now live in their own module. The
color module is only concerned with detecting whether to use colors or
not.
Additional variables are defined with hard a coded ESC char, a tab and a
newline. This removes the need for echo or printf.
The color strings COLOR_* are redefined so that they don't have to be
processed by "echo -e". This is done by storing the already interpreted
ANSI sequence in a shell variable.
With this change, not only can color messages be printed using normal
`echo` with no switches: colors also work with the `info` and `warning`
builtins of make.
The COLOR_ECHO variable is kept because it is also being used (confusingly)
to intepret tabs an newlines. This will be fixed in another commit.
This change should change absolutely anything and colors should still work
as always.
The partition table of the device in the esp8266 and esp32 based boards
was set to a default table with one "factory" partition with exactly
the size of the compiled firmware. This is problematic if we want to
update the device on the field.
This patch allows to set the `PARTITION_TABLE_CSV` variable from the
Makefile to a .csv file with a custom partition table, for example this
could be set to a partition table with two ota entries, or with a single
factory entry but of a known fixed size.
While nice at first, this causes more issues than it's worth for
a slightly more pretty output.
Hiding information from developers is not a good idea, especially when
it comes to an often finicky programming step.
While in theory error output should be caught, there are enough
cases where the programmer will get stuck in a loop or require user
input that hiding programmer output by default is a bad idea.
The Silicon Labs Si705x sensors (Si7050/1/3/4/5) are very similar to the
Si7021 sensors featuring only a temperature sensor and no humidity
sensor. The only difference between the Si705x is the temperature
accuracy of the reading, ranging from +/- 0.1 C in the Si7051 to +/- 1 C
in the Si7050.
This patch adds support for this family of sensors extending the
functionality of the existing si70xx driver. Following the style of
other modules, this implements a pseudomodule per supported chip, adding
si7050, si7051, si7053, si7054 and si7055 pseudomodules.
As a minor change this patch also implements the missing
si70xx_get_serial, si70xx_get_id and si70xx_get_revision functions that
were declared in the si70xx.h header but implemented as private
functions. The si70xx_get_id() may be relevant for the application to
know at run time exactly which version of the hardware is installed.
The updated test running with a Si7051 shows the following output, which
seems consistent with the room temperature conditions during the test.
```
make SI70XX_VARIANT=si7051 -C tests/driver_si70xx/ all flash
```
```
SI70XX temperature and humidity sensor test application
Initializing sensor...
[OK]
Found SI7051 sensor, revision 32
temperature: 24.71 C
temperature: 24.69 C
```
When riotboot depends on a package for building that the main
application also depends on (e.g., gecko_sdk for efm32), previously,
that package would be checked out twice in parallel, which fails.
This commit adds pkg-prepare as dependency to the bootloader target,
ensuring any packages are already up-to-date before calling the
bootloader submake.
tests/driver_ds3231
drivers/ds3231: add alarm support with IRQ
drivers/ds3231: alarm support and documentation
drivers/ds3231: alarm interrupt with mutex
drivers/ds3231: alarm, _unlock function
fixup! drivers/ds3231: add alarm support
The current script don't allow change debug protocol and not allows
set proper part name for xmega. This make DEBUGPROTO optional with
JTAG as default protocol. It add a filter for atxmega to add proper
AVRDUDE_PROGRAMMER_FLAGS.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The current script doesn't allow change script path and name.
Add LDSCRIPT_COMPAT_PATH and LDSCRIPT_COMPAT_NAME default
values to allow a unique path inside atxmega folder.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Atmel AVR-8 CPU was reworked to accomodate variants like ATxmega.
This rename to atmega.inc.mk to avr8.inc.mk to be compliant with
new directory structure.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
When multiple debuggers are connected then pyocd shows an interactive
UI to select the user interface to flash, with python wrapper this
is lost.
Until a similar functionality is implemented with the wrapper disable
the programmer wrapper script when pyocd is used.
`cosy` is a graphical memory usage analyzer.
It is a great tool, but pretty hidden.
Add it as a build target so it can be easiely summoned for any application and board.
The standard is 9 years old now, it is well supported in all mayor compilers.
In fact, features of the 'new' standard are already used in RIOT (std_atomic).
Let's make it the default and adapt the Makefiles accordingly.
clang/LLVM is a bit more finicky with what target triples it accepts compared
to GCC. However, the GCC target triple is needed to properly locate the C
libraries. In case a locally installed GCC toolchain uses a technically not
fully correct target triple, it might be impossible to build with LLVM.
The solution here is to allow specifying a TARGET_ARCH_LLVM target triple
(which defaults to TARGET_ARCH), which is passed to clang. For locating the
C lib, still TARGET_ARCH is used.
FEATURES_CONFLICTING previously was declared prior to the function it is
calling, resulting in empty output during the first dependency resolution
iteration. This fixes the order so that the conflicting features are detected
right from the first recursion.
Previously, FEATURES_REQUIRED_ANY didn't honor the order of the alternatives
provided, if none of the features were already in used and multiple options
are provided. This fixes this.
RISC-V support semihosting in very similar way as the cortex-m
microcontrollers. The code calls a breakpoint instruction and the
attached debugger reads/writes registers and memory for stdio.
The RISC-V architecture doesn't support a call number with the EBREAK
instruction, to allow the debugger to detect a semihosting break point,
the EBREAK instruction is wrapped in a SLLI and SRAI instruction. These
use x0 as output register, making them NOP instructions.
One caveat when using this is that the RISC-V core traps the EBREAK
instruction with trap code 3 when no debugger is attached. Restarting
the application with the debugger attached avoids this.
These targets cannot be used in an automated testing workflow without
complex configuration or extend rights.
- Add new 'test-as-root' target for tests that require to be root or
start an external daemon as root
- Add new 'test-with-config' target for tests that require a specific
configuration to succeed (module configuration or hardware
configuration)
This commit makes overflow of signed integers to behave as expected by at 90%
of the C developers, even though overflow of signed integers are strictly
undefined behavior.
Note: Please do not add code relying on a specific behavior for the overflow of
signed integers, even though `-fwrpav` will make that code work. This is
intended to mitigate the risk of bugs in overflow checks being exploited,
not to encourage adding new bugs.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30475 for details and see
http://c-faq.com/misc/intovf.html on how to implement overflow checks properly.
The driver uses the netdev interface. Due to the limited
capabilities of the transceiver (32 byte FIFO and no source address in the layer2 frame),
it relies on 6LowPAN compression and adds the source address to the frame for that.