board.mk 1005 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. CFLAGS += \
  2. -flto \
  3. -mthumb \
  4. -mabi=aapcs \
  5. -mcpu=cortex-m3 \
  6. -nostdlib \
  7. -DCORE_M3 \
  8. -D__USE_LPCOPEN \
  9. -DCFG_TUSB_MCU=OPT_MCU_LPC175X_6X \
  10. -DRTC_EV_SUPPORT=0
  11. # startup.c and lpc_types.h cause following errors
  12. CFLAGS += -Wno-error=strict-prototypes
  13. MCU_DIR = hw/mcu/nxp/lpcopen/lpc175x_6x/lpc_chip_175x_6x
  14. # All source paths should be relative to the top level.
  15. LD_FILE = hw/bsp/$(BOARD)/lpc1768.ld
  16. SRC_C += \
  17. $(MCU_DIR)/../gcc/cr_startup_lpc175x_6x.c \
  18. $(MCU_DIR)/src/chip_17xx_40xx.c \
  19. $(MCU_DIR)/src/clock_17xx_40xx.c \
  20. $(MCU_DIR)/src/gpio_17xx_40xx.c \
  21. $(MCU_DIR)/src/iocon_17xx_40xx.c \
  22. $(MCU_DIR)/src/sysctl_17xx_40xx.c \
  23. $(MCU_DIR)/src/sysinit_17xx_40xx.c \
  24. $(MCU_DIR)/src/uart_17xx_40xx.c
  25. INC += \
  26. $(TOP)/$(MCU_DIR)/inc
  27. # For TinyUSB port source
  28. VENDOR = nxp
  29. CHIP_FAMILY = lpc17_40
  30. # For freeRTOS port source
  31. FREERTOS_PORT = ARM_CM3
  32. # For flash-jlink target
  33. JLINK_DEVICE = LPC1768
  34. # flash using pyocd
  35. flash: $(BUILD)/$(PROJECT).hex
  36. pyocd flash -t lpc1768 $<