diff --git a/src/app/i2cdetect/Makefile.inc b/src/app/i2cdetect/Makefile.inc new file mode 100644 index 0000000000000000000000000000000000000000..43a8baead07b9729126610d547c6b842030f1063 --- /dev/null +++ b/src/app/i2cdetect/Makefile.inc @@ -0,0 +1,2 @@ +arch_drivers += ,i2c +drivers += ,lm75 diff --git a/src/arch/arduino-nano/Makefile.inc b/src/arch/arduino-nano/Makefile.inc index 958eda2939c2af2948803998bc52d96201d0b427..42b743fab3f5851f888bb9248476a7b29d0f9d32 100644 --- a/src/arch/arduino-nano/Makefile.inc +++ b/src/arch/arduino-nano/Makefile.inc @@ -6,7 +6,8 @@ PORT = /dev/ttyUSB0 BAUD = 57600 INCLUDES += -Iinclude/arduino-nano -COMMON_FLAGS += -mmcu=${MCU} -DF_CPU=16000000UL +COMMON_FLAGS += -mmcu=${MCU} -DF_CPU=16000000UL -DMULTIPASS_ARCH_arduino_nano +COMMON_FLAGS += -DMULTIPASS_ARCH_HAS_I2C CC = avr-gcc CXX = avr-g++ @@ -23,6 +24,11 @@ TARGETS += src/arch/arduino-nano/driver/gpio.cc TARGETS += src/arch/arduino-nano/driver/stdout.cc TARGETS += src/arch/arduino-nano/driver/uptime.cc +ifneq ($(findstring softi2c,${drivers}), ) +else ($(findstring i2c,${arch_drivers}), ) + TARGETS += src/arch/arduino-nano/driver/i2c.cc +endif + ifneq ($(findstring stdin,${arch_drivers}), ) TARGETS += src/arch/arduino-nano/driver/stdin.cc endif diff --git a/src/arch/esp8266/Makefile.inc b/src/arch/esp8266/Makefile.inc index 82755cefd37f1f80270bfb1c4a0587f1e2a59dc1..33df2b2dff9e14e4e1d24c19d0fcbe895c937be2 100644 --- a/src/arch/esp8266/Makefile.inc +++ b/src/arch/esp8266/Makefile.inc @@ -16,7 +16,7 @@ ifeq (${aspectc}, 1) endif INCLUDES += -Iinclude/esp8266 -I${SDK_BASE}/include -COMMON_FLAGS += -nostdlib -mlongcalls -D__ets__ -DICACHE_FLASH +COMMON_FLAGS += -nostdlib -mlongcalls -D__ets__ -DICACHE_FLASH -DMULTIPASS_ARCH_esp8266 CXXFLAGS = -std=c++11 LDFLAGS += -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static diff --git a/src/arch/msp430fr5969lp/Makefile.inc b/src/arch/msp430fr5969lp/Makefile.inc index bb919731f931c9e79ec6404059e5db8da3ca6594..066a152d69204180c79c35e06a52c99440d88846 100644 --- a/src/arch/msp430fr5969lp/Makefile.inc +++ b/src/arch/msp430fr5969lp/Makefile.inc @@ -4,7 +4,8 @@ CPU = 430x MCU = msp430fr5969 INCLUDES += -Iinclude/msp430fr5969lp -I/opt/msp430/ti/gcc/include -COMMON_FLAGS += -mcpu=${CPU} -mmcu=${MCU} +COMMON_FLAGS += -mcpu=${CPU} -mmcu=${MCU} -DMULTIPASS_ARCH_msp430fr5969lp +COMMON_FLAGS += -DMULTIPASS_ARCH_HAS_I2C CC = /opt/msp430/ti/gcc/bin/msp430-elf-gcc CXX = /opt/msp430/ti/gcc/bin/msp430-elf-g++ @@ -28,7 +29,8 @@ ifneq ($(findstring stdin,${arch_drivers}), ) TARGETS += src/arch/msp430fr5969lp/driver/stdin.cc endif -ifneq ($(findstring i2c,${arch_drivers}), ) +ifneq ($(findstring softi2c,${drivers}), ) +else ($(findstring i2c,${arch_drivers}), ) TARGETS += src/arch/msp430fr5969lp/driver/i2c.cc endif