Skip to content

Commit

Permalink
fixup! boards/mega-xplained: remove context swap defines
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Blue committed Apr 27, 2018
2 parents 94634e7 + b522d5e commit 0a7b87b
Show file tree
Hide file tree
Showing 652 changed files with 61,439 additions and 2,680 deletions.
5 changes: 4 additions & 1 deletion .murdock
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export DLCACHE_DIR=${DLCACHE_DIR:-~/.dlcache}
NIGHTLY=${NIGHTLY:-0}
RUN_TESTS=${RUN_TESTS:-${NIGHTLY}}

DWQ_ENV="-E BOARDS -E APPS -E NIGHTLY -E RUN_TESTS"

check_label() {
local label="${1}"
[ -z "${CI_PULL_LABELS}" ] && return 1
Expand Down Expand Up @@ -87,7 +89,7 @@ get_app_board_pairs() {
# use dwqc to create full "appdir board" compile job list
get_compile_jobs() {
get_apps | \
dwqc -E BOARDS -E APPS -s \
dwqc ${DWQ_ENV} -s \
"$0 get_app_board_pairs \${1}" \
| xargs '-d\n' -n 1 echo $0 compile
}
Expand Down Expand Up @@ -160,6 +162,7 @@ test_job() {
}

dwqc \
${DWQ_ENV} \
${DWQ_JOBID:+--subjob} \
--file $flashfile:$appdir/bin/${board}/$(basename $flashfile) \
--queue ${TEST_QUEUE:-$board} \
Expand Down
27 changes: 26 additions & 1 deletion Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,6 @@ endif

ifneq (,$(filter arduino,$(USEMODULE)))
FEATURES_REQUIRED += arduino
FEATURES_REQUIRED += cpp
USEMODULE += xtimer
endif

Expand Down Expand Up @@ -698,6 +697,32 @@ ifneq (,$(filter benchmark,$(USEMODULE)))
USEMODULE += xtimer
endif

ifneq (,$(filter skald_%,$(USEMODULE)))
USEMODULE += skald
endif

ifneq (,$(filter skald,$(USEMODULE)))
FEATURES_REQUIRED += radio_ble
USEMODULE += xtimer
USEMODULE += random
endif

ifneq (,$(filter rdcli_simple_standalone,$(USEMODULE)))
USEMODULE += rdcli_simple
USEMODULE += xtimer
endif

ifneq (,$(filter rdcli_simple,$(USEMODULE)))
USEMODULE += rdcli_common
USEMODULE += fmt
endif

ifneq (,$(filter rdcli_common,$(USEMODULE)))
USEMODULE += fmt
USEMODULE += gcoap
USEMODULE += luid
endif

# always select gpio (until explicit dependencies are sorted out)
FEATURES_OPTIONAL += periph_gpio

Expand Down
60 changes: 46 additions & 14 deletions Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,21 @@ BASELIBS += $(BINDIR)/$(APPLICATION_MODULE).a
BASELIBS += $(APPDEPS)

.PHONY: all link clean flash flash-only term doc debug debug-server reset objdump help info-modules
.PHONY: print-size elffile binfile hexfile
.PHONY: ..in-docker-container
# Target can depend on FORCE to always rebuild but still let make use file
# modification timestamp (contrary to .PHONY).
# Use it for goals that may keep outputs unchanged when executed.
.PHONY: FORCE

ELFFILE ?= $(BINDIR)/$(APPLICATION).elf
HEXFILE ?= $(ELFFILE:.elf=.hex)
BINFILE ?= $(ELFFILE:.elf=.bin)

# Targets to get given file
elffile: $(ELFFILE)
hexfile: $(HEXFILE)
binfile: $(BINFILE)

# variables used to compile and link c++
CPPMIX ?= $(if $(wildcard *.cpp),1,)
Expand All @@ -321,23 +332,44 @@ LINKFLAGPREFIX ?= -Wl,

DIRS += $(EXTERNAL_MODULE_DIRS)

_LINK = $(if $(CPPMIX),$(LINKXX),$(LINK)) $(UNDEF) $(LINKFLAGPREFIX)--start-group $(BASELIBS) -lm $(LINKFLAGPREFIX)--end-group $(LINKFLAGPREFIX)-Map=$(BINDIR)/$(APPLICATION).map $(LINKFLAGS)
# Linker rule
$(ELFFILE): FORCE
ifeq ($(BUILDOSXNATIVE),1)
_LINK = $(if $(CPPMIX),$(LINKXX),$(LINK)) $(UNDEF) $$(find $(BASELIBS) -size +8c) $(LINKFLAGS) $(LINKFLAGPREFIX)-no_pie
else
_LINK = $(if $(CPPMIX),$(LINKXX),$(LINK)) $(UNDEF) $(LINKFLAGPREFIX)--start-group $(BASELIBS) -lm $(LINKFLAGPREFIX)--end-group $(LINKFLAGS) $(LINKFLAGPREFIX)-Map=$(BINDIR)/$(APPLICATION).map
endif # BUILDOSXNATIVE

ifeq ($(BUILD_IN_DOCKER),1)
link: ..in-docker-container
else
## make script for your application. Build RIOT-base here!
link: ..compiler-check ..build-message $(RIOTBUILD_CONFIG_HEADER_C) $(USEPKG:%=$(BINDIR)/%.a) $(APPDEPS)
$(Q)DIRS="$(DIRS)" "$(MAKE)" -C $(APPDIR) -f $(RIOTMAKE)/application.inc.mk
ifeq (,$(RIOTNOLINK))
ifeq ($(BUILDOSXNATIVE),1)
$(Q)$(if $(CPPMIX),$(LINKXX),$(LINK)) $(UNDEF) -o $(ELFFILE) $$(find $(BASELIBS) -size +8c) $(LINKFLAGS) $(LINKFLAGPREFIX)-no_pie
link: ..compiler-check ..build-message $(ELFFILE) $(HEXFILE) print-size
else
$(Q)$(_LINK) -o $(ELFFILE)
endif
$(Q)$(SIZE) $(ELFFILE)
$(Q)$(OBJCOPY) $(OFLAGS) $(ELFFILE) $(HEXFILE)
endif
link: ..compiler-check ..build-message $(BASELIBS)
endif # RIOTNOLINK

$(ELFFILE): $(BASELIBS)
$(Q)$(_LINK) -o $@

$(BINDIR)/$(APPLICATION_MODULE).a: $(RIOTBUILD_CONFIG_HEADER_C) $(USEPKG:%=$(BINDIR)/%.a) $(APPDEPS)
$(Q)DIRS="$(DIRS)" "$(MAKE)" -C $(APPDIR) -f $(RIOTMAKE)/application.inc.mk
$(BINDIR)/$(APPLICATION_MODULE).a: FORCE

# Other modules are built by application.inc.mk and packages building
_SUBMAKE_LIBS = $(filter-out $(BINDIR)/$(APPLICATION_MODULE).a $(USEPKG:%=$(BINDIR)/%.a) $(APPDEPS), $(BASELIBS))
$(_SUBMAKE_LIBS): $(BINDIR)/$(APPLICATION_MODULE).a $(USEPKG:%=$(BINDIR)/%.a)

# 'print-size' triggers a rebuild. Use 'info-buildsize' if you do not need to rebuild.
print-size: $(ELFFILE)
$(Q)$(SIZE) $(SIZEFLAGS) $<

%.hex: %.elf
$(Q)$(OBJCOPY) $(OFLAGS) -Oihex $< $@

%.bin: %.elf
$(Q)$(OBJCOPY) $(OFLAGS) -Obinary $< $@

endif # BUILD_IN_DOCKER

# Check given command is available in the path
Expand Down Expand Up @@ -486,11 +518,11 @@ ifneq (, $(filter all, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)))
EXPECT_ERRORS := 1
endif

# Test if any required feature conflict with another one.
CONFLICT := $(foreach var,$(FEATURES_CONFLICT),$(if $(filter $(words $(subst :, ,$(var))),$(words $(filter $(FEATURES_REQUIRED),$(subst :, ,$(var))))),$(subst :, ,$(var))))
# Test if any used feature conflict with another one.
CONFLICT := $(foreach var,$(FEATURES_CONFLICT),$(if $(filter $(words $(subst :, ,$(var))),$(words $(filter $(FEATURES_USED),$(subst :, ,$(var))))),$(subst :, ,$(var))))
ifneq (, $(strip $(CONFLICT)))
$(shell $(COLOR_ECHO) "$(COLOR_YELLOW)The following features may conflict:$(COLOR_RESET)"\
"$(COLOR_GREEN)$(sort $(filter $(FEATURES_REQUIRED), $(CONFLICT)))$(COLOR_RESET)" 1>&2)
"$(COLOR_GREEN)$(sort $(filter $(FEATURES_USED), $(CONFLICT)))$(COLOR_RESET)" 1>&2)
ifneq (, $(FEATURES_CONFLICT_MSG))
$(shell $(COLOR_ECHO) "$(COLOR_YELLOW)Rationale: $(COLOR_RESET)$(FEATURES_CONFLICT_MSG)" 1>&2)
endif
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![Nightly CI status master][master-ci-badge]][master-ci-link]
[![IRC][irc-badge]][irc-link]

