diff --git a/Makefile b/Makefile index b05a7cdf048ceddce70a0383eec139c2e4cc1969..0e5371aac79453805b1d2b62e59e76a64f9be8a8 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ default: build/system.elf INCLUDES = -Iinclude -COMMON_FLAGS = -g -Os -Wall -Wextra -unused -fno-rtti +COMMON_FLAGS = -g -Os -Wall -Wextra -fno-rtti CFLAGS = -std=c99 CXXFLAGS = -std=c++14 diff --git a/src/arch/arduino-nano/Makefile.inc b/src/arch/arduino-nano/Makefile.inc index cd6227ba645941d8606b023fa0de9867236f9891..f4dd78ecc1d1c3072147093eb138a22c09e93a93 100644 --- a/src/arch/arduino-nano/Makefile.inc +++ b/src/arch/arduino-nano/Makefile.inc @@ -14,6 +14,10 @@ NM = avr-nm OBJCOPY = avr-objcopy OBJDUMP = avr-objdump +ifeq (${aspectc}, 1) + CXX = ag++ -r build/repo.acp -v 0 --c_compiler avr-g++ -p . --Xcompiler +endif + TARGETS += src/arch/arduino-nano/arch.cc TARGETS += src/arch/arduino-nano/driver/gpio.cc TARGETS += src/arch/arduino-nano/driver/stdout.cc diff --git a/src/arch/esp8266/Makefile.inc b/src/arch/esp8266/Makefile.inc index 6fdcf4ba7e95177e3728bbccff8cb7127dc4a306..69a96f13590f74599ed0c06726e3d9cf4973808d 100644 --- a/src/arch/esp8266/Makefile.inc +++ b/src/arch/esp8266/Makefile.inc @@ -11,6 +11,10 @@ AR = ${TOOLCHAIN_BASE}/xtensa-lx106-elf-ar LD = ${TOOLCHAIN_BASE}/xtensa-lx106-elf-gcc OBJCOPY = ${TOOLCHAIN_BASE}/xtensa-lx106-elf-objcopy +ifeq (${aspectc}, 1) + CXX = ag++ -r build/repo.acp -v 0 --c_compiler ${TOOLCHAIN_BASE}/xtensa-lx106-elf-g++ -p . --Xcompiler +endif + INCLUDES += -Iinclude/esp8266 -I${SDK_BASE}/include COMMON_FLAGS += -nostdlib -mlongcalls -D__ets__ -DICACHE_FLASH CXXFLAGS = -std=c++11 diff --git a/src/arch/msp430fr5969lp/Makefile.inc b/src/arch/msp430fr5969lp/Makefile.inc index 1581c2d77292338c6aba243316786020aaaec160..05fcab14c1162e5155e6a83ee4b6e65f4ec66c9d 100644 --- a/src/arch/msp430fr5969lp/Makefile.inc +++ b/src/arch/msp430fr5969lp/Makefile.inc @@ -12,6 +12,10 @@ OBJCOPY = /opt/msp430/ti/gcc/bin/msp430-elf-objcopy TARGETS += src/arch/msp430fr5969lp/arch.cc +ifeq (${aspectc}, 1) + CXX = ag++ -r build/repo.acp -v 0 --c_compiler /opt/msp430/ti/gcc/bin/msp430-elf-g++ -p . --Xcompiler +endif + ifneq ($(findstring adc,${arch_drivers}), ) TARGETS += src/arch/msp430fr5969lp/driver/adc.cc endif diff --git a/src/arch/posix/Makefile.inc b/src/arch/posix/Makefile.inc index 37c8e0e62df55dba5729057fc8a5feb2dc28c76d..a706314446a3de20209ddab2bbdcbac8c50bd26b 100644 --- a/src/arch/posix/Makefile.inc +++ b/src/arch/posix/Makefile.inc @@ -3,6 +3,10 @@ CC = gcc CXX = g++ +ifeq (${aspectc}, 1) + CXX = ag++ -r build/repo.acp -v 0 -p . --Xcompiler +endif + INCLUDES += -Iinclude/posix TARGETS += src/arch/posix/arch.cc src/arch/posix/driver/gpio.cc TARGETS += src/arch/posix/driver/stdout.cc src/arch/posix/driver/uptime.cc