Compare commits

...

33 Commits

Author SHA1 Message Date
benpicco
38c1f7abb7
Merge pull request #17020 from benpicco/backport/2021.10/support_picolibc_stdio_globals
sys/picolibc_syscalls_default: support new picolibc stdio globals [backport 2021.10]
2021-10-20 14:00:42 +02:00
94caa83e30 sys/picolibc_syscalls_default: support new picolibc stdio globals
(cherry picked from commit 27b9c6da06ab95fb58507ab2656e3ac16f094d69)
2021-10-20 12:34:15 +02:00
Martine Lenders
5d76f8f4f8
Merge pull request #17013 from fjmolinas/backport/2021.10/pr_lorawan_parameters_gha
gh/workflows/release-tests: update LoRaWAN parameters to ttnv3 [backport 2021.10]
2021-10-19 18:07:16 +02:00
Francisco Molina
acf1f3940b gh/workflows/release-tests: update LoRaWAN parameters to ttnv3
(cherry picked from commit d55b67326b335e2dd43671db1abd18465b749a43)
2021-10-19 17:57:06 +02:00
Francisco
e6e27ac7bb
Merge pull request #17012 from fjmolinas/backport/2021.10/pr_examples_lorawan_pass_keys_to_docker
examples/lorawan: add LoRaWAN keys to DOCKER_ENV_VARS [backport 2021.10]
2021-10-19 17:55:27 +02:00
Francisco Molina
668e93b6a3 examples/lorawan: add LoRaWAN keys to DOCKER_ENV_VARS
(cherry picked from commit dbf7efac14476f2b21b5a299c924f68e58f7c42d)
2021-10-19 16:00:17 +02:00
Martine Lenders
f94c67ef72
Merge pull request #17011 from fjmolinas/backport/2021.10/pr_riotctrl_expect_mock
dist/pythonlibs/riotctrl_shell/tests/common: add expect to mock [backport 2021.10]
2021-10-19 15:59:10 +02:00
Francisco Molina
d8b420a144 dist/pythonlibs/riotctrl_shell/tests/common: add expect to mock
(cherry picked from commit 3aa6492016a1aa86682faabfc81170ba2dfcac89)
2021-10-19 15:55:18 +02:00
benpicco
8908aad44c
Merge pull request #16953 from leandrolanzieri/backport/2021.10/pr/build_system/delete_non_selected_objects
Makefile.base: cleanup non selected source object files [backport 2021.10]
2021-10-19 15:26:55 +02:00
Leandro Lanzieri
0bd1c9e95f
Makefile.base: do not clean objects of bindist modules 2021-10-19 13:29:39 +02:00
Leandro Lanzieri
1da39f9bff
Makefile.base: cleanup non selected source object files
(cherry picked from commit 452333cb3664a8b301c6957e0aa52422759792e8)
2021-10-19 13:29:10 +02:00
Martine Lenders
c07b6b1a82
Merge pull request #17005 from benpicco/backport/2021.10/pr/semtech-loramac/fix_schedule_uplink
pkg/semtech-loramac: forward uplink schedule request to upper layer [backport 2021.10]
2021-10-18 22:35:54 +02:00
Jose Alamos
7e7483b0ed tests/pkg_semtech-loramac: add pending data indication
(cherry picked from commit 00deef37a9c657fb04bc5b08948817c65683c2b7)
2021-10-18 18:24:36 +02:00
Jose Alamos
5d9851660f pkg/semtech-loramac: forward uplink schedule request to upper layer
(cherry picked from commit b11e58f84349ba0358278662497cadc5c0c59c8d)
2021-10-18 18:24:36 +02:00
benpicco
67a514750c
Merge pull request #16990 from maribu/backport/2021.10/cpu/avr8_common/ldscripts
cpu/avr8_common: Fix link with binutils > 2.35.2 [backport 2021.10]
2021-10-18 18:23:59 +02:00
Marian Buschsieweke
cdb128e620
cpu/avr8_common: Fix link with binutils > 2.35.2
The xfa.ld script is incompatible with binutils > 2.35.2 and results
in firmwares that wont boot. Sadly, I couldn't figure out an elegant
way to fix the issue. Instead, I modified the linker script provided
by binutils to also include XFA.