ZZZZZZ
ZZZZZZZZZZZZ
ZZZZZZZZZZZZZZZZ
Expand Down Expand Up @@ -27,7 +30,7 @@
The friendly Operating System for IoT!

RIOT is a real-time multi-threading operating system that supports a range of
devices that are typically found in the Internet of Things (IoT):
devices that are typically found in the Internet of Things (IoT):
8-bit, 16-bit and 32-bit microcontrollers.

RIOT is based on the following design principles: energy-efficiency, real-time
Expand Down Expand Up @@ -110,3 +113,9 @@ All code files contain licensing information.
For more information, see the RIOT website:

http://www.riot-os.org


[master-ci-badge]: https://ci.riot-os.org/RIOT-OS/RIOT/master/latest/badge.svg
[master-ci-link]: https://ci.riot-os.org/RIOT-OS/RIOT/master/latest/output.html
[irc-badge]: https://img.shields.io/badge/IRC-join%20chat%20%E2%86%92-blue.svg
[irc-link]: http://webchat.freenode.net?channels=%23riot-os
2 changes: 1 addition & 1 deletion boards/arduino-mkr1000/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extern "C" {
#define ARDUINO_LED (6U)

/**
* @brief LED pin definitions and handlers
* @name LED pin definitions and handlers
* @{
*/
#define LED0_PIN GPIO_PIN(PA, 20)
Expand Down
3 changes: 3 additions & 0 deletions boards/b-l072z-lrwan1/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ include $(RIOTMAKE)/tools/serial.inc.mk
export DEBUG_ADAPTER ?= stlink
export STLINK_VERSION ?= 2-1

# call a 'reset halt' command before starting the debugger
export OPENOCD_DBG_START_CMD = -c 'reset halt'

# this board uses openocd
include $(RIOTMAKE)/tools/openocd.inc.mk
3 changes: 1 addition & 2 deletions boards/bluepill/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ ifeq ($(PROGRAMMER),dfu-util)
export DEBUGGER = # no debugger
export RESET = # dfu-util has no support for resetting the device

export OFLAGS = -O binary
HEXFILE = $(ELFFILE:.elf=.bin)
HEXFILE = $(BINFILE)
export FFLAGS = -d 1d50:6017 -s 0x08002000:leave -D "$(HEXFILE)"
else

Expand Down
1 change: 1 addition & 0 deletions boards/calliope-mini/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_rtt
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart
FEATURES_PROVIDED += periph_pwm

# Various other features (if any)
FEATURES_PROVIDED += radio_nrfmin
Expand Down
1 change: 0 additions & 1 deletion boards/calliope-mini/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ include $(RIOTMAKE)/tools/serial.inc.mk
# we support flashing through plain fscopy or using JLink
PROGRAMMER ?= fscopy
ifeq (fscopy,$(PROGRAMMER))
export OFLAGS = -O ihex
export FFLAGS =
export DEBUGGER_FLAGS =

Expand Down
16 changes: 9 additions & 7 deletions boards/calliope-mini/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,11 @@ static const timer_conf_t timer_config[] = {
.channels = 3,
.bitmode = TIMER_BITMODE_BITMODE_16Bit,
.irqn = TIMER1_IRQn
},
{
.dev = NRF_TIMER2,
.channels = 3,
.bitmode = TIMER_BITMODE_BITMODE_16Bit,
.irqn = TIMER2_IRQn
}
};

