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

7209 Commits

Author SHA1 Message Date
Erik Ekman
7825512d18 cpu/riscv_common: Suppress cppcheck error
cpu/riscv_common/thread_arch.c:188: error (comparePointers): Subtracting pointers that point to different objects
2021-11-25 13:08:51 +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
Erik Ekman
e5d60176e4 cpu/esp: Suppress cppcheck errors
cpu/esp_common/syscalls.c💯 error (memleak): Memory leak: mtx
cpu/esp_common/syscalls.c:131: error (memleak): Memory leak: rmtx
cpu/esp_common/syscalls.c:365: error (comparePointers): Subtracting pointers that point to different objects

cpu/esp_common/thread_arch.c:355: error (comparePointers): Comparing pointers that point to different objects

cpu/esp8266/startup.c:59: error (comparePointers): Subtracting pointers that point to different objects
2021-11-25 13:08:51 +01:00
Leandro Lanzieri
92b7e5ea53
cpu/atxmega: fix dependency 2021-11-22 12:25:57 +01:00
Leandro Lanzieri
845681448d
cpu/atmega_common: move PCINT documentation from boards 2021-11-22 12:25:57 +01:00
Leandro Lanzieri
a37f59b109
cpu/atxmega: model Kconfig 2021-11-22 12:25:29 +01:00
Leandro Lanzieri
b8e2e3ce66
cpu/atmega_common: model Kconfig 2021-11-22 12:25:29 +01:00
Leandro Lanzieri
b534f26e17
cpu/avr8_common: model Kconfig 2021-11-22 12:25:29 +01:00
Leandro Lanzieri
96f31ec39b
cpu/lpc1768: add Kconfig configuration 2021-11-22 09:07:42 +01:00
Jean Pierre Dudey
7ab6729b04
Merge pull request #17236 from leandrolanzieri/pr/cpu/cc26xx_cc13xx/model_kconfig
cpu/{cc26xx, cc13xx}: model kconfig
2021-11-21 17:45:57 +01:00
benpicco
2d882c3521
Merge pull request #16737 from JKRhb/uncrustify
treewide: Address uncrustify suggestions
2021-11-21 15:42:05 +01:00
Benjamin Valentin
669104d841 cpu/sam0_common: SPI: don't perform DMA transfer for small buffers
Setting up a DMA transfer can take longer than sending out a buffer
byte by byte if the buffer is small.

DMA only shows advantages for large buffers, using it for every transfer
will cause a net slowdown.

