@@ -73,6 +73,7 @@ INC += $(addprefix -Iasf/sam0/,\
7373 )
7474INC += -Iasf/thirdparty/CMSIS/Include
7575INC += -Iboards/$(BOARD ) /
76+ INC += -Ifreetouch/
7677INC += -I$(BUILD )
7778
7879CFLAGS_CORTEX_M0 = \
@@ -144,8 +145,8 @@ CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
144145endif
145146
146147# LIBM_FILE_NAME = $(shell $(CC) $(CFLAGS) -print-file-name=libm.a)
147- LDFLAGS = $(CFLAGS ) -nostartfiles -fshort-enums -mthumb -mcpu=cortex-m0plus -Lasf/thirdparty/CMSIS/Lib/GCC/ -LQTouch/ - Wl,-nostdlib -Wl,-T,$(LD_FILE ) -Wl,-Map=$@ .map -Wl,-cref -Wl,-gc-sections -specs=nano.specs
148- LIBS = -larm_cortexM0l_math -lsamd21_qtouch_gcc - lm -lgcc -lc
148+ LDFLAGS = $(CFLAGS ) -nostartfiles -fshort-enums -mthumb -mcpu=cortex-m0plus -Lasf/thirdparty/CMSIS/Lib/GCC/ -Wl,-nostdlib -Wl,-T,$(LD_FILE ) -Wl,-Map=$@ .map -Wl,-cref -Wl,-gc-sections -specs=nano.specs
149+ LIBS = -larm_cortexM0l_math -lm -lgcc -lc
149150
150151SRC_ASF = $(addprefix asf/sam0/,\
151152 drivers/adc/adc_sam_d_r/adc.c \
@@ -201,6 +202,7 @@ SRC_C = \
201202 asf/sam0/utils/syscalls/gcc/syscalls.c \
202203 boards/$(BOARD ) /init.c \
203204 boards/$(BOARD ) /pins.c \
205+ freetouch/adafruit_ptc.c \
204206 lib/fatfs/ff.c \
205207 lib/fatfs/option/ccsbcs.c \
206208 lib/timeutils/timeutils.c \
@@ -236,17 +238,11 @@ SRC_BINDINGS = \
236238 busio/UART.c \
237239 neopixel_write/__init__.c \
238240 time/__init__.c \
241+ touchio/__init__.c \
242+ touchio/TouchIn.c \
239243 usb_hid/__init__.c \
240244 usb_hid/Device.c
241245
242- # Handle touch support on its own since it only fits in the image when external
243- # flash is used to store the file system.
244- # TODO(tannewt): Remove this after we switch to freetouch and rely on the linker
245- # to drop classes we don't need.
246- ifneq ($(FLASH_IMPL ) ,internal_flash.c)
247- SRC_BINDINGS += touchio/__init__.c touchio/TouchIn.c
248- endif
249-
250246SRC_BINDINGS_EXPANDED = $(addprefix shared-bindings/, $(SRC_BINDINGS ) ) \
251247 $(addprefix common-hal/, $(SRC_BINDINGS ) )
252248
0 commit comments