(cherry picked from commit 62d6a560b1b7ac11fcc2ea4c44952a3efb954c30)
2021-10-18 16:48:35 +02:00
benpicco
67249d4e40
Merge pull request #16995 from benpicco/backport/2021.10/dhcpv6_client/bug/fix-retrans-calc
dhcpv6_client: keep integers in retransmission calculations signed  [backport 2021.10]
2021-10-18 15:46:58 +02:00
Martine Lenders
317d4423f3 dhcpv6_client: add comment on why the division is needed
(cherry picked from commit b1b0a9b4f5d4f60e7290556ecc7bf7dc3f9bd745)
2021-10-18 12:48:32 +02:00
Martine Lenders
92f679b8a9 dhcpv6_client: keep integers in retransmission calculations signed
(cherry picked from commit d844de2263c91d58cff4fd83aaefff480f5297fb)
2021-10-18 12:48:32 +02:00
dfebaa31ab
Merge pull request #16996 from benpicco/backport/2021.10/pkg_mirror_url
make: support package mirrors [backport 2021.10]
2021-10-18 13:47:17 +03:00
fe467db893 pkg/yxml: add git mirror url
(cherry picked from commit 332a1a122138f42fa45213f0cfcd283fd09db562)
2021-10-17 16:33:13 +02:00
f7d2040b3e .murdock: set PKG_USE_MIRROR=0 for nightlies
(cherry picked from commit 96f50ea52da5095c23853e2af497a9a28e4c83ee)
2021-10-17 16:33:13 +02:00
a353dbc3a0 pkg: support PKG_MIRROR_URL, use if PKG_USE_MIRROR=1 (default)
(cherry picked from commit 92ca97e31b0bc1a4f8b02db7223bb4becd0044fa)
2021-10-17 16:33:12 +02:00
benpicco
a8c9e15c3a
Merge pull request #16983 from benpicco/backport/2021.10/cpu/native-gcc11
cpu/native: fix build with gcc 11 [backport 2021.10]
2021-10-13 18:54:07 +02:00
Benjamin Valentin
cd51846063 cpu/native: fix build with gcc 11
This fixes the following warning with GCC 11.2:

    cpu/native/include/native_internal.h:153:13: error: variably modified ‘__isr_stack’ at file scope
      153 | extern char __isr_stack[SIGSTKSZ];
          |             ^~~~~~~~~~~
    cpu/native/include/native_internal.h:154:13: error: variably modified ‘__end_stack’ at file scope
      154 | extern char __end_stack[SIGSTKSZ];

(cherry picked from commit 1a2984b786850d9b74103e4a7038b9a56f615eb1)
2021-10-13 16:29:23 +02:00
benpicco
1a9f480c96
Merge pull request #16973 from benpicco/backport/2021.10/pr/submac/rx_ack_race_condition
ieee802154/submac: avoid race condition between RX_DONE and ACK_TIMEOUT [backport 2021.10]
2021-10-12 13:34:16 +02:00
Jose Alamos
75eee06ea6 tests/ieee802154_submac: prevent calling ACK TO fired if cancelled
(cherry picked from commit a7a0b8f59258fe125a92a6c5b2629501db635f49)
2021-10-11 23:54:44 +02:00
Jose Alamos
98211c291f net/netdev_ieee802154_submac: prevent calling ACK TO fired if cancelled
(cherry picked from commit cb6e242b652f3c87444f45d0be044b10c31d6f17)
2021-10-11 23:54:44 +02:00
Jose Alamos
6b833f1791 ieee802154/submac: avoid race condition between RX_DONE and ACK_TIMEOUT
(cherry picked from commit d7f4d5b0bddf28d33f14ccd9becae72ee23ecd16)
2021-10-11 23:54:44 +02:00
Martine Lenders
b99b49597c
Merge pull request #16949 from miri64/backport/2021.10/gnrc_ipv6_nib/fix/queue-pkts-on-6lbr
gnrc_ipv6_nib: queue packets that trigger probing on border router [backport 2021.10]
2021-10-06 14:27:45 +02:00
Martine Lenders
cfd76b7793
gnrc_ipv6_nib: queue packets that trigger probing on border router
(cherry picked from commit b8691842fb4e0614dbbe30af85c2997eb58429ad)
2021-10-05 14:01:37 +02:00
Marian Buschsieweke
1874e63581
Merge pull request #16933 from maribu/backport/2021.10/cpu/avr8_common/bugfix
cpu/{atxmega,atmega_common}: fix invalid use of PSTR() [backport 2021.10]
2021-10-02 13:59:21 +02:00
Marian Buschsieweke
e6353f8e29
cpu/{atxmega,atmega_common}: fix invalid use of PSTR()
core_panic() doesn't expect the message to be in program memory, but
in data memory. Bad things will happen on AVR when the address is
interpreted as being in data address space, but the allocation is
done in program address space.

(cherry picked from commit 35a1b60068d8efadf3beb31b71c9022a5856bdd9)
2021-10-01 21:55:07 +02:00
36 changed files with 479 additions and 66 deletions

View File

@ -139,16 +139,16 @@ jobs:
GITHUB_REPOSITORY=${GITHUB_REPOSITORY} \
GITHUB_RUN_ID=${GITHUB_RUN_ID} \
GITHUB_SERVER_URL=${GITHUB_SERVER_URL} \
APPKEY="${{ secrets.CI_TTN_APPKEY }}" \
NWKSKEY="${{ secrets.CI_TTN_NWKSKEY_ABP }}" \
APPSKEY="${{ secrets.CI_TTN_APPSKEY_ABP }}" \
LORAWAN_DL_KEY="${{ secrets.CI_TTN_APPID_KEY }}" \
DEVEUI="009E40529364FBE6" \
APPEUI="70B3D57ED003B26A" \
DEVADDR="26011EB0" \
TTN_APP_ID="11-lorawan" \
TTN_DEV_ID="riot_lorawan_1" \
TTN_DEV_ID_ABP="riot_lorawan_1_abp" \
APPKEY="${{ secrets.CI_TTN_APPKEY }}" \
NWKSKEY="${{ secrets.CI_TTN_NWKSKEY_ABP }}" \
APPSKEY="${{ secrets.CI_TTN_APPSKEY_ABP }}" \
DEVEUI="70B3D57ED00463E7" \
APPEUI="0000000000000000" \
DEVADDR="260B41C7" \
TTN_DL_KEY="${{ secrets.CI_TTN_DL_KEY }}" \
TTN_APP_ID="release-tests" \
TTN_DEV_ID="eui-70b3d57ed00463e7-otaa" \
TTN_DEV_ID_ABP="eui-70b3d57ed0046d5d-abp" \
RIOTBASE=${RIOTBASE} \
$(which tox) -e test -- ${TOX_ARGS} \
${K} "${{ github.event.inputs.filter }}" -m "${{ matrix.pytest_mark }}"