Since we did not come up with a good way to determine the treshold based
on the SPI frequency, just use a fixed buffer for now so that DMA can be
used without slowing things down overall.
2021-11-19 17:22:51 +01:00
benpicco
e0b3cba571
Merge pull request #17226 from dylad/pr/boards/nrf9160dk/add_riotboot_support
boards/nrf9160dk: add riotboot support
2021-11-19 15:45:05 +01:00
06530c4297
cpu/stm32: clone cmsis header in build/stm32 2021-11-19 13:24:57 +01:00
Leandro Lanzieri
05224def47
cpu/cc26x2_cc13x2: model Kconfig 2021-11-19 10:52:23 +01:00
Leandro Lanzieri
7237002ead
cpu/cc26x0_cc13x0: model Kconfig 2021-11-19 10:52:08 +01:00
Leandro Lanzieri
c68fce0850
cpu/cc26xx_cc13xx: model Kconfig 2021-11-19 10:50:50 +01:00
Jan Romann
3056b89252
cpu/riscv_common: uncrustify 2021-11-19 00:20:12 +01:00
Dylan Laduranty
25b168c34f boards/nrf9160dk: add riotboot to FEATURES_PROVIDED 2021-11-18 23:05:42 +01:00
benpicco
09e0692a85
Merge pull request #17201 from bergzand/pr/nrf5x/periph_qdec
nrf5x_common: Add qdec peripheral implementation
2021-11-18 22:30:58 +01:00
benpicco
2ffbcecbe1
Merge pull request #17225 from dylad/pr/cpu/nrf91/add_periph_flashpage_support
cpu/nrf9160: add periph_flashpage support
2021-11-18 22:10:18 +01:00
benpicco
24aa7eb6bf
Merge pull request #17191 from benpicco/drivers/periph-byte_type
drivers/periph: use uint_fast8_t as default type
2021-11-18 17:21:55 +01:00
Jan Romann
bd7b277f7e
cpu/fe310: uncrustify 2021-11-18 15:44:17 +01:00
Leandro Lanzieri
c5f9d50a57 socket_zep: add Kconfig 2021-11-18 14:17:29 +01:00
Benjamin Valentin
fa2d9bde56 socket_zep: port to radio HAL 2021-11-18 11:51:14 +01:00
Francisco
d573401319
Merge pull request #16912 from leandrolanzieri/pr/cpu/efm32/model_kconfig
cpu/efm32: model kconfig
2021-11-18 11:02:29 +01:00
Benjamin Valentin
3d8e0d7f43 cpu/esp32: fix cast to periph type 2021-11-18 10:14:51 +01:00
Benjamin Valentin
eabc9a8042 cpu/nrf5x_common: fix cast to periph type 2021-11-18 10:14:51 +01:00
Benjamin Valentin
90a6d90df8 cpu/gd32v: uart: fix function parameter 2021-11-18 10:14:51 +01:00
Francisco
691601fbe2
Merge pull request #17087 from gschorcht/cpu/esp32/fix_code_placement
cpu/esp32: place freertos and periph in IRAM
2021-11-18 10:05:25 +01:00
Leandro Lanzieri
805a77b13a
cpu/efm32: model Kconfig 2021-11-18 09:03:06 +01:00
Leandro Lanzieri
44e7e82fad
Merge pull request #17227 from leandrolanzieri/pr/cpu/atmega1281/fix_pcint
cpu/atmega1281: fix pcint
2021-11-18 08:55:30 +01:00
Gunar Schorcht
be1532d935
Merge pull request #17221 from maribu/cpu/esp32
cpu/esp32: make CI happy
2021-11-18 06:45:30 +01:00
31c531c904
Merge pull request #17218 from maribu/cpu/arm7_common
cpu/arm7_common: suppress false positives of cppcheck
2021-11-18 06:30:46 +01:00
Dylan Laduranty
6671aada97 cpu/nrf9160: add FLASHPAGE* feature to Kconfig 2021-11-17 17:25:36 +01:00
Leandro Lanzieri
1035620b38
cpu/atmega1281: fix pcint 2021-11-17 15:05:25 +01:00
Dylan Laduranty
cc440bc296 cpu/nrf9160: add flashpage configuration 2021-11-17 14:06:04 +01:00
Dylan Laduranty
b734622944 cpu/nrf5x_common: update periph_flashpage for nRF9160 support 2021-11-17 14:05:51 +01:00
Marian Buschsieweke
b2f9e2c226
cpu/esp32: fix wrong control flow 2021-11-17 13:10:37 +01:00
Marian Buschsieweke
e46c1f732e
cpu/esp32: make CI happy 2021-11-17 13:10:37 +01:00
9f9ecca95e
Merge pull request #17219 from maribu/cpu/atmega_common
cpu/atmega_common: make cppcheck happy
2021-11-17 10:10:20 +01:00
19a5310ca2
Merge pull request #17220 from maribu/cpu/cortexm_common
cpu/cortexm_common: make CI happy
2021-11-17 10:07:30 +01:00
Dylan Laduranty
aa8608eff5
Merge pull request #17064 from bergzand/pr/usbdev/xmit
USB: refactor to xmit-based API
2021-11-17 09:07:00 +01:00
Marian Buschsieweke
7885130809
cpu/cortexm_common: make CI happy 2021-11-16 21:52:55 +01:00
Marian Buschsieweke
fcba75d86d
cpu/arm7_common: suppress false positives of cppcheck 2021-11-16 21:51:48 +01:00
83c2f2d367
Merge pull request #17155 from maribu/cpu/native
cpu/native: align stack in thread_stack_init()
2021-11-16 20:48:32 +01:00
a6b6f43ce2
sam0_common/usbdev: Adapt to xmit API 2021-11-16 20:17:04 +01:00
c81df904ea
stm32/usbdev: Adapt to xmit API 2021-11-16 20:17:04 +01:00
617027ab5c
nrf52/usb: Adapt to xmit API 2021-11-16 20:17:03 +01:00
Marian Buschsieweke
d91c9cdc5a
cpu/atmega_common: make cppcheck happy 2021-11-16 16:20:26 +01:00
3b1bdd6b3c
nrf5x_common: Add qdec peripheral implementation 2021-11-16 15:21:51 +01:00
76215adef1
Merge pull request #17154 from maribu/cpu/stm32/periph_usb
cpu/stm32/periph/usbdev: fix alignment issues
2021-11-16 11:20:34 +01:00
Dylan Laduranty
8f4ef1eb75
Merge pull request #17186 from benpicco/cpu/sam0_common/uart-frac
cpu/sam0_common: uart: set oversampling based on baud rate
2021-11-15 21:53:19 +01:00
chrysn
5a1c5ad096
Merge pull request #17202 from Ollrogge/doxygen_fix_pr
periph/flashpage: fix wrong doxygen group
2021-11-15 19:43:32 +01:00
Francisco
72abac66f1
Merge pull request #17183 from fjmolinas/pr_stm32wl_adc
cpu/stm32/wl: initial periph_adc implementation
2021-11-15 19:06:24 +01:00
Ollrogge
37403c09eb periph/flashpage: fix wrong doxygen group 2021-11-15 17:25:59 +01:00
benpicco
70ae34a448
Merge pull request #16979 from ospoco/master
cpu/stm32: Add hardening changes to stm32
2021-11-15 15:09:01 +01:00
Francisco Molina
63c51d4add cpu/stm32/wl: initial periph_adc implementation 2021-11-15 09:52:45 +01:00
benpicco
046ecf221e
Merge pull request #17187 from fjmolinas/pr_i2c_stm32wl_typo
cpu/stm32/include/cpu_conf_stm32_common.h: fix typo in macro
2021-11-12 13:41:58 +01:00
VanL
ee832148b3 cpu/stm32: Add hardening changes to stm32
Initialize STM32 RDP in a glitch-resistant fashion to prevent
debugger use when restrictions are set by the designer.
2021-11-11 15:58:52 -06:00
Francisco Molina
ec0e3d242e cpu/stm32/include/cpu_conf_stm32_common.h: fix typo in macro 2021-11-11 19:58:34 +01:00
Benjamin Valentin
18cdd100a9 cpu/sam0_common: uart: set oversampling based on baud rate
In Asynchronous Fractional baud rate mode, the baud rate can not be
greater than the source frequency divided by the oversampling (8, 16).

