Fix compilation error on native platform where bool type is used but
stdbool.h is not explicitly included.
On many platforms, stdbool.h is indirectly included via CPU headers,
but on native this is not the case.
Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
This disable policy enforcement of newer cmake 4.1.2 on older cmake
projects. The flags can be removed once the upstream projects are
compatible with newer versions of cmake.
Co-authored-by: crasbe <crasbe@gmail.com>
Fix compilation error on native platform where bool type is used but
stdbool.h is not explicitly included.
On many platforms (ARM, AVR, etc.), stdbool.h is indirectly included
via CPU headers, but on native this is not the case.
Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
We really don't want a `make BOARD=some-board -C some/app` to ask for
a password to unlock a GPG key. That is more than confusing on a
desktop machine and a real pain on a headless device.
As agreed upon in the weekly coordination meeting we want to set up
a channel / tool / process to aid contributors to solve conflicts.
This is especially aimed to empower contributors to solve conflicts
with maintainers, as we were unsure that the existing code of conduct
violation mechanism is sufficient to address conflicts that do not
involve a CoC violation.
Co-authored-by: mguetschow <mikolai.guetschow@tu-dresden.de>
bytes_tx should not be set to 0 at this point. It should be set to the
length of the package, if there is an error after transmission it will
be set to an error value in submac_tx_done. The value will be evaluated
after a TX_DONE Event, so the pending state 0 that is returned from the
_send function while async sending, is not relevant for bytes_tx.
Security warnings (telnet, stdio_udp, psa_crypto) were displayed even
for info-* targets, polluting the output and breaking tools that parse
make output (e.g., compile_and_test_for_board.py).
These warnings are only relevant when actually building/running code,
not when querying build system information.
Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
Fix compilation errors on native boards caused by missing ARRAY_SIZE
macro definition. The macro is defined in container.h which is included
by kernel_defines.h.
On ARM/Cortex-M platforms, kernel_defines.h is indirectly included via
cpu/cortexm_common/include/irq_arch.h, making ARRAY_SIZE available.
On native platform, no CPU header includes kernel_defines.h, requiring
explicit inclusion.
Error: "implicit declaration of function 'ARRAY_SIZE'"
Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
Fix compilation errors on native boards caused by missing modules.h
include in driver headers that use IS_USED() in preprocessor directives.
The IS_USED macro is defined in modules.h and must be included in any
header file that uses it in #if directives.
Error: "missing binary operator before token '('"
Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
Native boards fail to link due to an upstream bug in cryptoauthlib's
test infrastructure. The file build/pkg/cryptoauthlib/test/cmd-processor.c
has incorrect conditional compilation logic:
#if defined(_WIN32) || defined(__linux__) || defined(__APPLE__)
int main(int argc, char* argv[]) { ... }
#elif defined(RIOT_APPLICATION)
int atca_run_cmd(char *command, size_t len) { ... }
#endif
On native boards, __linux__ is defined, so the code compiles a main()
function instead of atca_run_cmd(). This conflicts with RIOT's main()
and causes linker errors:
- multiple definition of 'main'
- undefined reference to 'atca_run_cmd'
On ARM boards, none of these platform macros are defined, so the code
correctly falls through to the RIOT_APPLICATION branch and compiles
atca_run_cmd() instead.
The fix would require patching cryptoauthlib to check RIOT_APPLICATION
before checking platform macros, or reporting this upstream to Microchip.
Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
- Add missing modules.h include for IS_USED macro in atca.h
- Fix printf format specifiers in psa_atca_se_driver.c: use %zu for size_t
parameters instead of %d to prevent warnings on native platform
Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
This allows I2C emulation on native architecture in the same way than
periph_gpio_mock.
All I2C functions from this driver are set as weak to be easily
overridden in each application.
Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
Fix duplicate GPIO mode values on native platform when using Linux
kernel 5.5 or later. The kernel renamed GPIOHANDLE_REQUEST_PULL_* flags
to GPIOHANDLE_REQUEST_BIAS_PULL_* in version 5.5.
Without this fix, both GPIO_IN_PU and GPIO_OD_PU would have the same
fallback value (0xFF), causing compilation errors in switch statements.
Error: "duplicate case value"
Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>