Skip to content

Commit

Permalink
Merge pull request #1989 from BytesGalore/EasyCPPMixing_stm32f3discov…
Browse files Browse the repository at this point in the history
…ery_support_fix

cpu/stm32f3 C++ stm32f3discovery support fix
  • Loading branch information
haukepetersen committed Nov 17, 2014
2 parents d56ebcb + 8060825 commit bb347e0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion boards/stm32f3discovery/Makefile.features
@@ -1 +1 @@
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_gpio cpp
5 changes: 5 additions & 0 deletions boards/stm32f3discovery/Makefile.include
Expand Up @@ -17,6 +17,7 @@ export PORT
# 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 All @@ -40,6 +41,10 @@ export FFLAGS = write bin/$(BOARD)/$(APPLICATION).hex 0x8000000
export DEBUGGER_FLAGS = $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(BINDIR)/$(APPLICATION).elf
export TERMFLAGS += -p "$(PORT)"

# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++
export CXXUWFLAGS +=
export CXXEXFLAGS +=

# use newLib nano-specs if 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
16 changes: 16 additions & 0 deletions cpu/stm32f3/syscalls.c
Expand Up @@ -156,6 +156,7 @@ int _getpid(void)
*
* @return TODO
*/
__attribute__ ((weak))
int _kill_r(struct _reent *r, int pid, int sig)
{
r->_errno = ESRCH; /* not implemented yet */
Expand Down Expand Up @@ -321,3 +322,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 bb347e0

Please sign in to comment.