#define TIMER_0_ISR isr_timer0
#define TIMER_1_ISR isr_timer1
#define TIMER_2_ISR isr_timer2

#define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
/** @} */
Expand Down Expand Up @@ -129,6 +122,15 @@ static const i2c_conf_t i2c_config[] = {
#define RADIO_IRQ_PRIO 1
/** @} */

/**
* @name PWM configuration
* @{
*/
#define PWM_NUMOF (1U)
#define PWM_TIMER NRF_TIMER2
#define PWM_PIN (0U)
/** @} */

#ifdef __cplusplus
}
#endif
Expand Down
4 changes: 2 additions & 2 deletions boards/cc2538dk/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ else ifeq ($(PROGRAMMER),jlink)
export FFLAGS = $(BINDIR) $(HEXFILE)
endif

export OFLAGS = -O binary --gap-fill 0xff
export HEXFILE = $(ELFFILE:.elf=.bin)
OFLAGS = --gap-fill 0xff
HEXFILE = $(BINFILE)
export DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE)
export RESET_FLAGS = $(BINDIR)

Expand Down
1 change: 0 additions & 1 deletion boards/chronos/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export CPU = cc430
export CPU_MODEL = cc430f6137

# flasher configuration
export OFLAGS = -O ihex
export FLASHER = mspdebug
export FFLAGS = rf2500 "prog $(HEXFILE)"

