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

150 Commits

Author SHA1 Message Date
bors[bot]
bff745236c
Merge #19817 #19826 #19841 #19842
19817: compile_and_test_for_boards: Add no-compile flag r=benpicco a=MrKevinWeiss


### Contribution description

Since we have a no-test flag that prevents executing tests, I think a no-compile flag is a nice compliment. Why? Well if I want to use this script for running multiple boards at the same time, RIOT is not so great handling parallel compile steps with conflicts on lockfiles happening, mostly due to packages. With this I can compile a list of boards sequentially, then flash and run tests in parallel, skipping the compile step.


### Testing procedure

Run the following once to compile and clean:
```
./dist/tools/compile_and_test_for_board/compile_and_test_for_board.py . native --applications tests/sys/shell --clean-after
```

Then try to run without the compile step and it should fail due to lack of the binary
```
./dist/tools/compile_and_test_for_board/compile_and_test_for_board.py . native --applications tests/sys/shell --no-compile
```

### Issues/PRs references


19826: ztimer/periodic: reinit remove from right clock and handle aquired ztimer r=benpicco a=kfessel

### Contribution description

#19806 added some retinit handling for ztimer periodic removing the timer from the new clock 

This tries to detect if this is a reinit and remove the timer from the old clock
this also removes the ztimer_acquire/_release handling by removing now calls in favour of set return value and now values  that are allready in ztimer,
that also has the potential to reduce the jitter of the periodic calls and bus-usage (for cpus that take their time to get "now") 

### Testing procedure

read

run tests/sys/ztimer_periodic

### Issues/PRs references

Fixes #19806 

19841: boards/adafruit-itsybitsy-nrf52: Add configuration for DotStar LED r=benpicco a=jimporter



19842: cpu/stm32: fix ld script for SRAM4 r=benpicco a=gschorcht

### Contribution description

This PR fixes the LD script for STM32.

Since the CCM and SRAM4 length are defined as symbols with perifx `_`, the LD script didn't use them correctly. Instead of using `ccmram_length` and `sram4_length`, `_ccmram_length` and `_sram4_length` have to be used. Furthermore, the location counter for the SRAM has to be set to the beginning of SRAM4 to work.

BTW, I don't understand why the `ccmram` region is defined. There is no section definition that would use it to place code or data with attribute `.ccmram.*` there.

