From e7f2e04a6aa13a32c68441502a5ba7346cf27519 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Tue, 18 Nov 2014 18:10:15 +0100 Subject: [PATCH 1/2] cpu/sam3x8e: made _kill(_r) syscalls weak --- cpu/sam3x8e/syscalls.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/cpu/sam3x8e/syscalls.c b/cpu/sam3x8e/syscalls.c index f060896592f9..3daae2d46201 100644 --- a/cpu/sam3x8e/syscalls.c +++ b/cpu/sam3x8e/syscalls.c @@ -156,7 +156,8 @@ pid_t _getpid(void) * * @return TODO */ -int _kill_r(struct _reent *r, pid_t pid, int sig) +__attribute__ ((weak)) +int _kill_r(struct _reent *r, int pid, int sig) { r->_errno = ESRCH; /* not implemented yet */ return -1; @@ -323,3 +324,18 @@ int _unlink_r(struct _reent *r, char* path) r->_errno = ENODEV; /* not implemented yet */ return -1; } + +/** + * @brief Send a signal to a thread + * + * @param[in] pid the pid to send to + * @param[in] sig the signal to send + * + * @return TODO + */ +__attribute__ ((weak)) +int _kill(int pid, int sig) +{ + errno = ESRCH; /* not implemented yet */ + return -1; +} From fdbf6720c34ef4432ff9e32b5032c6309a8dd46b Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Tue, 18 Nov 2014 18:11:25 +0100 Subject: [PATCH 2/2] boards: enabled C++ for arduino-due and udoo --- boards/arduino-due/Makefile.features | 1 + boards/arduino-due/Makefile.include | 1 + boards/udoo/Makefile.features | 1 + boards/udoo/Makefile.include | 5 +++++ 4 files changed, 8 insertions(+) diff --git a/boards/arduino-due/Makefile.features b/boards/arduino-due/Makefile.features index 4f578052e236..1cae147202cd 100644 --- a/boards/arduino-due/Makefile.features +++ b/boards/arduino-due/Makefile.features @@ -1 +1,2 @@ +FEATURES_PROVIDED += cpp FEATURES_PROVIDED += periph_uart periph_gpio periph_spi periph_random diff --git a/boards/arduino-due/Makefile.include b/boards/arduino-due/Makefile.include index eb4b782964c1..adc165b22233 100644 --- a/boards/arduino-due/Makefile.include +++ b/boards/arduino-due/Makefile.include @@ -4,6 +4,7 @@ export CPU = sam3x8e # define tools used for building the project export PREFIX = arm-none-eabi- export CC = $(PREFIX)gcc +export CXX = $(PREFIX)g++ export AR = $(PREFIX)ar export AS = $(PREFIX)as export LINK = $(PREFIX)gcc diff --git a/boards/udoo/Makefile.features b/boards/udoo/Makefile.features index 4f578052e236..1cae147202cd 100644 --- a/boards/udoo/Makefile.features +++ b/boards/udoo/Makefile.features @@ -1 +1,2 @@ +FEATURES_PROVIDED += cpp FEATURES_PROVIDED += periph_uart periph_gpio periph_spi periph_random diff --git a/boards/udoo/Makefile.include b/boards/udoo/Makefile.include index 6f539174d052..224e5ee13ebf 100644 --- a/boards/udoo/Makefile.include +++ b/boards/udoo/Makefile.include @@ -4,6 +4,7 @@ export CPU = sam3x8e # define tools used for building the project export PREFIX = arm-none-eabi- export CC = $(PREFIX)gcc +export CXX = $(PREFIX)g++ export AR = $(PREFIX)ar export AS = $(PREFIX)as export LINK = $(PREFIX)gcc @@ -38,6 +39,10 @@ export OFLAGS += -O binary export FFLAGS += -R -e -w -v -b bin/$(BOARD)/$(APPLICATION).hex export TERMFLAGS += -p "$(PORT)" +# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++ +export CXXUWFLAGS += +export CXXEXFLAGS += + # use the nano-specs of the NewLib when available ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null