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

339 Commits

Author SHA1 Message Date
Marian Buschsieweke
faa3727b1f
cpu/cortexm_common: Make cpu.h IWYU clean
There is clearly no reason `cpu.h` should `#include <stdio.h>`.

Also add an export pragma to `cpu_conf.h`, as portable code is
expected to include `cpu.h` (which exists across MCU families in RIOT),
and not `cpu_conf.h` (which only exists for some MCU families).
2024-11-27 11:57:20 +01:00
AnnsAnn
db2a20c96c cpu/cortexm: fix spelling mistake 2024-10-16 16:04:10 +02:00
Benjamin Valentin
3237ed911e core/panic: don't use LOG_ functions in panic handler 2024-07-17 16:18:19 +02:00
Benjamin Valentin
00c1f4ea4d cpu/cortexm_common: print last active thread on stack corruption 2024-05-29 18:27:27 +02:00
Dylan Laduranty
683d4a249d cpu/cortexm: add stack limit support for CM33
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-05-06 17:14:49 +02:00
Dylan Laduranty
e784794b37 cpu/cortexm: uncrustify panic.c
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-04-24 13:20:59 +02:00
Dylan Laduranty
5d3324d3a9 cpu/cortexm: rework bkpt instruction call on panic
Only call this instruction if a debug session is active otherwise it will trigger a hardfault

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-04-24 13:19:45 +02:00
Ollrogge
6a8bbe0240 Revert "cpu/cortexm_common: extend flashpage API"
This reverts commit d38f6c68b5.
2024-04-04 17:57:40 +02:00
MrKevinWeiss
e0fdc3c16c
*Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
MrKevinWeiss
7a68fb0d5e
*Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
Benjamin Valentin
308374fc29 cpu/cortexm_common: allow to define AUX slot on flash 2024-02-28 11:49:05 +01:00
Benjamin Valentin
79b51efc15 cpu/cortexm_common: Cortex M0/M23 needs 4 cycles/busy loop 2024-01-09 19:03:15 +01:00
Marian Buschsieweke
1c281d2768
cpu/cortexm_common: work around bug on WFI for STM32
See [1] for details. (archive.org backup at [2]).

Fixes https://github.com/RIOT-OS/RIOT/issues/13918
Fixes https://github.com/RIOT-OS/RIOT/issues/14015

[1]: https://cliffle.com/blog/stm32-wfi-bug/
[2]: https://web.archive.org/web/20231205101603/https://cliffle.com/blog/stm32-wfi-bug/
2023-12-05 15:16:55 +01:00
Benjamin Valentin
7293e43167 cortexm_common: drop TODO about Cortex-M4F FPU
This should have been dropped in 06f0c14460
2023-10-30 13:08:12 +01:00
Marian Buschsieweke
aed175b14b
core/thread: drop unused thread_arch_t
No architecture makes use of thread_arch_t anymore, so let's drop it.
2023-05-21 22:17:52 +02:00
9b32854b13
cpu/cortexm_common: remove CMSIS vendor code 2023-05-14 21:08:28 +02:00
2e59f8e9b6
cpu/cortexm_common: use cmsis package instead of internal vendor headers 2023-05-14 21:08:27 +02:00
bors[bot]
718a4513b5
Merge #19368 #19529 #19531
19368: debug: add DEBUG_BREAKPOINT() macro, set breakpoint on failed assertion r=benpicco a=benpicco



19529: cpu/stm32/periph/dac: optimize setting DAC r=benpicco a=Enoch247

### Contribution description

The current implmentation right shifted the 16 bit value passed into `dac_set()` down to the 12 bits that the DAC is actually capable of. This patch drops the shift and instead writes the 16 bit value to the DAC's left aligned 12 bit wide data holding register.


### Testing procedure

do something like:
``` c
#include "perip/dac.h"

int main(void)
{
    dac_set(DAC_LINE(0), 0xffff/2);
    return 0;
}
```
- observe DAC's output is half of vref


### Issues/PRs references

- none known


