Skip to content

Commit

Permalink
Merge pull request #2031 from haukepetersen/fix_sam3x_cpp
Browse files Browse the repository at this point in the history
ACK then ;)
and go!
  • Loading branch information
BytesGalore committed Nov 18, 2014
2 parents fff5748 + fdbf672 commit b5435fa
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions boards/arduino-due/Makefile.features
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart periph_gpio periph_spi periph_random
1 change: 1 addition & 0 deletions boards/arduino-due/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions boards/udoo/Makefile.features
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart periph_gpio periph_spi periph_random
5 changes: 5 additions & 0 deletions boards/udoo/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 </dev/null ; echo $$?),0)
export LINKFLAGS += -specs=nano.specs -lc -lnosys
Expand Down
18 changes: 17 additions & 1 deletion cpu/sam3x8e/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

0 comments on commit b5435fa

Please sign in to comment.