Expand Down
2 changes: 1 addition & 1 deletion boards/chronos/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extern "C" {
#endif

/**
* @name Define the CPU model for the <msp430.h>
* @brief Define the CPU model for the <msp430.h>
*/
#ifndef __CC430F6137__
#define __CC430F6137__
Expand Down
4 changes: 3 additions & 1 deletion boards/common/arduino-atmega/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart

# Various other features (if any)
FEATURES_PROVIDED += arduino
ifeq (,$(filter jiminy-mega256rfr2,$(BOARD)))
FEATURES_PROVIDED += arduino
endif

# The board MPU family (used for grouping by the CI system)
FEATURES_MCU_GROUP = avr8
2 changes: 1 addition & 1 deletion boards/common/arduino-atmega/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ export DEBUGGER = $(DIST_PATH)/debug.sh $(DEBUGSERVER_FLAGS) $(DIST_PATH) $(DEBU

export PROGRAMMER_FLAGS = -P $(PORT) -b $(PROGRAMMER_SPEED)

export OFLAGS += -j .text -j .data -O ihex
OFLAGS += -j .text -j .data
export FFLAGS += -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -F -D -U flash:w:$(HEXFILE)
5 changes: 3 additions & 2 deletions boards/common/arduino-atmega/include/arduino_pinmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ extern "C" {
#endif

/**
* @brief Mapping of MCU pins to Arduino pins
* @name Mapping of MCU pins to Arduino pins
*
* @note ISCP pins are not mapped.
* @{
*/

/* Digital pins */
Expand Down Expand Up @@ -158,7 +159,6 @@ extern "C" {
#define ARDUINO_PIN_A14 ARDUINO_PIN_68
#define ARDUINO_PIN_A15 ARDUINO_PIN_69
#endif
/** @ */

#define ARDUINO_A0 ADC_LINE(0)
#define ARDUINO_A1 ADC_LINE(1)
Expand All @@ -178,6 +178,7 @@ extern "C" {
#define ARDUINO_A14 ADC_LINE(14)
#define ARDUINO_A15 ADC_LINE(15)
#endif
/** @} */

#ifdef __cplusplus
}
Expand Down
2 changes: 1 addition & 1 deletion boards/common/arduino-due/include/arduino_pinmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ extern "C" {
#define ARDUINO_PIN_76 GPIO_PIN(PA, 27)
#define ARDUINO_PIN_77 GPIO_PIN(PA, 28)
#define ARDUINO_PIN_78 GPIO_PIN(PB, 23)
/** @ */
/** @} */

/**
* @name Mapping of Arduino analog pins to RIOT ADC lines
Expand Down
1 change: 0 additions & 1 deletion boards/common/msb-430/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
include $(RIOTMAKE)/tools/serial.inc.mk

# setup flash tool
export OFLAGS = -O ihex
export PROGRAMMER ?= olimex
export MSPDEBUGFLAGS += -j $(PROGRAMMER)
ifeq ($(strip $(PROGRAMMER)),uif)
Expand Down
2 changes: 0 additions & 2 deletions boards/common/msba2/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export FFLAGS = $(PORT) $(HEXFILE)
INCLUDES += -I$(RIOTBOARD)/common/msba2/include
INCLUDES += -I$(RIOTBOARD)/common/msba2/drivers/include

export OFLAGS = -O ihex

export UNDEF += $(BINDIR)/cpu/startup.o

USEMODULE += boards_common_msba2-drivers
4 changes: 4 additions & 0 deletions boards/common/nrf52xxxdk/Makefile.dep
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
endif

ifneq (,$(filter skald,$(USEMODULE)))
USEMODULE += nrfble
endif
2 changes: 2 additions & 0 deletions boards/common/nrf52xxxdk/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart

# Various other features (if any)
FEATURES_PROVIDED += radio_ble
FEATURES_PROVIDED += radio_nrfble
FEATURES_PROVIDED += radio_nrfmin

# The board MPU family (used for grouping by the CI system)
Expand Down
2 changes: 1 addition & 1 deletion boards/common/nucleo/include/board_nucleo.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extern "C" {
#endif

#if defined(CPU_FAM_STM32F4) || defined(CPU_MODEL_STM32F303ZE)
#define XTIMER_BACKOFF (5)
#define XTIMER_BACKOFF (8)
#define XTIMER_OVERHEAD (6)
#endif
/** @} */
Expand Down
2 changes: 1 addition & 1 deletion boards/common/nucleo144/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ extern "C" {
/** @} */

/**
* @brief User button
* @name User button
* @{
*/
#define BTN0_PIN GPIO_PIN(PORT_C, 13)
Expand Down
Loading

0 comments on commit 0a7b87b

Please sign in to comment.