1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

31385 Commits

Author SHA1 Message Date
Benjamin Valentin
178167621b cpu/lpc2387: timer: use bitarithm_test_and_clear() 2020-08-25 09:19:27 +02:00
Benjamin Valentin
8126651009 cpu/lpc2387: timer: implement timer_set()
We can achieve greater accuracy for the relative timer_set()
if we don't use the generic implementation.

Use the same approach as used by atmega_common to trigger interrupts
for too small offsets.

tests/periph_timer_short_relative_set should now succeed for all intervals.
2020-08-25 09:19:27 +02:00
benpicco
4d164ee299
Merge pull request #14839 from MrKevinWeiss/pr/revert/cc2538/renode
board/cc2538dk: Restore renode config
2020-08-25 07:30:22 +02:00
Benjamin Valentin
28d40eae6f picolibc: enable multiple heaps
We can simply re-use the same code from newlib.
2020-08-24 20:45:05 +02:00
Marian Buschsieweke
3b6fa61829
sys: Cleanup access to internal variables
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
2020-08-24 20:28:11 +02:00
Martine Lenders
e84eda5796
Merge pull request #14833 from maribu/tests-cleanup
tests: Cleanup access to internal variables
2020-08-24 19:33:40 +02:00
Martine Lenders
b9bce7030b
Merge pull request #14838 from haukepetersen/fix_rpl_dfltroutelifetime
net/gnrc/rpl: fix default route lifetime
2020-08-24 19:16:23 +02:00
Benjamin Valentin
ea27064d21 picolibc: make stdout buffering optional 2020-08-24 18:49:36 +02:00
Leandro Lanzieri
53187c5ef7
Merge pull request #14782 from benpicco/cpu/sam0_common-full
cpu/sam0_common: add all parts to Kconfig
2020-08-24 18:38:11 +02:00
benpicco
f3e1032f6e
Merge pull request #14827 from keith-packard/pr/libc/picolibc
Pr/libc/picolibc
2020-08-24 18:06:56 +02:00
Hauke Petersen
d8aa76501a net/gnrc/rpl: fix default route lifetime
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.
2020-08-24 17:53:00 +02:00
MrKevinWeiss
50874c53fb board/cc2538dk: Restore renode config 2020-08-24 17:48:29 +02:00
Keith Packard
fda68c4149 picolibc: Add stdout buffering [v2]
Add buffering so that USB back-ends get some batching for stdout

Signed-off-by: Keith Packard <keithp@keithp.com>

----

v2:
	Replace tabs with spaces.
2020-08-24 08:26:41 -07:00
Keith Packard
8c67544e7d picolibc: USE_MODULE += printf_float for float printf/scanf code [v2]
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
2020-08-24 08:26:16 -07:00
Keith Packard
e215261ced picolibc: Use most NEWLIB code with picolibc
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>
2020-08-24 08:26:16 -07:00
c5079270c9 docker: Add picolibc build flag 2020-08-24 08:26:16 -07:00
79d733a1af picolibc: glue sbrk to heap start/end [v2]
---
v2:
	Squash fixes in
2020-08-24 08:26:16 -07:00
26c1920cf1 posix/select: Add picolibc to cyclic dependency resolution 2020-08-24 08:26:16 -07:00
Keith Packard
531050ada2 picolibc: Enable TLS support [v4]
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
2020-08-24 08:26:16 -07:00
Keith Packard
a0d3436486 cpu/fe310: Add PICOLIBC support [v3]
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.
2020-08-24 08:24:54 -07:00
Benjamin Valentin
cd5a847684 cpu/sam0_common: define CPU_FAM based on CPU_MODEL 2020-08-24 16:13:18 +02:00
Benjamin Valentin
52a95642d5 sam0/adc: make driver MCU family agnostic
Replace checks for `CPU_SAMD21` with checks for actual defines.
2020-08-24 16:13:18 +02:00
Benjamin Valentin
7ed4979148 cpu/samd5x: define CPU_COMMON_SAMD5X symbol and use it 2020-08-24 16:13:18 +02:00
Benjamin Valentin
cc7f897cbc cpu/saml1x: define CPU_COMMON_SAML1X symbol and use it 2020-08-24 16:13:18 +02:00
Benjamin Valentin
5d96151775 cpu/saml21: define CPU_COMMON_SAML21 symbol and use it 2020-08-24 16:13:18 +02:00
Benjamin Valentin
e32b0783c4 cpu/samd21: define CPU_COMMON_SAMD21 symbol and use it 2020-08-24 16:13:18 +02:00
Benjamin Valentin
582da9b233 cpu/sam0_common: add script to generate Kconfig files for all parts
e.g. Usage:

	./sam0_common/dist/kconfig_gen.sh samd51
