Commit 029cda0e authored by Daniel Friesel's avatar Daniel Friesel
Browse files

msp430fr5994lp-256k: aspectc support

AspectC++ is not aware of the type "__int20", so we need to map it to a type
known to AspectC++ (only for ag++, not g++) and fix its autogenerated
constructor signatures.
parent cdd2c919
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
#ifdef __acweaving
#define __int20 long
#endif
+11 −0
Original line number Diff line number Diff line
#!/bin/zsh

echo "> $@"

for i in {1..$#}; do
	if [[ $argv[$i] == *_agxx_* && -f $argv[$i] ]]; then
		sed -i 's/inline void \* operator new (unsigned int,/inline void * operator new(__int20 unsigned,/' $argv[$i]
	fi
done

exec /opt/msp430/ti/msp430-gcc-full-linux-5.1.2.0/bin/msp430-elf-g++ "$@"
+6 −2
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ COMMON_FLAGS += -mcpu=${CPU} -mmcu=${MCU} -DMULTIPASS_ARCH_msp430fr5994lp
COMMON_FLAGS += -DMULTIPASS_ARCH_HAS_I2C

ifneq (${msp430_large}, )
	COMMON_FLAGS += -mcode-region=either -mlarge -DADDR_20BIT
	COMMON_FLAGS += -mcode-region=either -mlarge -DADDR_20BIT -include int20.h
endif

# LTO seems to be broken.
@@ -31,7 +31,11 @@ ARCH_SHORTNAME = msp430
CXX_TARGETS += src/arch/msp430fr5994lp/arch.cc

ifeq (${aspectc}, 1)
	ifeq (${msp430_large}, )
		CXX = ag++ -r build/repo.acp -v 0 --c_compiler /opt/msp430/ti/msp430-gcc-full-linux-5.1.2.0/bin/msp430-elf-g++ -p . --Xcompiler
	else
		CXX = ag++ -r build/repo.acp -v 0 --c_compiler /home/derf/var/projects/multipass/src/arch/msp430fr5994lp-256k/g++wrap -p . --Xcompiler
	endif
endif

ifneq ($(findstring adc,${arch_drivers}), )