board.mk 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. CFLAGS += \
  2. -flto \
  3. -mthumb \
  4. -mabi=aapcs \
  5. -mcpu=cortex-m4 \
  6. -mfloat-abi=hard \
  7. -mfpu=fpv4-sp-d16 \
  8. -nostdlib \
  9. -DCORE_M4 \
  10. -D__USE_LPCOPEN \
  11. -DCFG_TUSB_MCU=OPT_MCU_LPC43XX
  12. # mcu driver cause following warnings
  13. CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes
  14. MCU_DIR = hw/mcu/nxp/lpcopen/lpc43xx/lpc_chip_43xx
  15. # All source paths should be relative to the top level.
  16. LD_FILE = hw/bsp/$(BOARD)/lpc4357.ld
  17. SRC_C += \
  18. $(MCU_DIR)/../gcc/cr_startup_lpc43xx.c \
  19. $(MCU_DIR)/src/chip_18xx_43xx.c \
  20. $(MCU_DIR)/src/clock_18xx_43xx.c \
  21. $(MCU_DIR)/src/gpio_18xx_43xx.c \
  22. $(MCU_DIR)/src/sysinit_18xx_43xx.c \
  23. $(MCU_DIR)/src/i2c_18xx_43xx.c \
  24. $(MCU_DIR)/src/i2cm_18xx_43xx.c \
  25. $(MCU_DIR)/src/uart_18xx_43xx.c \
  26. $(MCU_DIR)/src/fpu_init.c
  27. INC += \
  28. $(TOP)/$(MCU_DIR)/inc \
  29. $(TOP)/$(MCU_DIR)/inc/config_43xx
  30. # For TinyUSB port source
  31. VENDOR = nxp
  32. CHIP_FAMILY = transdimension
  33. # For freeRTOS port source
  34. FREERTOS_PORT = ARM_CM4F
  35. # For flash-jlink target
  36. JLINK_DEVICE = LPC4357_M4
  37. # flash using jlink
  38. flash: flash-jlink