On receiving a DIO message, RPL sets the lifetime for the default
route and the parent timeout event to the value. This leads to short
amounts of time whem the node looses its default route, while it
handles the parent timeout event to probe its parent.
This commit fixes this by adding time the node needs for probing
to the default route lifetime.
This makes RIOT use the integer-only printf/scanf code by default and
includes a new make parameter to select the full floating point
version. This saves about 6kB of text space when building hello-world
for the microbit board.
Signed-off-by: Keith Packard <keithp@keithp.com>
----
v2:
Use USEMODULE=printf_float instead of separate parameter
In most places, picolibc and newlib are the same, so use
the existing newlib code when compiling with picolibc.
Signed-off-by: Keith Packard <keithp@keithp.com>
Allocate and initialize a thread-local block for each thread at the
top of the stack.
Set the tls base when switching to a new thread.
Add tdata/tbss linker instructions to cortex_m and risc-v scripts.
Signed-off-by: Keith Packard <keithp@keithp.com>
---
v2:
Squash fixes
v3:
Replace tabs with spaces
v4:
Add tbss to fe310 linker script
Disable the newlib-nano stubs code when picolibc is in use
Signed-off-by: Keith Packard <keithp@keithp.com>
---
v2:
Squash fixes in
v3:
call stdio_init in _PICOLIBC_ mode to initialize uart
v3:
Remove call to stdio_init from nanostubs_init, always
call from cpu_init.
Replace direct accesses to sched_active_thread and sched_active_pid with
the helper functions thread_getpid() and thread_get_active(). This serves
two purposes:
1. It makes accidental writes to those variable from outside core less likely.
2. Casting off the volatile qualifier is now well contained to those two
functions
Picolibc makes atexit state per-thread instead of global, so we can't
register destructors with atexit in a non-thread context as we won't
have any TLS space initialized.
Signed-off-by: Keith Packard <keithp@keithp.com>
Support for picolibc as alternative libc implementation is added with
this commit. For now only cortex-m CPU's are supported.
Enable via PICOLIBC=1
---
v2:
squash fixes in
v3:
Remove picolibc integer printf/scanf stuff from sys/Makefile.include,
it gets set in makefiles/libc/picolibc.mk
fixup for dependency
picolibc: Use thread_getpid for getpid() in picolibc_syscalls_default
Instead of directly accessing the sched_active_pid variable (which
isn't defined in this context), use the existing wrapper function
to get that value.
Signed-off-by: Keith Packard <keithp@keithp.com>
---
v2:
Squash a couple of fixes in
* fixup! picolibc: Use thread_getpid for getpid() in
picolibc_syscalls_default
* squashme: Add `times` to picolibc syscalls
* Add __noreturn__ attribute to _exit
* Add VFS syscall wrappers. This provides the POSIX api used
by picolibc stdio
`uncrustify` currently enforces that cases in a switch statement are indented,
but the should be on the same level as the switch statement according to the
coding convention. This commit fixes this.
Do not generate address during reset, but during setup. Otherwise the device
will get a new address after every reset. Also: Use common IEEE 802.15.4
setup function for this.