2020-08-24 16:13:18 +02:00
Benjamin Valentin
bc904cb396 cpu/saml21: add all parts to Kconfig 2020-08-24 16:13:18 +02:00
Benjamin Valentin
2cd0236a8c cpu/samd5x: add all parts to Kconfig 2020-08-24 16:11:48 +02:00
Benjamin Valentin
6a490af52b cpu/saml1x: add all parts to Kconfig 2020-08-24 16:11:48 +02:00
Benjamin Valentin
6b7cce02ec cpu/samd21: add all parts to Kconfig 2020-08-24 16:11:48 +02:00
benpicco
4b91866392
Merge pull request #14781 from ant9000/yarm
boards/yarm: Support for YARM board
2020-08-24 16:11:17 +02:00
benpicco
4f00aa16db
Merge pull request #14819 from aabadie/pr/boards/nucleo-l452re-clock
boards/nucleo-l452re: use common L4 clock configuration
2020-08-24 15:54:16 +02:00
d15d123eef
boards/stm32g4: enable max 170MHz clock by default 2020-08-24 15:42:14 +02:00
84bbee784d
cpu/stm32: add transition phase when raising +80MHz clock 2020-08-24 15:42:13 +02:00
benpicco
500bb83d16
Merge pull request #14760 from janosbrodbeck/adc/same54
cpu/sam0_common: ADC: add support for samd5x/same5x
2020-08-24 13:49:21 +02:00
benpicco
6298ba282d
Merge pull request #12600 from maribu/at86rf2xx-fix
drivers/at86rf2xx: Fix L2 addr genration/handling
2020-08-24 11:18:05 +02:00
benpicco
64fb92e65d
Merge pull request #14574 from maribu/fix-indent-switch
uncrustify-riot.cfg: Don't indent switch cases
2020-08-24 11:15:40 +02:00
Marian Buschsieweke
eb1279005c
tests: Cleanup access to internal variables
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
2020-08-24 09:08:01 +02:00
Keith Packard
76f6362292 cpu/fe310: Don't register __libc_fini_array with atexit
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>
2020-08-23 13:13:28 -07:00
ff3bee24b9 picolibc: Provide integration into the build system [v3]
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
2020-08-23 13:12:57 -07:00
b64f8a22a3 picolibc: Add default syscall implementations [v2]
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
2020-08-23 12:43:51 -07:00
Marian Buschsieweke
8745d820ba
core/thread_flags: Fix code indention
Apply coding convention on the indent in the single switch statement within
core.
2020-08-23 21:18:10 +02:00
Marian Buschsieweke
bb064e0580
uncrustify-riot.cfg: Don't indent switch cases
`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.
2020-08-23 21:17:20 +02:00
Marian Buschsieweke
7b743cda13
drivers/at86rf2xx: Fix address generation
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.
2020-08-23 21:09:21 +02:00
659c351c02
Merge pull request #14821 from bergzand/pr/cortexm_common/enable_mpu_after_config
cortexm_common: Enable MPU after configuring regions
2020-08-23 18:02:40 +02:00
79737fb44f
Merge pull request #14831 from benpicco/drivers/at86rf2xx-fix_assert
drivers/at86rf2xx: fix assert
2020-08-23 14:48:27 +02:00
Benjamin Valentin
0f4c5f5b10 drivers/at86rf2xx: fix assert
The assert is reversed. It must check if the config value does not
exceed the maximum address length, not the other way round.

previously this would lead to a crash when setting a short address:

2020-08-23 13:59:56,080 #  ifconfig 7 set addr_short 2
2020-08-23 13:59:56,081 # 0xdcad
2020-08-23 13:59:56,083 # *** RIOT kernel panic:
2020-08-23 13:59:56,085 # FAILED ASSERTION.

With this it works as expected

2020-08-23 14:05:07,988 #  ifconfig 7 set addr_short 2
2020-08-23 14:05:07,992 # success: set (short) address on interface 7 to 2
2020-08-23 14:05:52 +02:00
Antonio Galea
1031da354f boards/yarm: delay terminal connection after flashing 2020-08-23 02:35:15 +02:00
Antonio Galea
21c69d6899 boards/yarm: adapt memory requirements for test 2020-08-22 16:37:17 +02:00