1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #2004 from dangnhat/cpp_for_iot_lab_m3

iot-lab_m3: C++ support
This commit is contained in:
Hauke Petersen 2014-11-14 13:00:49 +01:00
commit 6b33ff1a31
3 changed files with 24 additions and 1 deletions

View File

@ -1 +1 @@
FEATURES_PROVIDED += transceiver periph_gpio periph_uart periph_spi periph_i2c periph_rtt periph_cpuid
FEATURES_PROVIDED += transceiver periph_gpio periph_uart periph_spi periph_i2c periph_rtt periph_cpuid cpp

View File

@ -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
@ -32,6 +33,11 @@ export CPU_USAGE = -mcpu=cortex-m3
export FPU_USAGE =
export CFLAGS += -ggdb -g3 -std=gnu99 -Os -Wall -Wstrict-prototypes $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian -mthumb -mthumb-interwork -nostartfiles
export CFLAGS += -ffunction-sections -fdata-sections -fno-builtin
# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++
export CXXUWFLAGS +=
export CXXEXFLAGS +=
export ASFLAGS += -ggdb -g3 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian
export LINKFLAGS += -ggdb -g3 -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian -static -lgcc -mthumb -mthumb-interwork -nostartfiles
# $(LINKERSCRIPT) is specified in cpu/Makefile.include

View File

@ -156,12 +156,29 @@ int _getpid(void)
*
* @return TODO
*/
__attribute__ ((weak))
int _kill_r(struct _reent *r, int pid, int sig)
{
r->_errno = ESRCH; /* not implemented yet */
return -1;
}
/**
* @brief Send a signal to a given thread (non-reentrant syscall)
*
* @param r TODO
* @param pid TODO
* @param sig TODO
*
* @return TODO
*/
__attribute__ ((weak))
int _kill(int pid, int sig)
{
errno = ESRCH; /* not implemented yet */
return -1;
}
/**
* @brief Open a file
*