View File

@ -70,7 +70,11 @@ NIGHTLY=${NIGHTLY:-0}
RUN_TESTS=${RUN_TESTS:-${NIGHTLY}}
DWQ_ENV="-E BOARDS -E APPS -E NIGHTLY -E RUN_TESTS -E ENABLE_TEST_CACHE
-E TEST_HASH -E CI_PULL_LABELS"
-E TEST_HASH -E CI_PULL_LABELS -EPKG_USE_MIRROR"
if [ ${NIGHTLY} -eq 1 ]; then
export PKG_USE_MIRROR=0
fi
get_supported_kconfig_board_app() {
local board=$1

View File

@ -18,7 +18,7 @@ _MOD := $(shell basename $(CURDIR))
MODULE ?= $(_MOD)
.PHONY: all clean $(DIRS:%=ALL--%) $(DIRS:%=CLEAN--%) $(MODULE).module \
compile-commands $(DIRS:%=COMPILE-COMMANDS--%)
compile-commands $(DIRS:%=COMPILE-COMMANDS--%) $(MODULE).cleanup
all: $(MODULE).module ..nothing
@ -113,9 +113,20 @@ include $(RIOTMAKE)/tools/fixdep.inc.mk
$(BINDIR)/$(MODULE)/:
$(Q)mkdir -p $@
OLD_OBJECTS = $(wildcard $(BINDIR)/$(MODULE)/*.o)
# do not clean objects from bindist modules
ifeq (,$(filter $(MODULE),$(BIN_USEMODULE)))
OBJECTS_TO_REMOVE = $(filter-out $(OBJ),$(OLD_OBJECTS))
endif
$(MODULE).module compile-commands $(OBJ): | $(BINDIR)/$(MODULE)/
$(MODULE).module: $(OBJ) | $(DIRS:%=ALL--%)
$(MODULE).module: $(OBJ) $(if $(OBJECTS_TO_REMOVE),$(MODULE).cleanup) | $(DIRS:%=ALL--%)
$(MODULE).cleanup:
$(Q)# cleanup non selected source files objects
$(Q)$(RM) $(OBJECTS_TO_REMOVE)
CXXFLAGS = $(filter-out $(CXXUWFLAGS), $(CFLAGS)) $(CXXEXFLAGS)
CCASFLAGS = $(filter-out $(CCASUWFLAGS), $(CFLAGS)) $(CCASEXFLAGS)

View File

@ -1,5 +1,7 @@
RAM_LEN = 8K
ROM_LEN = 128K
LINKER_SCRIPT ?= avr51.ld
# CPU depends on the atmega common module, so include it
include $(RIOTCPU)/atmega_common/Makefile.include

View File

@ -1,5 +1,7 @@
RAM_LEN = 16K
ROM_LEN = 128K
LINKER_SCRIPT ?= avr51.ld
# CPU depends on the atmega common module, so include it
include $(RIOTCPU)/atmega_common/Makefile.include

View File

@ -1,5 +1,7 @@
RAM_LEN = 16K
ROM_LEN = 128K
LINKER_SCRIPT ?= avr51.ld
# CPU depends on the atmega common module, so include it
include $(RIOTCPU)/atmega_common/Makefile.include

View File

@ -1,5 +1,7 @@
RAM_LEN = 8K
ROM_LEN = 256K
LINKER_SCRIPT ?= avr6.ld
# CPU depends on the atmega common module, so include it
include $(RIOTCPU)/atmega_common/Makefile.include

View File

@ -1,5 +1,7 @@
RAM_LEN = 32K
ROM_LEN = 256K
LINKER_SCRIPT ?= avr6.ld
# CPU depends on the atmega common module, so include it
include $(RIOTCPU)/atmega_common/Makefile.include

View File

@ -1,5 +1,7 @@
RAM_LEN = 2K
ROM_LEN = 32K
LINKER_SCRIPT ?= avr51.ld
# CPU depends on the atmega common module, so include it
include $(RIOTCPU)/atmega_common/Makefile.include

View File

@ -4,5 +4,7 @@ export ATMEGA_COMMON = $(RIOTCPU)/atmega_common/
RAM_LEN = 2560
ROM_LEN = 32K
LINKER_SCRIPT ?= avr51.ld
# CPU depends on the atmega common module, so include it
include $(ATMEGA_COMMON)Makefile.include

View File

@ -26,8 +26,6 @@
* @}
*/
#include <avr/pgmspace.h>
#include "board.h"
#include "cpu.h"
#include "panic.h"
@ -100,8 +98,7 @@ ISR(BADISR_vect)
LED_PANIC;
#endif
core_panic(PANIC_GENERAL_ERROR, PSTR("FATAL ERROR: BADISR_vect called, unprocessed Interrupt.\n"
"STOP Execution.\n"));
core_panic(PANIC_GENERAL_ERROR, "BADISR");
}
#if defined(CPU_ATMEGA128RFA1) || defined (CPU_ATMEGA256RFR2)

View File

@ -44,6 +44,12 @@ ifneq (,$(findstring a1,$(shell echo $(CPU_MODEL) | cut -c8-)))
endif
endif
ifneq (,$(filter atxmega128a1 atxmega128a1u atxmega128a4u,$(CPU_MODEL)))
LINKER_SCRIPT ?= avrxmega7.ld
else
LINKER_SCRIPT ?= avrxmega6.ld
endif
# CPU depends on the avr8 common module, so include it
include $(RIOTCPU)/avr8_common/Makefile.include

View File

@ -18,8 +18,6 @@
* @}
*/
#include <avr/pgmspace.h>
#include "cpu.h"
#include "cpu_clock.h"
#include "cpu_pm.h"
@ -121,7 +119,5 @@ ISR(BADISR_vect)
LED_PANIC;
#endif
core_panic(PANIC_GENERAL_ERROR,
PSTR("FATAL ERROR: BADISR_vect called, unprocessed Interrupt.\n"
"STOP Execution.\n"));
core_panic(PANIC_GENERAL_ERROR, "BADISR");
}

