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

35054 Commits

Author SHA1 Message Date
Marian Buschsieweke
a07dac9ad1
build system: add new compile-commands make target
By running make compile-commands a `compile_commands.json` in the RIOT base
directory. With the environment variable `COMPILE_COMMANDS` the path of
this file can be changed to a custom location.

The `compile_commands.json` will contain the exact compile command, but
as additional flag `-I/usr/$(TARGET)/include` is added to work around
`clangd` not being able to locate the newlib system headers. The
additional includes can be overwritten using the environment variable
`COMPILE_COMMANDS_EXTRA_INCLUDES`.
2021-04-14 14:51:46 +02:00
Leandro Lanzieri
889983697e
Merge pull request #16215 from fjmolinas/pr_tests_ccs811
tests/driver_ccs811%: fix read return code check
2021-03-21 21:15:52 +01:00
Francisco Molina
4a4a159cb6
tests/driver_ccs811%: fix read return code check 2021-03-21 20:45:57 +01:00
chrysn
cf194d1bf7
Merge pull request #16213 from chrysn-pull-requests/saul-not-from-isr
doc/SAUL: State expectations on blocking and interrupts
2021-03-21 14:49:06 +01:00
chrysn
3a719c69c7 doc/SAUL: State expectations on blocking and interrupts 2021-03-21 14:35:01 +01:00
chrysn
163e2b013c
Merge pull request #16028 from chrysn-pull-requests/bootloader-docs-dfu
riotboot_dfu: Add documentation
2021-03-20 23:11:34 +01:00
benpicco
ee5b70730b
Merge pull request #15758 from nandojve/avr8_xmega
Introduce ATxmega CPU and Boards
2021-03-20 22:09:07 +01:00
chrysn
e0b1bfbf71 riotboot_dfu: Add user documentation 2021-03-20 21:51:22 +01:00
Dylan Laduranty
160251b0b3
Merge pull request #16011 from chrysn-pull-requests/riotboot-modeselect
riotboot: Mode selection for boards
2021-03-20 21:44:00 +01:00
Marian Buschsieweke
654d841f66
Merge pull request #16192 from maribu/tests/periph_ptp_clock
tests/periph_ptp_clock: fix bug in debug print
2021-03-20 06:51:31 +01:00
Leandro Lanzieri
99c7ec57cf
Merge pull request #15943 from jia200x/pr/gnrc_lorawan_channel_mask
net/gnrc_lorawan: implement channel mask support
2021-03-19 16:23:13 +01:00
Jose Alamos
166ee57a5a
net/gnrc_lorawan: implement funcion to set channel mask 2021-03-19 12:15:03 +01:00
Martine Lenders
64f34381c5
Merge pull request #15938 from iosabi/patch-1
Fix typo in release notes.
2021-03-19 10:44:30 +01:00
Martine Lenders
214fdf007d
Merge pull request #16193 from miri64/gnrc_netif_pktq/feat/usage
gnrc_netif_pktq: add function to check usage
2021-03-18 23:05:27 +01:00
chrysn
d770917e49 riotboot_dfu: Stay in DFU mode if button is pressed
Boards can override this; by default it's BTN0
2021-03-18 19:32:16 +01:00
Leandro Lanzieri
842ea31151
Merge pull request #16201 from maribu/periph_spi_doc_fix
drivers/periph_spi: fix Doxygen commands
2021-03-18 19:26:11 +01:00
f826e8fb46
Merge pull request #16205 from kaspar030/fix_sock_util_parse_netif
sys/net/sock_util: zero out temporary buffer
2021-03-18 17:02:19 +01:00
a53cbbfa91 sys/net/sock_util: zero out temporary buffer
Otherwise, the following strncpy() leaves strtol() with a non-terminated
buffer.
2021-03-18 14:58:35 +01:00
José Alamos
21390849bf
Merge pull request #16188 from aabadie/semtech-loramac_netdev
pkg/semtech-loramac: refactor to use netdev API only
2021-03-18 13:11:32 +01:00
benpicco
3fabafa0d9
Merge pull request #16152 from yarrick/foreach_netif
pkg/lwip: Use NETIF_FOREACH macro in sock implementation
2021-03-18 11:49:19 +01:00
benpicco
9ea7f5b9ed
Merge pull request #16169 from benpicco/cpu/stm32/candev_cleanup
cpu/stm32: candev: derive number of CAN interfaces from vendor header
2021-03-18 11:47:33 +01:00
benpicco
bbc13af977
Merge pull request #16195 from dylad/pr/boards/define_btn_mode
boards: use BTNx_MODE when defined
2021-03-17 15:39:22 +01:00
c3170b93d8
Merge pull request #16200 from maribu/gitignore
.gitignore: add *.plist and .cache/
2021-03-17 10:37:47 +01:00
Marian Buschsieweke
40859b61f0
drivers/periph_spi: fix Doxygen commands
use @retval to document individual return values rather than @return
2021-03-17 10:34:20 +01:00
Marian Buschsieweke
92c3a9626f
.gitignore: add *.plist and .cache/ 2021-03-17 09:55:00 +01:00
Marian Buschsieweke
6f011c8220
Merge pull request #16164 from kex2017/master
drivers/soft_spi: fix soft spi transfer bug
2021-03-17 09:09:33 +01:00
xuke
0c39c2321f drivers/soft_spi:fix soft spi transfer bug 2021-03-17 09:41:54 +08:00
benpicco
8ca676aa6e
Merge pull request #15907 from benpicco/gnrc_netif-register
sys/net/gnrc/netif: only register netif after init was successful
2021-03-16 16:26:06 +01:00
Benjamin Valentin
545497e970 net/netif: make netif_register() thread safe 2021-03-16 14:49:04 +01:00
399ada9968
Merge pull request #16143 from kfessel/p-optimize-native
board/native: add basic debugging compatible optimization
2021-03-16 14:37:01 +01:00
Karl Fessel
6588db6580 pkg/qcbor,wakaama,wolfssl: remove maybe-uninitialized warning
some variable seem uninitialized to gcc with -Og but aren't
https://gcc.gnu.org/bugzilla/buglist.cgi?quicksearch=may%20be%20used%20uninitialized
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42145
especialy:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90710#c1
2021-03-16 12:14:43 +01:00
Karl Fessel
21ce589bec unittests/tests-ieee802154: remove stack_smasher from unitest
test_ieee802154_set_frame_hdr_flags0_non_beacon_non_ack
buffer given to ieee802154_set_frame_hdr has to be at least 2 bytes
see <RIOT>/sys/net/link_layer/ieee802154/ieee802154.c l32
2021-03-16 12:14:24 +01:00
Karl Fessel
a6bf444489 board/native: undefine FORTIFY_SOURCE to avoid printf replace
printf may be replaced by libc printf_chk if _FORTIFY_SOURCE is
defiend. This undefines it
2021-03-16 12:14:00 +01:00
Karl Fessel
2bd2384bc0 examples/filesystem: posix open needs mode if O_CREATE
umask is applied to mode (mode & ~umask) -> 00777 is a good default
see: man 2 open
2021-03-16 12:13:11 +01:00
Karl Fessel
cfaa57fe6c board/native: no omit frame pointer if backtrace is used
this makes riots test work but may have different result than O0
see man 3 backtrace #NOTES
2021-03-16 12:12:49 +01:00
Karl Fessel
4d645a23aa board/native: add basic debugging compatible optimization
adds -Og to board/native CFLAGS
2021-03-16 11:54:01 +01:00
Gerson Fernando Budke
0bd55def91 CODEOWNERS: Add nandojve for xmega things
Fix missing entry for avr8_common that was created when moving code
from atmega_common at #15712.  As complement add myself as code owner
for xmega related things.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
d23b139938 examples: Exclude atxmega-a1u-xpro board due low mem
Add atxmega-a1u-xpro board to BOARD_INSUFFICIENT_MEMORY list to
exclude examples since board don't have enough data memory.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
6475620290 tests: Exclude atxmega-a1u-xpro board due low mem
Add atxmega-a1u-xpro board to BOARD_INSUFFICIENT_MEMORY list to
exclude test since boards don't have enough data memory.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
553e968a00 tests/periph_timer/Makefile: Add xmega 500kHz board
Atmel XMEGA CPU don't have a timer prescaler div16 and div32 option.
This means that at full speed (32MHz) it is not possible have a 1MHz
clock tick.  Define default tick to 500kHz and add atxmega-a1u-xpro
boards to test list.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
9cbe8bceeb drivers/ws281x/Kconfig: Select mega cpu by cpu_core
The current MODULE_WS281X_ATMEGA only supports ATmega core.
This update Kconfig to select MODULE_WS281X_ATMEGA module by
CPU_CORE_AVR_MEGA instead HAS_ARCH_AVR8.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
b843cfb5c2 boards: Introduce atxmega-a1u-xpro board
Add initial version.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
85fcba0ce9 boards/common: Introduce Atmel xmega common
Add atxmega common board definitions.  This works is a port from @josar
with few modifications.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
1d55c85f24 makefiles/tools/avrdude: Add xmega cpu conditions
The current script don't allow change debug protocol and not allows
set proper part name for xmega.  This make DEBUGPROTO optional with
JTAG as default protocol.  It add a filter for atxmega to add proper
AVRDUDE_PROGRAMMER_FLAGS.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
4b2bcd560b makefiles/arch/avr8: Add xmega linker conditions
The current script doesn't allow change script path and name.
Add LDSCRIPT_COMPAT_PATH and LDSCRIPT_COMPAT_NAME default
values to allow a unique path inside atxmega folder.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
699248c65f makefiles/arch/atmega.inc.mk: Rename to avr8.inc.mk
Atmel AVR-8 CPU was reworked to accomodate variants like ATxmega.
This rename to atmega.inc.mk to avr8.inc.mk to be compliant with
new directory structure.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
aa3af4e2fa cpu/avr8_common/avr8_cpu: Add xmega clock
ATxmega have many clock options.  This introduce clk_init into cpu_init
to allow user select between a default configuration or perform fine
clock tune.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
f1eaa4caf3 cpu/avr8_common/avr8_cpu: Enable xmega pmic
The XMEGA CPU have a Programmable Multilevel Interrupt Controller.
This enables all three PMIC levels.  By default, all interrupts are
preconfigured as LOW Level without Round Robin queue.  This works
as any MCU with interrupt enabled.

In order to get benefit from Multilevel Interrupts user need increase
the interrupt level by own.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
70c597620f cpu/avr8_common: Differentiate avr8 cpu cores
Current there is no way to split code between ATmega and ATxmega in
drivers.  This differentiate AVR8 cores into MEGAs and XMEGAs.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
facede13fd cpu/avr8_common: Rework and add xmega registers
The current context switch and thread stack init don't have a generic
way to save/restore registers for all AVR-8 variations.  This add
defines to check flash/data sizes and rework:

 - thread_stack_init
 - avr8_context_save
 - avr8_context_restore

The new implementation add missing RAMP D/X/Y registers that are used
by XMEGA variations.

The rules to add EIND, RAMP(D,X,Y,Z) register are:

 - EIND must be added if device have more than 128k flash.  This means,
   device can access more than 64k words in flash.
 - RAMP D/X/Y must be added if device have or can address more than
   64k data.
 - RAMPZ must be added if device can address more than 64k bytes of
   flash or data.

With above rules there is no necessity to check by device because it is
mandatory the registers for those MCU variations.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00