Currently we are always using 16x oversampling.
This makes it impossible to e.g. set a 2 MHz UART baud rate on the 16 MHz
`saml10-xpro`.

With this change, the oversampling is automatically reduced to 8x which
allows us to set 16 MHz / 8 -> 2 MHz baud rate.
2021-11-11 17:03:05 +01:00
Benjamin Valentin
1ef458a701 cpu/sam0_common: uart: wait for synchronisation done after powerup
Otherwise we lose settings if we write to it right after uart_poweron()
2021-11-11 14:32:42 +01:00
326b0c980a
cpu/native: migrate periph_rtc to ztimer 2021-11-11 10:54:30 +01:00
Marian Buschsieweke
73fc2c215a
Merge pull request #17150 from maribu/cpu/esp_common/periph_flashpage
cpu/esp_common: fix unaligned access in periph_flashpage
2021-11-08 10:49:40 +01:00
Marian Buschsieweke
cb6525b033
cpu/esp_common: fix unaligned access in periph_flashpage 2021-11-07 22:06:27 +01:00
Marian Buschsieweke
09b8387df4
cpu/native: align stack in thread_stack_init()
Unaligned accesses on x86(_64) are allowed, but slow. However, some host systems
might not be that forgiving. Aligning the stack to sizeof(uintptr_t) should be
a pretty safe safety measure.

