2017-09-22 21:05:51 -04:00
|
|
|
SRC_SUPERVISOR = \
|
|
|
|
main.c \
|
|
|
|
supervisor/port.c \
|
|
|
|
supervisor/shared/autoreload.c \
|
2019-01-16 15:04:42 -05:00
|
|
|
supervisor/shared/board_busses.c \
|
2018-10-19 21:46:22 -04:00
|
|
|
supervisor/shared/filesystem.c \
|
|
|
|
supervisor/shared/flash.c \
|
|
|
|
supervisor/shared/micropython.c \
|
2018-07-25 08:06:30 -04:00
|
|
|
supervisor/shared/rgb_led_status.c \
|
2018-12-06 17:24:20 -05:00
|
|
|
supervisor/shared/safe_mode.c \
|
2018-07-31 19:53:54 -04:00
|
|
|
supervisor/shared/stack.c \
|
2018-10-19 21:46:22 -04:00
|
|
|
supervisor/shared/status_leds.c \
|
2018-07-31 19:53:54 -04:00
|
|
|
supervisor/shared/translate.c
|
2017-09-22 21:05:51 -04:00
|
|
|
|
2018-10-19 21:46:22 -04:00
|
|
|
ifndef $(NO_USB)
|
|
|
|
NO_USB = $(wildcard supervisor/usb.c)
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
# Choose which flash filesystem impl to use.
|
|
|
|
# (Right now INTERNAL_FLASH_FILESYSTEM and SPI_FLASH_FILESYSTEM are mutually exclusive.
|
|
|
|
# But that might not be true in the future.)
|
|
|
|
ifdef EXTERNAL_FLASH_DEVICES
|
|
|
|
CFLAGS += -DEXTERNAL_FLASH_DEVICES=$(EXTERNAL_FLASH_DEVICES) \
|
|
|
|
-DEXTERNAL_FLASH_DEVICE_COUNT=$(EXTERNAL_FLASH_DEVICE_COUNT)
|
|
|
|
|
|
|
|
SRC_SUPERVISOR += supervisor/shared/external_flash/external_flash.c
|
|
|
|
ifeq ($(SPI_FLASH_FILESYSTEM),1)
|
|
|
|
CFLAGS += -DSPI_FLASH_FILESYSTEM
|
|
|
|
SRC_SUPERVISOR += supervisor/shared/external_flash/spi_flash.c
|
|
|
|
endif
|
|
|
|
ifeq ($(QSPI_FLASH_FILESYSTEM),1)
|
|
|
|
CFLAGS += -DQSPI_FLASH_FILESYSTEM
|
|
|
|
SRC_SUPERVISOR += supervisor/qspi_flash.c supervisor/shared/external_flash/qspi_flash.c
|
|
|
|
endif
|
2017-09-22 21:05:51 -04:00
|
|
|
else
|
2018-10-19 21:46:22 -04:00
|
|
|
SRC_SUPERVISOR += supervisor/internal_flash.c
|
2017-09-22 21:05:51 -04:00
|
|
|
endif
|
|
|
|
|
2018-10-19 21:46:22 -04:00
|
|
|
ifeq ($(USB),FALSE)
|
|
|
|
ifeq ($(wildcard supervisor/serial.c),)
|
|
|
|
SRC_SUPERVISOR += supervisor/stub/serial.c
|
|
|
|
else
|
|
|
|
SRC_SUPERVISOR += supervisor/serial.c
|
|
|
|
endif
|
2017-09-22 21:05:51 -04:00
|
|
|
else
|
2018-10-19 21:46:22 -04:00
|
|
|
SRC_SUPERVISOR += lib/tinyusb/src/common/tusb_fifo.c \
|
|
|
|
lib/tinyusb/src/device/usbd.c \
|
2018-11-23 15:51:11 -05:00
|
|
|
lib/tinyusb/src/device/usbd_control.c \
|
2018-10-19 21:46:22 -04:00
|
|
|
lib/tinyusb/src/class/msc/msc_device.c \
|
|
|
|
lib/tinyusb/src/class/cdc/cdc_device.c \
|
|
|
|
lib/tinyusb/src/class/hid/hid_device.c \
|
2018-11-16 20:04:42 -05:00
|
|
|
lib/tinyusb/src/class/midi/midi_device.c \
|
2018-10-19 21:46:22 -04:00
|
|
|
lib/tinyusb/src/tusb.c \
|
|
|
|
supervisor/shared/serial.c \
|
|
|
|
supervisor/usb.c \
|
|
|
|
supervisor/shared/usb/usb_desc.c \
|
|
|
|
supervisor/shared/usb/usb.c \
|
|
|
|
supervisor/shared/usb/usb_msc_flash.c \
|
|
|
|
shared-bindings/usb_hid/__init__.c \
|
|
|
|
shared-bindings/usb_hid/Device.c \
|
2018-11-16 20:04:42 -05:00
|
|
|
shared-bindings/usb_midi/__init__.c \
|
|
|
|
shared-bindings/usb_midi/PortIn.c \
|
|
|
|
shared-bindings/usb_midi/PortOut.c \
|
2018-10-19 21:46:22 -04:00
|
|
|
shared-module/usb_hid/__init__.c \
|
|
|
|
shared-module/usb_hid/Device.c \
|
2018-11-16 20:04:42 -05:00
|
|
|
shared-module/usb_midi/__init__.c \
|
|
|
|
shared-module/usb_midi/PortIn.c \
|
|
|
|
shared-module/usb_midi/PortOut.c \
|
2018-10-19 21:46:22 -04:00
|
|
|
$(BUILD)/autogen_usb_descriptor.c
|
|
|
|
CFLAGS += -DUSB_AVAILABLE
|
2017-09-22 21:05:51 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
SUPERVISOR_O = $(addprefix $(BUILD)/, $(SRC_SUPERVISOR:.c=.o))
|
2018-07-31 19:53:54 -04:00
|
|
|
|
|
|
|
$(BUILD)/supervisor/shared/translate.o: $(HEADER_BUILD)/qstrdefs.generated.h
|
2018-10-19 21:46:22 -04:00
|
|
|
|
2018-11-09 03:11:43 -05:00
|
|
|
$(BUILD)/autogen_usb_descriptor.c $(BUILD)/genhdr/autogen_usb_descriptor.h: autogen_usb_descriptor.intermediate
|
|
|
|
|
|
|
|
.INTERMEDIATE: autogen_usb_descriptor.intermediate
|
|
|
|
|
|
|
|
autogen_usb_descriptor.intermediate: ../../tools/gen_usb_descriptor.py Makefile | $(HEADER_BUILD)
|
2018-10-19 21:46:22 -04:00
|
|
|
$(STEPECHO) "GEN $@"
|
|
|
|
$(Q)install -d $(BUILD)/genhdr
|
2018-11-09 03:11:43 -05:00
|
|
|
$(Q)$(PYTHON3) ../../tools/gen_usb_descriptor.py \
|
2018-10-19 21:46:22 -04:00
|
|
|
--manufacturer $(USB_MANUFACTURER)\
|
|
|
|
--product $(USB_PRODUCT)\
|
|
|
|
--vid $(USB_VID)\
|
|
|
|
--pid $(USB_PID)\
|
|
|
|
--serial_number_length $(USB_SERIAL_NUMBER_LENGTH)\
|
|
|
|
--output_c_file $(BUILD)/autogen_usb_descriptor.c\
|
|
|
|
--output_h_file $(BUILD)/genhdr/autogen_usb_descriptor.h
|