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

35073 Commits

Author SHA1 Message Date
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
Gerson Fernando Budke
8c1203c646 cpu/avr8_common: Add xmega reset cause register
Add missing ATxmega reset cause register.  This shares same definitions
from ATmega CPU.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
1a88f0bad6 cpu: Introduce Atmel xmega cpu
Add ATxmega common files and cpu definitions.

This works was originally developed by @Josar.  The 2018 version
were port to 2021 mainline.

This version changes original port to have only the atxmega CPU
definition. With that, all family can be accomodated.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
d041199825 cpu/avr8_common: Move irq_enable from board to cpu
Some mega boards enabling global irq at board_init.  This moves that
responsability to cpu/avr8_common to create a common point to all
variants.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
9081a3b7c7 cpu/avr8_common/include/cpu.h: Increase number of uart
The ATxmega can have up to 8 UARTs.  This increase from 2 up to 7 to
keep avr8_state flags with 8 bits wide.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
dylad
187b79fa74 boards: use BTNx_MODE when defined 2021-03-15 21:26:50 +01:00
Martine S. Lenders
6507d04a83 tests/unittests: extend tests for gnrc_netif_pktq_usage() 2021-03-15 15:13:59 +01:00
Martine S. Lenders
db8415b5b6 gnrc_netif_pktq: add function to check usage 2021-03-15 15:13:27 +01:00
Martine Lenders
fd36c626a3
Merge pull request #15950 from MrKevinWeiss/pr/turo/initial
sys/test_utils/result_output: Initial implementations and API of turo
2021-03-15 11:35:01 +01:00
MrKevinWeiss
2e5ff00386 dist/tools/uncrustify: Add turo module 2021-03-15 10:36:46 +01:00
MrKevinWeiss
e7cc489b14 tests/turo: Add automated turo test for json 2021-03-15 10:36:46 +01:00
MrKevinWeiss
e9b65306ea tests/unittests/turo: Add turo unittest 2021-03-15 10:36:46 +01:00
MrKevinWeiss
38884d24b2 sys/result_output: Add kconfig 2021-03-15 10:36:46 +01:00
90b74104f2
pkg/semtech-loramac: use common time on air computation helper 2021-03-15 09:48:42 +01:00
05224adc96
sys/net/loramac: move lora time on air compute helper in loramac.h 2021-03-14 11:09:39 +01:00
Marian Buschsieweke
42df56ff08
tests/periph_ptp_clock: fix bug in debug print
The API doc of ptp_clock_adjust_speed says regarding the correction
parameter:

    1. A call with @p correction set to `0` restores the nominal clock speed.
    2. A call with a positive value for @p correction speeds the clock up
       by `correction / (1 << 32)` (so up to ~50% for `INT32_MAX`).
    3. A call with a negative value for @p correction slows the clock down by
       `-correction / (1 << 32)` (so up to 50% for `INT32_MIN`).

So we need to divide by 2^32, not 2^32 - 1 (or `UINT32_MAX`).
2021-03-12 20:43:01 +01:00
MrKevinWeiss
6a3eb46d5e sys/result_output: Expose result output 2021-03-12 16:20:33 +01:00
MrKevinWeiss
2c2be2636d sys/result_output: Add initial structure check 2021-03-12 16:17:12 +01:00
MrKevinWeiss
d17829311c sys/result_output: Add initial text implementation 2021-03-12 16:16:28 +01:00
MrKevinWeiss
3cbd8a356b sys/result_output: Add initial json implementation 2021-03-12 16:15:07 +01:00
f337a9025a
pkg/semtech-loramac: only handle CAD/FHSS events with sx127x 2021-03-12 14:40:12 +01:00
f5ef94c86c
examples/lorawan: adapt to new loramac initialization 2021-03-12 14:40:12 +01:00
e4c54de2a6
sys/auto_init/loramac: initialize sx127x radio there 2021-03-12 14:40:12 +01:00
5aff617512
pkg/semtech-loramac: rework to only use netdev interface 2021-03-12 14:40:12 +01:00
25a613ba93
pkg/semtech-loramac: use netdev interface to set sleep state 2021-03-12 11:38:14 +01:00
0ea3b0bac1
drivers/sx127x: expose RSSI value via netdev 2021-03-12 10:29:45 +01:00
Martine Lenders
e768a85f62
Merge pull request #15798 from miri64/dist/enh/annotations-moved-by-offset
static_tests: move diff annotations by offset.
2021-03-11 14:12:02 +01:00
Martine Lenders
254af225c9
uncrustify: move annotation by offset 2021-03-11 13:32:33 +01:00
Martine Lenders
b52ddefccd
headerguards: move annotation by offset 2021-03-11 13:32:33 +01:00
Martine Lenders
c6260f29b3
coccinelle: move annotation by offset 2021-03-11 13:32:32 +01:00
Martine Lenders
5521492a75
Merge pull request #15886 from leandrolanzieri/pr/netdev_remove_radio_hal_pseudomodule
drivers/netdev: cleanup dependencies and remove ieee802154_radio_hal pseudomodule
2021-03-10 16:42:55 +01:00
Leandro Lanzieri
5af48d2969
tests/netstats_neighbor: use gnrc_netdev_default module 2021-03-10 15:22:03 +01:00