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`.
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
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>
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>
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>
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>
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>
Add atxmega common board definitions. This works is a port from @josar
with few modifications.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
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>
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>
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>
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>
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>
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>
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>