View File

@ -0,0 +1,27 @@
/* Copyright (C) 2014-2021 Free Software Foundation, Inc.
Copying and distribution of this script, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. */
OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr")
OUTPUT_ARCH(avr:51)
__TEXT_REGION_LENGTH__ = DEFINED(__TEXT_REGION_LENGTH__) ? __TEXT_REGION_LENGTH__ : 128K;
__DATA_REGION_LENGTH__ = DEFINED(__DATA_REGION_LENGTH__) ? __DATA_REGION_LENGTH__ : 0xff00;
__EEPROM_REGION_LENGTH__ = DEFINED(__EEPROM_REGION_LENGTH__) ? __EEPROM_REGION_LENGTH__ : 64K;
__FUSE_REGION_LENGTH__ = DEFINED(__FUSE_REGION_LENGTH__) ? __FUSE_REGION_LENGTH__ : 1K;
__LOCK_REGION_LENGTH__ = DEFINED(__LOCK_REGION_LENGTH__) ? __LOCK_REGION_LENGTH__ : 1K;
__SIGNATURE_REGION_LENGTH__ = DEFINED(__SIGNATURE_REGION_LENGTH__) ? __SIGNATURE_REGION_LENGTH__ : 1K;
__USER_SIGNATURE_REGION_LENGTH__ = DEFINED(__USER_SIGNATURE_REGION_LENGTH__) ? __USER_SIGNATURE_REGION_LENGTH__ : 1K;
MEMORY
{
text (rx) : ORIGIN = 0, LENGTH = __TEXT_REGION_LENGTH__
data (rw!x) : ORIGIN = 0x800100, LENGTH = __DATA_REGION_LENGTH__
eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = __EEPROM_REGION_LENGTH__
fuse (rw!x) : ORIGIN = 0x820000, LENGTH = __FUSE_REGION_LENGTH__
lock (rw!x) : ORIGIN = 0x830000, LENGTH = __LOCK_REGION_LENGTH__
signature (rw!x) : ORIGIN = 0x840000, LENGTH = __SIGNATURE_REGION_LENGTH__
user_signatures (rw!x) : ORIGIN = 0x850000, LENGTH = __USER_SIGNATURE_REGION_LENGTH__
}
INCLUDE avr_common.ld

View File

@ -0,0 +1,27 @@
/* Copyright (C) 2014-2021 Free Software Foundation, Inc.
Copying and distribution of this script, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. */
OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr")
OUTPUT_ARCH(avr:6)
__TEXT_REGION_LENGTH__ = DEFINED(__TEXT_REGION_LENGTH__) ? __TEXT_REGION_LENGTH__ : 1024K;
__DATA_REGION_LENGTH__ = DEFINED(__DATA_REGION_LENGTH__) ? __DATA_REGION_LENGTH__ : 0xfe00;
__EEPROM_REGION_LENGTH__ = DEFINED(__EEPROM_REGION_LENGTH__) ? __EEPROM_REGION_LENGTH__ : 64K;
__FUSE_REGION_LENGTH__ = DEFINED(__FUSE_REGION_LENGTH__) ? __FUSE_REGION_LENGTH__ : 1K;
__LOCK_REGION_LENGTH__ = DEFINED(__LOCK_REGION_LENGTH__) ? __LOCK_REGION_LENGTH__ : 1K;
__SIGNATURE_REGION_LENGTH__ = DEFINED(__SIGNATURE_REGION_LENGTH__) ? __SIGNATURE_REGION_LENGTH__ : 1K;
__USER_SIGNATURE_REGION_LENGTH__ = DEFINED(__USER_SIGNATURE_REGION_LENGTH__) ? __USER_SIGNATURE_REGION_LENGTH__ : 1K;
MEMORY
{
text (rx) : ORIGIN = 0, LENGTH = __TEXT_REGION_LENGTH__
data (rw!x) : ORIGIN = 0x800200, LENGTH = __DATA_REGION_LENGTH__
eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = __EEPROM_REGION_LENGTH__
fuse (rw!x) : ORIGIN = 0x820000, LENGTH = __FUSE_REGION_LENGTH__
lock (rw!x) : ORIGIN = 0x830000, LENGTH = __LOCK_REGION_LENGTH__
signature (rw!x) : ORIGIN = 0x840000, LENGTH = __SIGNATURE_REGION_LENGTH__
user_signatures (rw!x) : ORIGIN = 0x850000, LENGTH = __USER_SIGNATURE_REGION_LENGTH__
}
INCLUDE avr_common.ld

View File

