esp32-s2_dfu/hw/bsp/broadcom_32bit/family.mk

47 lines
1.0 KiB
Makefile
Raw Normal View History

2021-11-02 15:46:23 +01:00
MCU_DIR = hw/mcu/broadcom
DEPS_SUBMODULES += $(MCU_DIR)
2021-09-18 01:51:34 +02:00
include $(TOP)/$(BOARD_PATH)/board.mk
CFLAGS += \
-Wall \
-O0 \
-ffreestanding \
-nostdlib \
-nostartfiles \
-mgeneral-regs-only \
-fno-exceptions \
-std=c17
2021-09-18 01:51:34 +02:00
2022-01-05 23:11:39 +01:00
CROSS_COMPILE = arm-none-eabi-
# mcu driver cause following warnings
CFLAGS += -Wno-error=cast-qual -Wno-error=redundant-decls
2021-09-18 01:51:34 +02:00
SRC_C += \
src/portable/synopsys/dwc2/dcd_dwc2.c \
2021-10-13 01:47:53 +02:00
$(MCU_DIR)/broadcom/gen/interrupt_handlers.c \
$(MCU_DIR)/broadcom/gpio.c \
2021-10-06 03:20:44 +02:00
$(MCU_DIR)/broadcom/interrupts.c \
$(MCU_DIR)/broadcom/mmu.c \
2021-11-03 07:13:08 +01:00
$(MCU_DIR)/broadcom/caches.c \
2021-10-06 03:20:44 +02:00
$(MCU_DIR)/broadcom/vcmailbox.c
2021-09-18 01:51:34 +02:00
SKIP_NANOLIB = 1
LD_FILE = $(MCU_DIR)/broadcom/link$(SUFFIX).ld
2021-09-18 01:51:34 +02:00
INC += \
$(TOP)/$(BOARD_PATH) \
$(TOP)/$(MCU_DIR)
2021-09-18 01:51:34 +02:00
SRC_S += $(MCU_DIR)/broadcom/boot$(SUFFIX).S
2021-09-18 01:51:34 +02:00
$(BUILD)/kernel$(SUFFIX).img: $(BUILD)/$(PROJECT).elf
2021-09-18 01:51:34 +02:00
$(OBJCOPY) -O binary $^ $@
# Copy to kernel to netboot drive or SD card
# Change destinaation to fit your need
flash: $(BUILD)/kernel$(SUFFIX).img
@$(CP) $< /home/$(USER)/Documents/code/pi_tinyusb/boot_cpy