And with this done, all casts of the stack pointer that increase alignment
requirements are now intermediately casted to `uintptr_t` to silence
warnings from -Wcast-align - after all the stacks are now manually aligned.
2021-11-06 20:22:10 +01:00
Marian Buschsieweke
825a598ca7
cpu/stm32/periph/usbdev: fix alignment issues
Make sure in `_usbdev_new_ep()` that `usbdev_ep_t::buf` is always aligned to 4
bytes. With this in mind, add intermediate casts to `uintptr_t` before casting
`usbdev_ep_t::buf` to `uint32_t *` to silence `-Wcast-align`, as we now manually
enforced correct alignment.
2021-11-06 20:19:39 +01:00
dylad
8842377e93 cpu/sam0: prevent disabled irq from being called
Reported-by: biboc <bapclenet@gmail.com>
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2021-11-05 18:21:21 +01:00
Francisco
c739516ac4
Merge pull request #17132 from miri64/core/enh/activate-SCHED_TEST_STACK
core: make SCHED_TEST_STACK boolean and default to 1 with DEVELHELP
2021-11-05 11:11:36 +01:00
Martine Lenders
098eeb1a2c
cpu/esp_common: suppress cppcheck false positives 2021-11-05 09:27:00 +01:00
Martine Lenders
f08989a3c8
core: make SCHED_TEST_STACK boolean and default to 1 with DEVELHELP 2021-11-05 09:27:00 +01:00
d9dd0cc3b1
cpu/sam0_common: Uncrustified and fixed static-check issues 2021-11-04 13:49:34 +01:00
aba81ffa5c
cpu/nrf52: Uncrustified and fixed static-check issues 2021-11-04 13:49:34 +01:00
Leandro Lanzieri
f64b166319
Merge pull request #16845 from MrKevinWeiss/pr/kconfig/supportstms
.murdock: Add nucleo boards to kconfig test
2021-11-01 09:55:22 +01:00
Gunar Schorcht
aecc516ce9 cpu/esp32: place freertos and periph in IRAM
The IRAM is much faster, while the IROM is much slower and can only be accessed via a cache, which is also sometimes disabled, e.g. by the WiFi module or when writing to the flash. Therefore, time-critical code as well as code that has to work even when the cache is disabled must be placed in the IRAM.
2021-10-30 14:46:57 +02:00
Gunar Schorcht
723c24c1d3
Merge pull request #17080 from gschorcht/cpu/esp8266/fix_freertos_placement_in_irom
cpu/esp8266: place freertos functions in IRAM
2021-10-29 13:02:20 +02:00
Gunar Schorcht
06acd8b420 cpu/esp8266: place freertos functions in IRAM
The functions of the `esp*/freetos` libraries must be placed in IRAM because they can be called when the IROM cache is disabled. While the functions implemented in `cpu/esp8266/freetos/*.c` are already placed in IRAM, the functions implemented in `cpu/esp_common/freetos/*.c` are not placed in IRAM. The reason for this is that the object files of these files are created in the `esp_freertos_common` directory, which is not included in the `esp.riot-os.ld` file because the library is named `esp_freertos_common`.
2021-10-29 11:17:24 +02:00
766ebf0af5
stm32/usbdev: Use ztimer instead of xtimer 2021-10-27 18:56:42 +02:00
Francisco
7f3344870d
Merge pull request #16972 from Ollrogge/flashpage_pr
periph/flashpage: extend API
2021-10-26 12:51:05 +02:00
Francisco
96e2ad1f0e
Merge pull request #16956 from fjmolinas/pr_native_relative_stacksize
cpu/native/include: other stacksizes based on default
2021-10-26 09:04:16 +02:00
Gunar Schorcht
697c44811a
Merge pull request #16911 from yarrick/esp_jtag
cpu/esp32: Add openocd programming support
2021-10-26 01:24:27 +02:00
Ollrogge
be254d4125 cpu/cc2538: adjust rom size to account for cca region 2021-10-25 15:13:37 +02:00
Ollrogge
cdd9f303cf cpu/native: extend flashpage API 2021-10-25 15:07:37 +02:00
Ollrogge
4fa25af86c cpu/lpc23xx: extend flashpage API 2021-10-25 15:07:37 +02:00
Ollrogge
3a11b1fbd2 cpu/riscv_common: extend flashpage API 2021-10-25 15:07:37 +02:00
Ollrogge
741943f021 cpu/msp430_common: extend flashpage API 2021-10-25 15:03:50 +02:00
Francisco Molina
5070489aa6 cpu/native/include: other stacksizes based on default 2021-10-25 09:13:21 +02:00
iosabi
7b1f083cd8 esp8266: Download Espressif RTOS SDK as a new RIOT PKG
RIOT-OS uses part of Espressif ESP8266 RTOS SDK to build support for
this CPU. The SDK includes some vendor-provided closed source
pre-compiled libraries that we need to modify to adapt to RIOT-OS
usage. This library modifications was done once and uploaded to a fork
of the vendor repository and was provided as an environment variable.