Without the fix in this PR, defined symbols in `tests/sys/malloc` for the `b-u585i-iot02a` board were:
```python
00000000 T _sheap2     <== wrong start position because of wrong location counter
28000000 T _eheap2     <== wrong end position because of `sram4_length` is 0.
```
Although the `tests/sys/malloc` crashes for `b-u585i-iot02a` at the end of the heap (known problem, see [here](https://github.com/RIOT-OS/RIOT/pull/17410#issuecomment-996556823)), it uses only the backup RAM before it crashes:
```
Allocated 512 Bytes at 0x200bf600, total 756072
Allocated 512 Bytes at 0x200bf818, total 756592
Allocated 512 Bytes at 0x200bfa30, total 757112
Allocated 512 Bytes at 0x200bfc48, total 757632
Allocated 512 Bytes at 0x40036408, total 758152
Allocated 512 Bytes at 0x40036610, total 758672
Allocated 512 Bytes at 0x40036818, total 759192
```

With the fix in this PR, defined symbols in `tests/sys/malloc` for the `b-u585i-iot02a` board are:
```python
28000000 T _sheap2     <== correct start position
28004000 T _eheap2     <== correct end position
```
`tests/sys/malloc` also crashes for the `b-u585i-iot02a` at the end of the heap, but it uses also the SRAM4 before it crashes.
```
Allocated 512 Bytes at 0x200bf600, total 756072
Allocated 512 Bytes at 0x200bf818, total 756592
Allocated 512 Bytes at 0x200bfa30, total 757112
Allocated 512 Bytes at 0x200bfc48, total 757632
Allocated 512 Bytes at 0x40036408, total 758152
Allocated 512 Bytes at 0x40036610, total 758672
Allocated 512 Bytes at 0x40036818, total 759192
Allocated 512 Bytes at 0x28000008, total 759712
Allocated 512 Bytes at 0x28000210, total 760232
Allocated 512 Bytes at 0x28000418, total 760752
...
Allocated 512 Bytes at 0x280038e8, total 774272
Allocated 512 Bytes at 0x28003af0, total 774792
Allocated 512 Bytes at 0x28003cf8, total 775312
```

### Testing procedure

1. Flash `tests/sys/malloc` and use `MAX_MEM` limit to stop `malloc` before the crash:
   ```
   CFLAGS='-DMAX_MEM=774800 -DCHUNK_SIZE=512 -DDEBUG_ASSERT_VERBOSE' \
   BOARD=b-u585i-iot02a make -j8 -C tests/sys/malloc flash
   ```
   Without the PR it crashes at the end of the backup RAM. With the PR it works.

2. Check `_sheap2` and `_eheap2` with
   ```
   nm -s tests/sys/malloc/bin/b-u585i-iot02a/tests_malloc.elf | grep heap2 | sort
   ```
   Without the PR it will be:
   ```
   00000000 T _sheap2
   28000000 T _eheap2
   ```
   With the PR it should be:
   ```
   28000000 T _sheap2
   28004000 T _eheap2
   ```

### Issues/PRs references


Co-authored-by: MrKevinWeiss <weiss.kevin604@gmail.com>
Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
Co-authored-by: Jim Porter <jporterbugs@gmail.com>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-07-24 10:50:36 +00:00
Marian Buschsieweke
fd3ae2993f
sys/ztimer: work around bug in old LLVM
The sum of an `uint16_t` variable and a literal `1` should still be of
type `uin16_t`. And at least with LLVM 16 this seems to be the case,
but not with the LLVM version in our build container :/

So cast what should have been `uint16_t` anyway explicitly to `uint16_t`
to make that buggy version of LLVM happy.
2023-07-18 12:24:08 +02:00
Karl Fessel
4f2237dd0b ztimer/periodic: stop timer before reinit, remove aquire/release
- not ztimer_now calls outsid irq -> remove aquire
2023-07-14 18:27:06 +02:00
Benjamin Valentin
eadb3741e3 ztimer/periodic: remove timer on init if already running 2023-07-12 15:03:48 +02:00
08fdb23185
sys/evtimer: remove support for xtimer backend 2023-05-24 09:53:33 +02:00
Marian Buschsieweke
8fbbc40b3e
sys/ztimer: fix typo in debug output 2023-05-02 09:53:16 +02:00
Martine Lenders
dd969745ab
ztimer/ztimer64: uncrustify code 2023-03-15 15:13:48 +01:00
Benjamin Valentin
94f9f11596 ztimer: introduce ztimer_mutex_unlock_after() 2023-01-13 00:08:55 +01:00
ccc3c936c4 sys/ztimer: ztimer_mock: guard ztimer_ondemand static functions 2023-01-10 09:11:17 +01:00
Jue
2b53f35a28 ztimer: warn users when calling ztimer_now() on inactive clocks 2022-11-22 00:25:34 +01:00
Jue
96b7988511 ztimer/periodic: acquire resp. release used ztimer clock 2022-11-22 00:25:34 +01:00
Jue
bf5dd34deb ztimer/overhead: acquire and release clocks
The start/stop overhead that might by introduced by ztimer_acquire() and ztimer_release() called during ztimer_set() resp. ztimer_handler() should not be mesured here. It has its own adjustment field.

Furthermore, the overhead mesaurement uses ztimer_now(). It is allowed to called it only after the clock has been acquired.
2022-11-22 00:25:34 +01:00
Juergen Fitschen
88a9f4b8f9 ztimer: add on_demand_strict
Enforce ztimer_clock_t to be active (i.e. clock->users > 0) before ztimer_now() can be called.
2022-11-22 00:25:34 +01:00
Juergen Fitschen
a1ee7a5e05 ztimer/periph_rtt: add start() and stop() ops 2022-11-22 00:25:34 +01:00
Juergen Fitschen
d22e078118 ztimer/periph_rtc: add start() and stop() ops 2022-11-22 00:25:34 +01:00
Jue
5818e5e452 ztimer/periph_timer: add start() and stop() ops 2022-11-22 00:25:34 +01:00
Juergen Fitschen
90b2f3158c ztimer/convert: pass-thru start/stop ops to lower timer 2022-11-22 00:25:34 +01:00
Jue
9fbb4d3391 ztimer/convert: only extend the clocks if ztimer_ondemand isn't used 2022-11-22 00:25:34 +01:00
Jue
4013dff1fd ztimer: acquire and release clock for running timers 2022-11-22 00:25:34 +01:00
Jue
a228ca7548 ztimer: introduce ztimer_acquire() and ztimer_release() 2022-11-22 00:25:34 +01:00
Jue
904dc0131f ztimer: don't interact with pm_layered if ztimer_ondemand is used 2022-11-02 22:36:54 +01:00
Juergen Fitschen
84c89f9dd7
Merge pull request #18783 from jue89/fix/ztimer_lptimer_kconfig
sys/ztimer: model ztimer_periph_lptimer for Kconfig
2022-11-02 13:56:05 +01:00
benpicco
ed1d8e0a3d
Merge pull request #18785 from maribu/boards/blxxxpill/periph_conf
boards/common/blxxxpill: Fix pin conflicts in periph_conf
2022-10-27 21:22:10 +02:00
Jue
bd603249a5 sys/ztimer: build ztimer_periph_timer if ztimer_periph_lptimer is used
ztimer_periph_lptimer is uses the implementation of ztimer_periph_timer
2022-10-27 19:44:57 +02:00
Marian Buschsieweke
16df27c51d
makefiles/cflags.inc.mk: Add -Wno-missing-field-initializers to CXXFLAGS
This allows including C headers from C++. It sadly reduced the
diagnostics on C++ code as well, were there warning may make sense as
unintended side effect. We may be able to drop that later on, when more
C APIs are properly wrapped in native C++ APIs, so that C headers do no
longer need to be compatible with C++ compilers.
2022-10-27 14:28:06 +02:00
MrKevinWeiss
6b5c75cad4
boards/blxxpill-128kib: Fix kconfig mismatch
Nightlies are failing due to kconfig mismatch.
It would seem this is a result of bringing in the USB stuff.
I assume that this uses ztimer periph_timer as a backend as periph_timer is already selected.
However, kconfig only resolves one and not recursively making it hard to match.
For not a hack is added to override for these boards.
2022-10-27 14:07:32 +02:00
Juergen Fitschen
b8a4aa9ce1 sys/ztimer: model ztimer_periph_lptimer 2022-10-26 20:53:48 +02:00
Karl Fessel
81d06c819c sys/ztimer: add LPTIMER auto init 2022-09-15 11:26:22 +02:00
Karl Fessel
594fe83843 sys/ztimer: auto_init react to possibly missing ztimer_periph_timer 2022-09-15 11:26:22 +02:00
Francisco Molina
c9fc236576 sys/ztimer: no log for stdio_rtt/semihosting
Both modules use ztimer for stdio, so can't call stdio based functions
before the module is initialized
2022-06-07 08:51:10 +02:00
Martine Lenders
a81c5a527e
ztimer: initialized un-initialized timer objects 2022-03-28 16:57:20 +02:00
Leandro Lanzieri
202fb261fe
Merge pull request #17811 from fjmolinas/pr_xtimer_dep_rework_simple
sys/*timer: rework dependecies to ease backend switch, prefer ztimer_xtimer_compat over xtimer_on_ztimer
2022-03-18 08:17:24 +01:00
Francisco Molina
9260cfb4f0 sys/xtimer: prefer ztimer_xtimer_compat 2022-03-17 14:37:40 +01:00
Francisco Molina
0b1453667e sys/xtimer-ztimer: rework dependecies to ease backend switch
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.
2022-03-17 14:37:40 +01:00
Francisco Molina
53c3e38cb9 sys/ztimer: select ztimer_periph_no_rtt only for samd21 2022-03-15 08:15:22 +01:00
Francisco
0c166b1e2a
Merge pull request #17732 from fjmolinas/pr_xtimer_compat_deps
sys: sort out ztimer_xtimer_compat and ztimer64_xtimer_compat depes
2022-03-04 08:08:41 +01:00
benpicco
21205bd6ce
Merge pull request #17351 from benpicco/ztimer_periodic-return
ztimer_periodic: make callback function return bool
2022-03-03 14:42:33 +01:00
Francisco Molina
f1d4cc0924 sys/ztimer/Kconfig: remv dep between ztimer64_compat and ztimer_compat
This is done to avoid circular dependency, it will currently allow for
ztimer64_xtimer_compat beeing selected as well as xtimer_on_ztimer.
This altough incorrect mimics make, and will be fixed when making
ztimer_xtimer_compat the default xtimer backend
2022-03-02 14:28:55 +01:00
df8086091f sys/ztimer: add ztimer64_xtimer_compat
The ztimer64_xtimer_compat modules implements the whole xtimer api
on top of ztimer64_usec
2022-02-24 09:10:58 +01:00
d758cb93ef sys/ztimer: add auto_adjust module 2022-02-18 13:07:49 +01:00
Francisco Molina
3de5549899 makefile: move DEFAULT_MODULEs with deps to default_modules.deps.mk 2022-02-14 13:03:32 +01:00
Marian Buschsieweke
b6b7065ddc
core/rmutex: use atomic utils
Replace use of C11 atomics with atomic utils. This fixes

> error: address argument to atomic operation must be a pointer to a
>        trivially-copyable type ('_Atomic(int) *' invalid)

error when compiling on AVR with LLVM.
2022-01-14 09:52:17 +01:00
43988120f9
Merge pull request #17409 from kaspar030/ztimer_no_timer_fix
sys/ztimer: don't access non-existant timer
2021-12-17 23:27:04 +01:00
chrysn
9e35b75ff4
Merge pull request #17408 from chrysn-pull-requests/ztimer-report-removal
sys/ztimer: ztimer_remove report success
2021-12-17 08:57:14 +01:00
chrysn
991f74a62a sys/ztimer: ztimer_remove return its success
Co-authored-by: Marian Buschsieweke <maribu@users.noreply.github.com>
2021-12-16 15:35:17 +01:00
b551bbf747 sys/ztimer: don't access non-existant timer 2021-12-15 15:51:59 +01:00
Francisco
03a004e3c9
Merge pull request #17395 from fjmolinas/pr_cpu_no_rtt
cpu: do not auto-select ztimer_periph_rtt for sam0, fe310
2021-12-15 14:04:57 +01:00
Francisco Molina
c21c01b5b9 sys/ztimer: fix kconfig ZTIMER_SEC default 2021-12-14 18:44:48 +01:00
Francisco Molina
5e47fc7e22 cpu: do not auto-select ztimer_periph_rtt for sam0, fe310
The sam0 rtt busy loops for 180us every time an alarm is set or
the counter is read, this propagates and leads to timing errors
on ztimer_msec that are higher than > +-1msec.

The same goes for fe310.
2021-12-14 18:43:53 +01:00
Karl Fessel
4d70d939ca sys/evtimer,ztimer: do not depend on ztimer_now64 2021-12-14 14:41:06 +01:00