@ -0,0 +1,255 @@
/* Copyright (C) 2014-2021 Free Software Foundation, Inc.
Copying and distribution of this script, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. */
SECTIONS
{
/* Read-only sections, merged into text segment: */
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version : { *(.gnu.version) }
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }
.rel.init : { *(.rel.init) }
.rela.init : { *(.rela.init) }
.rel.text :
{
*(.rel.text)
*(.rel.text.*)
*(.rel.gnu.linkonce.t*)
}
.rela.text :
{
*(.rela.text)
*(.rela.text.*)
*(.rela.gnu.linkonce.t*)
}
.rel.fini : { *(.rel.fini) }
.rela.fini : { *(.rela.fini) }
.rel.rodata :
{
*(.rel.rodata)
*(.rel.rodata.*)
*(.rel.gnu.linkonce.r*)
}
.rela.rodata :
{
*(.rela.rodata)
*(.rela.rodata.*)
*(.rela.gnu.linkonce.r*)
}
.rel.data :
{
*(.rel.data)
*(.rel.data.*)
*(.rel.gnu.linkonce.d*)
}
.rela.data :
{
*(.rela.data)
*(.rela.data.*)
*(.rela.gnu.linkonce.d*)
}
.rel.ctors : { *(.rel.ctors) }
.rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
.rela.dtors : { *(.rela.dtors) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { *(.rela.plt) }
/* Internal text space or external memory. */
.text :
{
*(.vectors)
KEEP(*(.vectors))
/* For data that needs to reside in the lower 64k of progmem. */
*(.progmem.gcc*)
/* PR 13812: Placing the trampolines here gives a better chance
that they will be in range of the code that uses them. */
. = ALIGN(2);
__trampolines_start = . ;
/* The jump trampolines for the 16-bit limited relocs will reside here. */
*(.trampolines)
*(.trampolines*)
__trampolines_end = . ;
/* avr-libc expects these data to reside in lower 64K. */
*libprintf_flt.a:*(.progmem.data)
*libc.a:*(.progmem.data)
*(.progmem.*)
. = ALIGN(2);
/* For code that needs to reside in the lower 128k progmem. */
*(.lowtext)
*(.lowtext*)
__ctors_start = . ;
*(.ctors)
__ctors_end = . ;
__dtors_start = . ;
*(.dtors)
__dtors_end = . ;
KEEP(SORT(*)(.ctors))
KEEP(SORT(*)(.dtors))
/* From this point on, we do not bother about whether the insns are
below or above the 16 bits boundary. */
*(.init0) /* Start here after reset. */
KEEP (*(.init0))
*(.init1)
KEEP (*(.init1))
*(.init2) /* Clear __zero_reg__, set up stack pointer. */
KEEP (*(.init2))
*(.init3)
KEEP (*(.init3))
*(.init4) /* Initialize data and BSS. */
KEEP (*(.init4))
*(.init5)
KEEP (*(.init5))
*(.init6) /* C++ constructors. */
KEEP (*(.init6))
*(.init7)
KEEP (*(.init7))
*(.init8)
KEEP (*(.init8))
*(.init9) /* Call main(). */
KEEP (*(.init9))
*(.text)
. = ALIGN(2);
*(.text.*)
. = ALIGN(2);
*(.fini9) /* _exit() starts here. */
KEEP (*(.fini9))
*(.fini8)
KEEP (*(.fini8))
*(.fini7)
KEEP (*(.fini7))
*(.fini6) /* C++ destructors. */
KEEP (*(.fini6))
*(.fini5)
KEEP (*(.fini5))
*(.fini4)
KEEP (*(.fini4))
*(.fini3)
KEEP (*(.fini3))
*(.fini2)
KEEP (*(.fini2))
*(.fini1)
KEEP (*(.fini1))
*(.fini0) /* Infinite loop after program termination. */
KEEP (*(.fini0))
/* For code that needs not to reside in the lower progmem. */
*(.hightext)
*(.hightext*)
*(.progmemx.*)
. = ALIGN(2);
/* For tablejump instruction arrays. We do not relax
JMP / CALL instructions within these sections. */
*(.jumptables)
*(.jumptables*)
_etext = . ;
} > text
.data :
{
PROVIDE (__data_start = .) ;
*(.data)
*(.data*)
/* Changes for XFA */
KEEP (*(SORT(.roxfa.*)))
KEEP (*(SORT(.xfa.*)))
/* End of Changes for XFA*/
*(.gnu.linkonce.d*)
*(.rodata) /* We need to include .rodata here if gcc is used */
*(.rodata*) /* with -fdata-sections. */
*(.gnu.linkonce.r*)
. = ALIGN(2);
_edata = . ;
PROVIDE (__data_end = .) ;
} > data AT> text
.bss ADDR(.data) + SIZEOF (.data) : AT (ADDR (.bss))
{
PROVIDE (__bss_start = .) ;
*(.bss)
*(.bss*)
*(COMMON)
PROVIDE (__bss_end = .) ;
} > data
__data_load_start = LOADADDR(.data);
__data_load_end = __data_load_start + SIZEOF(.data);
/* Global data not cleared after reset. */
.noinit ADDR(.bss) + SIZEOF (.bss) : AT (ADDR (.noinit))
{
PROVIDE (__noinit_start = .) ;
*(.noinit .noinit.* .gnu.linkonce.n.*)
PROVIDE (__noinit_end = .) ;
_end = . ;
PROVIDE (__heap_start = .) ;
} > data
.eeprom :
{
/* See .data above... */
KEEP(*(.eeprom*))
__eeprom_end = . ;
} > eeprom
.fuse :
{
KEEP(*(.fuse))
KEEP(*(.lfuse))
KEEP(*(.hfuse))
KEEP(*(.efuse))
} > fuse
.lock :
{
KEEP(*(.lock*))
} > lock
.signature :
{
KEEP(*(.signature*))
} > signature
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
.note.gnu.build-id : { *(.note.gnu.build-id) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1. */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions. */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2. */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2. */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions. */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* DWARF 3. */
.debug_pubtypes 0 : { *(.debug_pubtypes) }
.debug_ranges 0 : { *(.debug_ranges) }
/* DWARF 5. */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.debug_sup 0 : { *(.debug_sup) }
}

View File

@ -0,0 +1,27 @@
/* Copyright (C) 2014-2021 Free Software Foundation, Inc.
Copying and distribution of this script, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. */
OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr")
OUTPUT_ARCH(avr:106)
__TEXT_REGION_LENGTH__ = DEFINED(__TEXT_REGION_LENGTH__) ? __TEXT_REGION_LENGTH__ : 1024K;
__DATA_REGION_LENGTH__ = DEFINED(__DATA_REGION_LENGTH__) ? __DATA_REGION_LENGTH__ : 0xffa0;
__EEPROM_REGION_LENGTH__ = DEFINED(__EEPROM_REGION_LENGTH__) ? __EEPROM_REGION_LENGTH__ : 64K;
__FUSE_REGION_LENGTH__ = DEFINED(__FUSE_REGION_LENGTH__) ? __FUSE_REGION_LENGTH__ : 1K;
__LOCK_REGION_LENGTH__ = DEFINED(__LOCK_REGION_LENGTH__) ? __LOCK_REGION_LENGTH__ : 1K;
__SIGNATURE_REGION_LENGTH__ = DEFINED(__SIGNATURE_REGION_LENGTH__) ? __SIGNATURE_REGION_LENGTH__ : 1K;
__USER_SIGNATURE_REGION_LENGTH__ = DEFINED(__USER_SIGNATURE_REGION_LENGTH__) ? __USER_SIGNATURE_REGION_LENGTH__ : 1K;
MEMORY
{
text (rx) : ORIGIN = 0, LENGTH = __TEXT_REGION_LENGTH__
data (rw!x) : ORIGIN = 0x802000, LENGTH = __DATA_REGION_LENGTH__
eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = __EEPROM_REGION_LENGTH__
fuse (rw!x) : ORIGIN = 0x820000, LENGTH = __FUSE_REGION_LENGTH__
lock (rw!x) : ORIGIN = 0x830000, LENGTH = __LOCK_REGION_LENGTH__
signature (rw!x) : ORIGIN = 0x840000, LENGTH = __SIGNATURE_REGION_LENGTH__
user_signatures (rw!x) : ORIGIN = 0x850000, LENGTH = __USER_SIGNATURE_REGION_LENGTH__
}
INCLUDE avr_common.ld

View File

@ -0,0 +1,27 @@
/* Copyright (C) 2014-2021 Free Software Foundation, Inc.
Copying and distribution of this script, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. */
OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr")
OUTPUT_ARCH(avr:107)
__TEXT_REGION_LENGTH__ = DEFINED(__TEXT_REGION_LENGTH__) ? __TEXT_REGION_LENGTH__ : 1024K;
__DATA_REGION_LENGTH__ = DEFINED(__DATA_REGION_LENGTH__) ? __DATA_REGION_LENGTH__ : 0xffa0;
__EEPROM_REGION_LENGTH__ = DEFINED(__EEPROM_REGION_LENGTH__) ? __EEPROM_REGION_LENGTH__ : 64K;
__FUSE_REGION_LENGTH__ = DEFINED(__FUSE_REGION_LENGTH__) ? __FUSE_REGION_LENGTH__ : 1K;
__LOCK_REGION_LENGTH__ = DEFINED(__LOCK_REGION_LENGTH__) ? __LOCK_REGION_LENGTH__ : 1K;
__SIGNATURE_REGION_LENGTH__ = DEFINED(__SIGNATURE_REGION_LENGTH__) ? __SIGNATURE_REGION_LENGTH__ : 1K;
__USER_SIGNATURE_REGION_LENGTH__ = DEFINED(__USER_SIGNATURE_REGION_LENGTH__) ? __USER_SIGNATURE_REGION_LENGTH__ : 1K;
MEMORY
{
text (rx) : ORIGIN = 0, LENGTH = __TEXT_REGION_LENGTH__
data (rw!x) : ORIGIN = 0x802000, LENGTH = __DATA_REGION_LENGTH__
eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = __EEPROM_REGION_LENGTH__
fuse (rw!x) : ORIGIN = 0x820000, LENGTH = __FUSE_REGION_LENGTH__
lock (rw!x) : ORIGIN = 0x830000, LENGTH = __LOCK_REGION_LENGTH__
signature (rw!x) : ORIGIN = 0x840000, LENGTH = __SIGNATURE_REGION_LENGTH__
user_signatures (rw!x) : ORIGIN = 0x850000, LENGTH = __USER_SIGNATURE_REGION_LENGTH__
}
INCLUDE avr_common.ld

View File

@ -1,16 +0,0 @@
SECTIONS
{
.data :
{
/* Special case for AVR (Harvard architecture) where .rodata is merged
* into .data by the toolchain default ldscripts. */
KEEP (*(SORT(.roxfa.*)))
KEEP (*(SORT(.xfa.*)))
}
__data_start = ADDR(.data);
__data_load_start = LOADADDR(.data);
__data_end = (__data_start + SIZEOF(.data));
__data_load_end = (__data_load_start + SIZEOF(.data));
}
INSERT AFTER .text;

View File

@ -150,8 +150,8 @@ extern volatile int _native_sigpend;
extern volatile int _native_in_isr;
extern volatile int _native_in_syscall;
extern char __isr_stack[SIGSTKSZ];
extern char __end_stack[SIGSTKSZ];
extern char __isr_stack[];
extern char __end_stack[];
extern ucontext_t native_isr_context;
extern ucontext_t end_context;
extern ucontext_t *_native_cur_ctx, *_native_isr_ctx;

View File

@ -170,7 +170,7 @@ void cpu_switch_context_exit(void)
irq_disable();
_native_in_isr = 1;
native_isr_context.uc_stack.ss_sp = __isr_stack;
native_isr_context.uc_stack.ss_size = sizeof(__isr_stack);
native_isr_context.uc_stack.ss_size = SIGSTKSZ;
native_isr_context.uc_stack.ss_flags = 0;
makecontext(&native_isr_context, isr_cpu_switch_context_exit, 0);
if (setcontext(&native_isr_context) == -1) {

View File

@ -14,6 +14,7 @@ class MockSpawn():
# set some expected attributes
self.before = None
self.echo = False
self.expect_res = 0
@property
def last_command(self):
@ -42,6 +43,9 @@ class MockSpawn():
# always match on prompt with replwrap
return 0
def expect(self, *args, **kwargs):
return self.expect_res
class MockRIOTCtrl():
"""

View File

@ -151,6 +151,9 @@ void ieee802154_submac_ack_timer_cancel(ieee802154_submac_t *submac)
submac);
xtimer_remove(&netdev_submac->ack_timer);
/* Prevent a race condition between the RX_DONE event and the ACK timeout */
netdev_submac->isr_flags &= ~NETDEV_SUBMAC_FLAGS_ACK_TIMEOUT;
}
static int _send(netdev_t *netdev, const iolist_t *pkt)

View File

@ -11,6 +11,11 @@ DEVEUI ?= 0000000000000000
APPEUI ?= 0000000000000000
APPKEY ?= 00000000000000000000000000000000
# Pass these enviroment variables to docker
DOCKER_ENV_VARS += DEVEUI
DOCKER_ENV_VARS += APPEUI
DOCKER_ENV_VARS += APPKEY
# Default radio driver is Semtech SX1276 (used by the B-L072Z-LRWAN1 board)
DRIVER ?= sx1276

View File

@ -17,10 +17,9 @@ CFLAGS_OPT ?= -Os
CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG)
# needed for xfa support. Order is important.
LINKFLAGS += -T$(RIOTCPU)/avr8_common/ldscripts/xfa.ld
LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -static -lgcc -e reset_handler -Wl,--gc-sections
LINKFLAGS += -L$(RIOTCPU)/avr8_common/ldscripts
LINKFLAGS += -T$(LINKER_SCRIPT)
# Use ROM_LEN and RAM_LEN during link
$(if $(ROM_LEN),,$(error ROM_LEN is not defined))

View File

@ -21,6 +21,7 @@ export CXXINCLUDES # The extra include paths for c++, set by the vario
export NATIVEINCLUDES # The native include paths, set by the various native Makefile.include files.
export USEMODULE # Sys Module dependencies of the application. Set in the application's Makefile.
export BIN_USEMODULE # Modules specific to bindist (see bindist.ink.mk). Set in the application's Makefile.
export USEPKG # Pkg dependencies (third party modules) of the application. Set in the application's Makefile.
export DISABLE_MODULE # Used in the application's Makefile to suppress DEFAULT_MODULEs.
# APPDEPS # Files / Makefile targets that need to be created before the application can be build. Set in the application's Makefile.

View File

@ -24,6 +24,12 @@ ifeq (,$(PKG_LICENSE))
$(error PKG_LICENSE not defined)
endif
ifneq (, $(PKG_MIRROR_URL))
ifneq (0, $(PKG_USE_MIRROR))
PKG_URL = $(PKG_MIRROR_URL)
endif
endif
PKG_DIR ?= $(CURDIR)
PKG_PATCH_DIR ?= $(PKG_DIR)/patches

View File

@ -698,10 +698,11 @@ void *_semtech_loramac_event_loop(void *arg)
MlmeIndication_t *indication = (MlmeIndication_t *)msg.content.ptr;
if (indication->MlmeIndication == MLME_SCHEDULE_UPLINK) {
DEBUG("[semtech-loramac] MLME indication: schedule an uplink\n");
uint8_t prev_port = mac->port;
mac->port = 0;
_semtech_loramac_send(mac, NULL, 0);
mac->port = prev_port;
#ifdef MODULE_SEMTECH_LORAMAC_RX
msg_t msg_ret;
msg_ret.content.value = SEMTECH_LORAMAC_TX_SCHEDULE;
msg_send(&msg_ret, mac->rx_pid);
#endif
}
break;
}
@ -787,18 +788,8 @@ void *_semtech_loramac_event_loop(void *arg)
/* Check Multicast
Check Port
Check Datarate
Check FramePending */
if (indication->FramePending) {
/* The server signals that it has pending data to be sent.
We schedule an uplink as soon as possible to flush the server. */
DEBUG("[semtech-loramac] MCPS indication: pending data, schedule an "
"uplink\n");
uint8_t prev_port = mac->port;
mac->port = 0;
_semtech_loramac_send(mac, NULL, 0);
mac->port = prev_port;
}
Check Datarate */
#ifdef MODULE_SEMTECH_LORAMAC_RX
if (indication->RxData) {
DEBUG("[semtech-loramac] MCPS indication: data received\n");

View File

@ -1,5 +1,6 @@
PKG_NAME=yxml
PKG_URL=https://g.blicky.net/yxml.git
PKG_MIRROR_URL=https://github.com/RIOT-OS-pkgmirror/yxml.git
PKG_VERSION=f9438757fc49b9f86961ddb55ae430e36bb88ebb
PKG_LICENSE=MIT

View File

@ -38,6 +38,9 @@ extern "C" {
#ifndef CONFIG_GNRC_IPV6_NIB_SLAAC
#define CONFIG_GNRC_IPV6_NIB_SLAAC 1
#endif
#ifndef CONFIG_GNRC_IPV6_NIB_QUEUE_PKT
#define CONFIG_GNRC_IPV6_NIB_QUEUE_PKT 1
#endif
#ifndef CONFIG_GNRC_IPV6_NIB_NUMOF
#define CONFIG_GNRC_IPV6_NIB_NUMOF (16)
#endif

View File

@ -544,7 +544,9 @@ ieee802154_fsm_state_t ieee802154_submac_process_ev(ieee802154_submac_t *submac,
*
* This function must be called when the ACK timeout timer fires.
*
* @note this function should not be called inside ISR context.
* @note this function should not be called inside ISR context and MUST NOT
* be invoked if @ref ieee802154_submac_ack_timer_cancel was already
* called.
*
* @param[in] submac pointer to the SubMAC descriptor
*/

View File

@ -473,6 +473,8 @@ static inline uint32_t _irt_ms(uint16_t irt, bool greater_irt)
if (greater_irt && (factor < 0)) {
factor = -factor;
}
/* random factor is also in ms, but it is supposed to be without unit,
* so we need to divide by ms */
irt_ms += (factor * irt_ms) / MS_PER_SEC;
return irt_ms;
}
@ -480,12 +482,18 @@ static inline uint32_t _irt_ms(uint16_t irt, bool greater_irt)
static inline uint32_t _sub_rt_ms(uint32_t rt_prev_ms, uint16_t mrt)
{
uint32_t sub_rt_ms = (2 * rt_prev_ms) +
((get_rand_ms_factor() * rt_prev_ms) / MS_PER_SEC);
/* random factor is also in ms, but it is supposed to
* be without unit, so we need to divide by ms */
((int32_t)(get_rand_ms_factor() * rt_prev_ms) /
(int32_t)MS_PER_SEC);
if (sub_rt_ms > (mrt * MS_PER_SEC)) {
uint32_t mrt_ms = mrt * MS_PER_SEC;
sub_rt_ms = mrt_ms + ((get_rand_ms_factor() * mrt_ms) / MS_PER_SEC);
/* random factor is also in ms, but it is supposed to be without unit,
* so we need to divide by ms */
sub_rt_ms = mrt_ms + ((int32_t)(get_rand_ms_factor() * mrt_ms) /
(int32_t)MS_PER_SEC);
}
return sub_rt_ms;
}

View File

@ -47,6 +47,7 @@ config GNRC_IPV6_NIB_QUEUE_PKT
config GNRC_IPV6_NIB_ARSM
bool "Use classic NDP address resolution state-machine"
default y if USEMODULE_GNRC_IPV6_NIB_6LBR
default n if USEMODULE_GNRC_IPV6_NIB_6LN && !GNRC_IPV6_NIB_6LR
default y

View File

@ -235,11 +235,17 @@ static int picolibc_get(FILE *file)
FILE picolibc_stdio =
FDEV_SETUP_STREAM(picolibc_put, picolibc_get, picolibc_flush, _FDEV_SETUP_RW);
#ifdef PICOLIBC_STDIO_GLOBALS
FILE *const stdout = &picolibc_stdio;
FILE *const stdin = &picolibc_stdio;
FILE *const stderr = &picolibc_stdio;
#else
FILE *const __iob[] = {
&picolibc_stdio, /* stdin */
&picolibc_stdio, /* stdout */
&picolibc_stdio, /* stderr */
&picolibc_stdio, /* stdin */
&picolibc_stdio, /* stdout */
&picolibc_stdio, /* stderr */
};
#endif
#include <thread.h>
/**

View File

@ -139,6 +139,10 @@ void ieee802154_submac_ack_timer_cancel(ieee802154_submac_t *submac)
{
(void)submac;
ztimer_remove(ZTIMER_USEC, &ack_timer);
/* Avoid race conditions between RX_DONE and ACK_TIMEOUT */
if (ev_ack_timeout.list_node.next) {
event_cancel(EVENT_PRIO_HIGHEST, &ev_ack_timeout);
}
}
static void _ack_timeout(void *arg)

View File

@ -60,6 +60,10 @@ static void *_wait_recv(void *arg)
puts("Received ACK from network");
break;
case SEMTECH_LORAMAC_TX_SCHEDULE:
puts("The Network Server has pending data");
break;
default:
break;
}