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

50 lines
1020 B
Makefile
Raw Normal View History

2021-09-18 01:51:34 +02:00
UF2_FAMILY_ID = 0x57755a57
include $(TOP)/$(BOARD_PATH)/board.mk
2021-10-06 03:20:44 +02:00
MCU_DIR = hw/mcu/broadcom
2021-09-18 01:51:34 +02:00
CC = clang
CFLAGS += \
-Wall \
-O0 \
-ffreestanding \
-nostdlib \
-nostartfiles \
-std=c17 \
-mgeneral-regs-only \
-DCFG_TUSB_MCU=OPT_MCU_BCM2711
# mcu driver cause following warnings
CFLAGS += -Wno-error=cast-qual
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 \
2021-10-06 03:20:44 +02:00
$(MCU_DIR)/broadcom/interrupts.c \
$(MCU_DIR)/broadcom/io.c \
$(MCU_DIR)/broadcom/mmu.c \
$(MCU_DIR)/broadcom/vcmailbox.c
2021-09-18 01:51:34 +02:00
CROSS_COMPILE = aarch64-none-elf-
SKIP_NANOLIB = 1
2021-10-06 03:20:44 +02:00
LD_FILE = $(MCU_DIR)/broadcom/link.ld
2021-09-18 01:51:34 +02:00
INC += \
$(TOP)/$(BOARD_PATH) \
2021-10-06 03:20:44 +02:00
$(TOP)/$(MCU_DIR) \
$(TOP)/lib/CMSIS_5/CMSIS/Core_A/Include
2021-09-18 01:51:34 +02:00
2021-10-06 03:20:44 +02:00
SRC_S += $(MCU_DIR)/broadcom/boot.S
2021-09-18 01:51:34 +02:00
$(BUILD)/kernel8.img: $(BUILD)/$(PROJECT).elf
$(OBJCOPY) -O binary $^ $@
# Copy to kernel to netboot drive or SD card
# Change destinaation to fit your need
flash: $(BUILD)/kernel8.img
@$(CP) $< /home/$(USER)/Documents/code/pi4_tinyusb/boot_cpy