Some calls to `coap_build_hdr()` were done with the target buffer for
the header and the source buffer for the token overlapping:
They reuse the buffer that held the request to assemble the response in.
We cannot use `memcpy()` in this case to copy the token into the target
buffer, as source and destination would (fully) overlap.
This commit makes reusing the request buffer for the response a special
case: `memcpy()` is only used to copy the token if source and
destination address of the token differ.
An alternative fix would have been to use `memmove()` unconditionally.
But `memmove()` does not make any assumption about the layout of target
and source buffer, while we know that the token either will already be
at the right position (when reusing the request buffer for the response)
or be in a non-overlapping buffer (when generating a fresh token). This
approach is more efficient than `memmove()`.
This adds a clang-format configuration based on the Linux Kernel
configuration and modified to better match RIOT's coding convention.
Co-authored-by: mguetschow <mikolai.guetschow@tu-dresden.de>
This patch replaces the package supplied logging macros with RIOT's. It
also removes the requirement that DEVELHELP be defined to enable
logging. Instead, logging can be enabled/dissabled via the log level.
This patch replaces the package supplied logging macros with RIOT's. It
also removes the requirement that DEVELHELP be defined to enable
logging. Instead, logging can be enabled/dissabled via the log level.
The patch also replaceses the package's trace macro with RIOT's DEBUG
macro.
This adds enough to do compile testing for gcoap_forward_proxy.
A proper test would still be needed, though.
This still already exposed compilation issues.
Now that model.h is in the repo, it no longer is a build dependency.
This allows compilation of the test without having emlearn installed,
which is useful e.g. for build testing.
The board is compatible with Arduino UNO and Arduino MEGA shields and
has an ISP connector, so this adds the corresponding features.
This adds the Arduino I/O-mapping for the ISP SPI and provides the
corresponding feature.
It appears that the SPI on D11/D12/D13 cannot be provided by a SERCOM,
this is under clarification at [1]. For now, no I/O mapping for that
SPI bus is provided.
[1]: https://forums.adafruit.com/viewtopic.php?t=214093
newlib (nano) does not support 64 bit types (neither in stdio nor with
corresponding `PRI*64` macros). With GCC 13.2.1 (as shipped in Ubuntu
24.04.1 LTS), this triggers the following compilation error (even with
`ENABLE_DEBUG == 0`):
sys/matstat/matstat.c:57:21: error: expected ')' before 'PRIu64'
57 | DEBUG("Var: (%" PRIu64 " / (%" PRId32 " - 1)) = %" PRIu64 "\n",
| ^~~~~~
This fixes the issue by falling back to printing 32 bit values when
the `PRIu64` macro is not defined. A `!trunc` is appended when the
64 bit exceeds the range of [0:UINT32_MAX].
It turns out that the ID mechanics of docker are even more crazy than
realized before: On Linux (x86_64) they use a different SHA256 when
referring to a locally installed image than when referring to the
same image at dockerhub. On Mac OS (Apple Silicon), the use the repo
SHA256 also when referring to the local image.
Instead of increasing the complexity of the current solution even more
by covering both cases, we now use
`docker.io/riot/riotbuild@sha256:<SHA256_OF_DOCKERHUB_IMAGE>` to refer
to a specific docker image, which hopefully works across systems.
Instead of pulling the image explicitly, we now can rely on docker
to do so automatically if the pinned image is not found locally. As
a result, the knob to disable automatic pulling has been dropped.
Fixes https://github.com/RIOT-OS/RIOT/issues/20853