This patch changes two things:

1. It installs the SDK as a RIOT PKG from the new pkg/esp8266_sdk
directory instead of requiring the user to download it separately.

2. It performs the library modifications (symbol renames) on the pkg
Makefile removing the need to use a fork with the modifications applied
and simplifying the SDK update and future modifications.

This change sets the SDK package version (git SHA) to the same one that
our fork was using as a parent in the vendor repository, meaning that
the output libraries are exactly the same as before.

Tested with
```
ESP8266_RTOS_SDK_DIR=/dev/null USEMODULE=esp_log_startup make -C tests/shell BOARD=esp8266-esp-12x flash
```

and verified that the program works. The boot message now includes:
```
ESP8266-RTOS-SDK Version v3.1-51-g913a06a9
```
confirming the SDK version used.

`/dev/null` in the test is just to make sure that no evaluation of
`ESP8266_RTOS_SDK_DIR` in make is affected by the environment variable
value which would be set to the SDK for people who followed the set up
instructions before this change.

Tested the checkout size:
```bash
$ du -hs build/pkg/esp8266_sdk/
124M	build/pkg/esp8266_sdk/
```
2021-10-23 11:13:38 +00:00
5e52a0ea4c cpu/nrf5x_common: nrfx.h: add missing "kernel_defines.h" include 2021-10-20 11:36:55 +02:00
Ollrogge
d38f6c68b5 cpu/cortexm_common: extend flashpage API 2021-10-19 22:33:15 +02:00
benpicco
f57e2f1e99
Merge pull request #16055 from benpicco/soc_init
cpu: call cpu_init() from startup code, not from board
2021-10-18 20:52:53 +02:00
Erik Ekman
cbfe502cc6 cpu/esp32: Reset when starting debugging
To avoid 'Target not examined yet' error
2021-10-18 20:11:32 +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
Erik Ekman
1c6d7dcdaf tools/openocd: Make verifying flashed image optional
Checksumming flash is not supported on xtensa platform:

Warn : not implemented yet

make: *** [.../RIOT/examples/saul/../../Makefile.include:796: flash] Error 1
2021-10-15 10:13:25 +02:00
Erik Ekman
2df7d499c8 tools/openocd: Export IMAGE_OFFSET only when flashing 2021-10-15 10:12:40 +02:00
Erik Ekman
d47aa2d550 cpu/esp32: Flash bootloader, partition and app via openocd
https://github.com/espressif/openocd-esp32 is needed.

Example config (when compiled from source):
export OPENOCD="~/esp/openocd-esp32/src/openocd -s ~/esp/openocd-esp32/tcl"
2021-10-15 10:00:57 +02:00
Erik Ekman
3d7d211157 cpu/esp: Always create app.elf.bin and partitions.bin
Even if programmer is not esptool
2021-10-15 09:59:38 +02:00
Marian Buschsieweke
32be74291c
Merge pull request #16790 from maribu/cpu/avr8_common/ldscripts
cpu/avr8_common: Fix link with binutils > 2.35.2
2021-10-15 09:59:14 +02:00
Marian Buschsieweke
696598ff9e
Merge pull request #16985 from gschorcht/cpu/esp/fix_doc
cpu/esp8266, boards/*esp*: fix documentation
2021-10-15 07:54:40 +02:00