41 lines
736 B
Makefile
Raw Normal View History

2021-09-17 16:51:34 -07:00
UF2_FAMILY_ID = 0x57755a57
include $(TOP)/$(BOARD_PATH)/board.mk
2021-10-05 18:20:44 -07:00
MCU_DIR = hw/mcu/broadcom
2021-09-17 16:51:34 -07:00
CC = clang
CFLAGS += \
-Wall \
-O0 \
-ffreestanding \
-nostdlib \
-nostartfiles \
-std=c17 \
-mgeneral-regs-only \
-DCFG_TUSB_MCU=OPT_MCU_BCM2711
SRC_C += \
src/portable/broadcom/synopsys/dcd_synopsys.c \
2021-10-05 18:20:44 -07:00
$(MCU_DIR)/broadcom/interrupts.c \
$(MCU_DIR)/broadcom/io.c \
$(MCU_DIR)/broadcom/mmu.c \
$(MCU_DIR)/broadcom/vcmailbox.c
2021-09-17 16:51:34 -07:00
CROSS_COMPILE = aarch64-none-elf-
SKIP_NANOLIB = 1
2021-10-05 18:20:44 -07:00
LD_FILE = $(MCU_DIR)/broadcom/link.ld
2021-09-17 16:51:34 -07:00
INC += \
$(TOP)/$(BOARD_PATH) \
2021-10-05 18:20:44 -07:00
$(TOP)/$(MCU_DIR) \
$(TOP)/lib/CMSIS_5/CMSIS/Core_A/Include
2021-09-17 16:51:34 -07:00
2021-10-05 18:20:44 -07:00
SRC_S += $(MCU_DIR)/broadcom/boot.S
2021-09-17 16:51:34 -07:00
$(BUILD)/kernel8.img: $(BUILD)/$(PROJECT).elf
$(OBJCOPY) -O binary $^ $@