19531: tests/unittests: allow passing `UNIT_TESTS` via env r=benpicco a=kaspar030



Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
Co-authored-by: Joshua DeWeese <jdeweese@primecontrols.com>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2023-05-02 18:08:42 +00:00
Benjamin Valentin
e850dcd921 cpu/cortexm_common: define ARCHITECTURE_BREAKPOINT() 2023-04-27 13:19:17 +02:00
Gunar Schorcht
06426c41b0 sys/riotboot: common default NUM_SLOT, SLOT_* config 2023-04-18 06:20:14 +02:00
Keith Packard
fb01e6a3fb cpu: Add TLS symbols for newer picolibc to linker scripts
Newer picolibc versions require some additional symbols defined in the
linker script to correctly manage alignment constraints on thread
local storage.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-03-02 22:55:22 -08:00
Gunar Schorcht
c46545d5a7 cpu/common_cortex: handling RIOTBOOT_LEN for tinyusb_dfu 2023-01-15 18:09:55 +01:00
Benjamin Valentin
59a3e613fe cpu/cortexm_common: measure time spent with IRQ disabled 2022-11-24 21:27:20 +01:00
Benjamin Valentin
04287b4795 cpu/cortexm_common: improve formatting of irq_arch.h 2022-10-24 18:08:33 +02:00
5cc43e5d5e cpu/cortexm: clear FPU state in cpu_switch_context_exit() 2022-10-05 22:17:26 +02:00
Benjamin Valentin
ea917f4b07 cpu: cpu_print_last_instruction() -> cpu_get_caller_pc() 2022-09-15 10:49:56 +02:00
Benjamin Valentin
8cf20a286d cpu/cortexm_common: allow to overwrite nmi_handler
If a user wants to handle NMI events, let them do so by
providing an implementation for nmi_handler() instead of
paniking.
2022-06-20 18:22:22 +02:00
benpicco
a64f722a42
Merge pull request #17781 from benpicco/hard_fault-BKPT
cpu/cortexm_common: remove breakpoint from hard_fault_handler
2022-06-07 15:28:08 +02:00
6f52b90e58
cpu/cortexm_common: enable FPU on cortexm33 2022-05-05 21:16:10 +02:00
chrysn
facb5e633f
Merge pull request #17436 from Ollrogge/reserve_flash
cpu: add flash_writable section to linker script
2022-03-17 21:44:32 +01:00
Benjamin Valentin
1fa1d348d8 cpu/cortexm_common: remove breakpoint from hard_fault_handler
The hard fault handler would normally call core_panic() which in turn
calls ps() - this already helps debugging a lot of crashes caused by
a thread stack overflow.

With the breakpoint in place, the code will not advance to this, leaving
users unknown of this feature in the dark.

On top, the breakpoint is not very helpful if thread stacks are already
corrupted.

Let's just drop it for simplicity's sake - it's not there for any other
architectures.
2022-03-09 23:32:46 +01:00
Ollrogge
5587f5d88f cpu/cortexm_common: add flash_writable section to linker script 2022-03-07 11:23:44 +01:00
chrysn
f7dfa2f84d
Merge pull request #17133 from chrysn-pull-requests/doc-develhelp-stackoverflow-precision
doc: Start documenting pseudomodules
2022-01-27 15:09:22 +01:00
chrysn
bb8402fc0b doc: Document the MPU pseudomodules 2022-01-27 13:49:25 +01:00
Fabian Hüßler
70d3d647d1 cpu/{cortexm_common, stm32}: add support for backup RAM 2022-01-21 15:53:18 +01:00
8272e4fbd2
Merge pull request #17359 from benpicco/irq_is_in-bool
core: change return type of irq_is_in(), irq_is_enabled() to bool
2022-01-06 18:13:20 +01:00
chrysn
afdabcf9b6
Merge pull request #16274 from chrysn-pull-requests/rust-application
Add some Rust building infrastructure and example
2021-12-16 16:17:28 +01:00
chrysn
1838cdf69c rust: Add triples for M23 and M33 (but keep disabled) 2021-12-16 13:29:31 +01:00
chrysn
b557fdce55 rust: Enable on Cortex-M0(+) boards 2021-12-16 13:29:31 +01:00
MrKevinWeiss
51fdbdd75c
cpu/cortexm: fix kconfig libc_implemention 2021-12-15 08:39:00 +01:00
chrysn
a2e1b92e1d makefiles: Define RUST_TARGET for use with Cargo / Rust
For RISC-V and Cortex-M-not-3, triples are known and have worked in some
configuration, but do not work at the moment and stay disabled until the
reference platforms (native, M3) have been established well.
2021-12-14 12:55:13 +01:00
Leandro Lanzieri
df7ce1c647
makefiles/kconfig: use two lists for boards and CPUs default configs
This introduces KCONFIG_BOARD_CONFIG and KCONFIG_CPU_CONFIG variable for
boards and CPUs (including common directories) to add default
configuration files to be merged. The current approach, as it uses
Makefile.features, would include boards first, not allowing them to
override CPU configurations.
2021-12-13 12:33:21 +01:00
Benjamin Valentin
41a5b7ef7a core: change return type of irq_is_in(), irq_is_enabled() to bool
This only cleans up the API, no change in behavior or users of the API
is expected.
2021-12-08 15:53:15 +01:00
Erik Ekman
b5f96d2040 cpu/cortexm_common: Suppress cppcheck errors
cpu/cortexm_common/thread_arch.c:262: error (comparePointers): Comparing pointers that point to different objects
cpu/cortexm_common/thread_arch.c:266: error (comparePointers): Subtracting pointers that point to different objects
2021-11-25 13:08:51 +01:00
Marian Buschsieweke
7885130809
cpu/cortexm_common: make CI happy 2021-11-16 21:52:55 +01:00
Ollrogge
37403c09eb periph/flashpage: fix wrong doxygen group 2021-11-15 17:25:59 +01:00
Francisco
7f3344870d
Merge pull request #16972 from Ollrogge/flashpage_pr
periph/flashpage: extend API
2021-10-26 12:51:05 +02:00
Ollrogge
d38f6c68b5 cpu/cortexm_common: extend flashpage API 2021-10-19 22:33:15 +02:00
Benjamin Valentin
3e20e939c6 cpu: drop cpu_init() from public headers
Boards are no longer supposed fo call the function, so drop it from
public header files.
2021-10-18 17:31:26 +02:00
Benjamin Valentin
bcb0df8e18 cpu/cortexm_common: call cpu_init() 2021-10-13 23:21:56 +02:00