cpu/arm_common: c++: initial support for c++ added _kill (weak) and weak attribute for _kill_r

boards/msba2: provided c++ feature (cpp)
dev/timer
Martin 10 years ago committed by BytesGalore
parent 78b6b74a63
commit bfaacbbd38

@ -5,6 +5,7 @@ export CPU = lpc2387
export PREFIX = arm-none-eabi-
#export PREFIX = arm-elf-
export CC = $(PREFIX)gcc
export CXX = $(PREFIX)g++
export AR = $(PREFIX)ar
export CFLAGS += -O2 -Wall -Wstrict-prototypes -mcpu=arm7tdmi-s -gdwarf-2
export ASFLAGS = -gdwarf-2 -mcpu=arm7tdmi-s
@ -16,6 +17,10 @@ FLASHER = lpc2k_pgm
TERMPROG ?= $(RIOTBASE)/dist/tools/pyterm/pyterm
LINKFLAGS += -gdwarf-2 -mcpu=arm7tdmi-s -static -lgcc -nostartfiles -T$(RIOTBASE)/cpu/$(CPU)/linkerscript.x
# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++
export CXXUWFLAGS +=
export CXXEXFLAGS +=
ifeq ($(strip $(PORT)),)
export PORT = /dev/ttyUSB0
endif

@ -1 +1 @@
FEATURES_PROVIDED += transceiver periph_pwm
FEATURES_PROVIDED += transceiver periph_pwm cpp

@ -213,6 +213,7 @@ pid_t _getpid(void)
return (pid_t) sched_active_pid;
}
/*---------------------------------------------------------------------------*/
__attribute__ ((weak))
int _kill_r(struct _reent *r, int pid, int sig)
{
(void) pid;
@ -224,3 +225,18 @@ int _kill_r(struct _reent *r, int pid, int sig)
void _init(void) {}
void _fini(void) {}
/**
* @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;
}

Loading…
Cancel
Save