lpc32xxcdl.mk 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. ################################################################################
  2. #
  3. # lpc32xxcdl
  4. #
  5. ################################################################################
  6. LPC32XXCDL_VERSION = lpc32xx_cdl_v2.11
  7. LPC32XXCDL_SITE = http://git.lpcware.com/lpc3xxx_cdl.git
  8. LPC32XXCDL_SITE_METHOD = git
  9. LPC32XXCDL_INSTALL_TARGET = NO
  10. LPC32XXCDL_INSTALL_IMAGES = YES
  11. ifeq ($(BR2_TARGET_LPC32XXCDL_BOARDNAME),"ea3250")
  12. LPC32XXCDL_KICKSTART = kickstart/nand
  13. LPC32XXCDL_KICKSTART_BURNER = nand/kickstart
  14. LPC32XXCDL_S1L = s1l
  15. LPC32XXCDL_S1L_BURNER = nand/s1lapp
  16. endif
  17. ifeq ($(BR2_TARGET_LPC32XXCDL_BOARDNAME),"phy3250")
  18. LPC32XXCDL_KICKSTART = kickstart/kickstart_nand
  19. LPC32XXCDL_KICKSTART_BURNER = nand/kickstart
  20. LPC32XXCDL_S1L = s1l/s1l_nand_boot
  21. LPC32XXCDL_S1L_BURNER = nand/s1lapp
  22. endif
  23. ifeq ($(BR2_TARGET_LPC32XXCDL_BOARDNAME),"fdi3250")
  24. LPC32XXCDL_KICKSTART = kickstart/nand
  25. LPC32XXCDL_KICKSTART_BURNER = nand/kickstart_jtag
  26. LPC32XXCDL_S1L = s1l
  27. LPC32XXCDL_S1L_BURNER = nand/s1lapp_jtag
  28. endif
  29. LPC32XXCDL_BUILD_FLAGS = \
  30. CROSS_COMPILE=$(TARGET_CROSS) \
  31. NXPMCU_WINBASE=$(@D) \
  32. NXPMCU_SOFTWARE=$(@D) \
  33. BSP=$(BR2_TARGET_LPC32XXCDL_BOARDNAME) \
  34. CSP=lpc32xx TOOL=gnu GEN=lpc
  35. LPC32XXCDL_BOARD_STARTUP_DIR = \
  36. csps/lpc32xx/bsps/$(BR2_TARGET_LPC32XXCDL_BOARDNAME)/startup/examples/
  37. # Source files are with dos newlines, which our patch infrastructure doesn't
  38. # handle. Work around it by converting the affected files to unix newlines
  39. # before patching
  40. define LPC32XXCDL_DOS2UNIX_FOR_PATCH
  41. sed -n 's|^[+-]\{3\} [^/]\+\([^ \t]*\)\(.*\)|$(@D)\1|p' \
  42. boot/lpc32xxcdl/*.patch| sort -u | xargs $(SED) 's/\x0D$$//'
  43. endef
  44. LPC32XXCDL_POST_EXTRACT_HOOKS += LPC32XXCDL_DOS2UNIX_FOR_PATCH
  45. define LPC32XXCDL_BUILD_CMDS
  46. $(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)
  47. $(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/Burners/$(LPC32XXCDL_KICKSTART_BURNER)
  48. $(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/$(LPC32XXCDL_KICKSTART)
  49. $(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/Burners/$(LPC32XXCDL_S1L_BURNER)
  50. $(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/$(LPC32XXCDL_S1L)
  51. endef
  52. define LPC32XXCDL_INSTALL_IMAGES_CMDS
  53. cp $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/Burners/$(LPC32XXCDL_KICKSTART_BURNER)/*gnu.bin $(BINARIES_DIR)
  54. cp $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/$(LPC32XXCDL_KICKSTART)/*gnu.bin $(BINARIES_DIR)
  55. cp $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/Burners/$(LPC32XXCDL_S1L_BURNER)/*gnu.bin $(BINARIES_DIR)
  56. cp $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/$(LPC32XXCDL_S1L)/*gnu.bin $(BINARIES_DIR)
  57. endef
  58. $(eval $(generic-package))