1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/riscv_common
bors[bot] a9310ed46c
Merge #19341 #19345
19341: Picolibc updates r=benpicco a=keith-packard

### Contribution description

Minor updates to picolibc support for newer versions of picolibc, including 1.8.


### Testing procedure

Here's the current build result for a board I happen to have on my bench right now:

```
$ make -C examples/blinky BOARD=nucleo-f103rb FEATURES_REQUIRED=picolibc
...
/home/keithp/src/RIOT/sys/picolibc_syscalls_default/syscalls.c:319:1: error: unknown type name '_READ_WRITE_RETURN_TYPE'
  319 | _READ_WRITE_RETURN_TYPE read(int fd, void *dest, size_t count)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/home/keithp/src/RIOT/sys/picolibc_syscalls_default/syscalls.c:351:1: error: unknown type name '_READ_WRITE_RETURN_TYPE'
  351 | _READ_WRITE_RETURN_TYPE write(int fd, const void *src, size_t count)
      | ^~~~~~~~~~~~~~~~~~~~~~~
...
```

### Description of changes

 1. Fix the read/write return values (Picolibc 1.8 uses POSIX standard types now)
 2. Add new symbols to linker scripts (Picolibc needs help dealing with TLS alignment)
 3. Align stack and thread local storage block during thread setup.


19345: cpu/riscv_common: convert to uword_t usage r=benpicco a=dylad

### Contribution description

This PR makes use of `uword_t` type in a few places in `cpu/riscv_common`.
This should not have any effect on produced binaries.

### Testing procedure

CI should be enough. 

### Issues/PRs references
Quickly adapt from #16994. It will help for 64 bits support one day ;)



Co-authored-by: Keith Packard <keithp@keithp.com>
Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-03-04 22:00:55 +00:00
..
include cpu: cpu_print_last_instruction() -> cpu_get_caller_pc() 2022-09-15 10:49:56 +02:00
ldscripts cpu: Add TLS symbols for newer picolibc to linker scripts 2023-03-02 22:55:22 -08:00
periph cpu/riscv_common: convert to uword_t usage 2023-03-03 22:16:25 +01:00
context_frame.c treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
irq_arch.c cpu/riscv_common: convert to uword_t usage 2023-03-03 22:16:25 +01:00
Kconfig cpu/riscv_common: add puf_sram feature 2022-02-16 15:18:37 +01:00
Makefile riscv_common: Refactor common fe310 code to riscv_common 2021-02-05 09:32:19 +01:00
Makefile.dep cpu/riscv_common: move C lib selection to common place 2021-08-25 10:53:00 +02:00
Makefile.features cpu/riscv_common: add puf_sram feature 2022-02-16 15:18:37 +01:00
Makefile.include cpu/riscv_common: Jump to rom start on boot 2021-08-24 10:30:12 +02:00
panic.c riscv_common: Refactor common fe310 code to riscv_common 2021-02-05 09:32:19 +01:00
riscv_init.c cpu/riscv_common: add puf_sram feature 2022-02-16 15:18:37 +01:00
start.S riscv: Reduce reset trampoline code size by 2 bytes 2022-12-08 13:26:07 +01:00
thread_arch.c cpu/riscv_common: convert to uword_t usage 2023-03-03 22:16:25 +01:00