[PATCH 2/2] bsp/lpc24xx: Add LPC40XX variants

Joel Sherrill joel.sherrill at oarcorp.com
Mon Aug 11 21:04:02 UTC 2014


If this is just adding an lpc40xx, then I don't see anything wrong. It is
mostly boiler plate.

--joel
On 8/11/2014 3:48 PM, Sebastian Huber wrote:
> ---
>  c/src/lib/libbsp/arm/lpc24xx/Makefile.am           | 27 ++++++-----
>  c/src/lib/libbsp/arm/lpc24xx/configure.ac          | 12 ++---
>  .../lib/libbsp/arm/lpc24xx/make/custom/lpc40xx.inc | 11 +++++
>  .../arm/lpc24xx/make/custom/lpc40xx_ea_ram.cfg     |  5 ++
>  .../arm/lpc24xx/make/custom/lpc40xx_ea_rom_int.cfg |  5 ++
>  c/src/lib/libbsp/arm/lpc24xx/preinstall.am         | 56 ++++++++++++++++++++++
>  .../arm/lpc24xx/startup/linkcmds.lpc40xx_ea_ram    |  1 +
>  .../lpc24xx/startup/linkcmds.lpc40xx_ea_rom_int    |  1 +
>  8 files changed, 99 insertions(+), 19 deletions(-)
>  create mode 100644 c/src/lib/libbsp/arm/lpc24xx/make/custom/lpc40xx.inc
>  create mode 100644 c/src/lib/libbsp/arm/lpc24xx/make/custom/lpc40xx_ea_ram.cfg
>  create mode 100644 c/src/lib/libbsp/arm/lpc24xx/make/custom/lpc40xx_ea_rom_int.cfg
>  create mode 100644 c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc40xx_ea_ram
>  create mode 100644 c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc40xx_ea_rom_int
>
> diff --git a/c/src/lib/libbsp/arm/lpc24xx/Makefile.am b/c/src/lib/libbsp/arm/lpc24xx/Makefile.am
> index 3b5c94f..b2fdd5f 100644
> --- a/c/src/lib/libbsp/arm/lpc24xx/Makefile.am
> +++ b/c/src/lib/libbsp/arm/lpc24xx/Makefile.am
> @@ -66,19 +66,20 @@ libbspstart_a_SOURCES = ../shared/start/start.S
>  project_lib_DATA = start.$(OBJEXT)
>
>  project_lib_DATA += startup/linkcmds
> -EXTRA_DIST =
> -EXTRA_DIST += startup/linkcmds.lpc17xx_ea_ram
> -EXTRA_DIST += startup/linkcmds.lpc17xx_ea_rom_int
> -EXTRA_DIST += startup/linkcmds.lpc17xx_plx800_ram
> -EXTRA_DIST += startup/linkcmds.lpc17xx_plx800_rom_int
> -EXTRA_DIST += startup/linkcmds.lpc2362
> -EXTRA_DIST += startup/linkcmds.lpc23xx_tli800
> -EXTRA_DIST += startup/linkcmds.lpc24xx_ea
> -EXTRA_DIST += startup/linkcmds.lpc24xx_ncs_ram
> -EXTRA_DIST += startup/linkcmds.lpc24xx_ncs_rom_ext
> -EXTRA_DIST += startup/linkcmds.lpc24xx_ncs_rom_int
> -EXTRA_DIST += startup/linkcmds.lpc24xx_plx800_ram
> -EXTRA_DIST += startup/linkcmds.lpc24xx_plx800_rom_int
> +project_lib_DATA += startup/linkcmds.lpc17xx_ea_ram
> +project_lib_DATA += startup/linkcmds.lpc17xx_ea_rom_int
> +project_lib_DATA += startup/linkcmds.lpc17xx_plx800_ram
> +project_lib_DATA += startup/linkcmds.lpc17xx_plx800_rom_int
> +project_lib_DATA += startup/linkcmds.lpc2362
> +project_lib_DATA += startup/linkcmds.lpc23xx_tli800
> +project_lib_DATA += startup/linkcmds.lpc24xx_ea
> +project_lib_DATA += startup/linkcmds.lpc24xx_ncs_ram
> +project_lib_DATA += startup/linkcmds.lpc24xx_ncs_rom_ext
> +project_lib_DATA += startup/linkcmds.lpc24xx_ncs_rom_int
> +project_lib_DATA += startup/linkcmds.lpc24xx_plx800_ram
> +project_lib_DATA += startup/linkcmds.lpc24xx_plx800_rom_int
> +project_lib_DATA += startup/linkcmds.lpc40xx_ea_ram
> +project_lib_DATA += startup/linkcmds.lpc40xx_ea_rom_int
>
>  ###############################################################################
>  #                  LibBSP                                                     #
> diff --git a/c/src/lib/libbsp/arm/lpc24xx/configure.ac b/c/src/lib/libbsp/arm/lpc24xx/configure.ac
> index 737501f..e3747d5 100644
> --- a/c/src/lib/libbsp/arm/lpc24xx/configure.ac
> +++ b/c/src/lib/libbsp/arm/lpc24xx/configure.ac
> @@ -28,17 +28,17 @@ RTEMS_BSPOPTS_HELP([LPC24XX_OSCILLATOR_MAIN],[main oscillator frequency in Hz])
>  RTEMS_BSPOPTS_SET([LPC24XX_OSCILLATOR_RTC],[*],[32768U])
>  RTEMS_BSPOPTS_HELP([LPC24XX_OSCILLATOR_RTC],[RTC oscillator frequency in Hz])
>
> -RTEMS_BSPOPTS_SET([LPC24XX_CCLK],[lpc17xx_ea*],[96000000U])
> +RTEMS_BSPOPTS_SET([LPC24XX_CCLK],[lpc17xx_ea* | lpc40xx_ea*],[96000000U])
>  RTEMS_BSPOPTS_SET([LPC24XX_CCLK],[lpc23*],[58982400U])
>  RTEMS_BSPOPTS_SET([LPC24XX_CCLK],[lpc24xx_plx800_*],[51612800U])
>  RTEMS_BSPOPTS_SET([LPC24XX_CCLK],[*],[72000000U])
>  RTEMS_BSPOPTS_HELP([LPC24XX_CCLK],[CPU clock in Hz])
>
> -RTEMS_BSPOPTS_SET([LPC24XX_PCLKDIV],[lpc17xx_ea*],[2U])
> +RTEMS_BSPOPTS_SET([LPC24XX_PCLKDIV],[lpc17xx_ea* | lpc40xx_ea*],[2U])
>  RTEMS_BSPOPTS_SET([LPC24XX_PCLKDIV],[*],[1U])
>  RTEMS_BSPOPTS_HELP([LPC24XX_PCLKDIV],[clock divider for default PCLK (PCLK = CCLK / PCLKDIV)])
>
> -RTEMS_BSPOPTS_SET([LPC24XX_EMCCLKDIV],[lpc17xx_ea*],[2U])
> +RTEMS_BSPOPTS_SET([LPC24XX_EMCCLKDIV],[lpc17xx_ea* | lpc40xx_ea*],[2U])
>  RTEMS_BSPOPTS_SET([LPC24XX_EMCCLKDIV],[*],[1U])
>  RTEMS_BSPOPTS_HELP([LPC24XX_EMCCLKDIV],[clock divider for EMCCLK (EMCCLK = CCLK / EMCCLKDIV)])
>
> @@ -60,7 +60,7 @@ RTEMS_BSPOPTS_HELP([LPC24XX_EMC_W9825G2JB75I],[enable Winbond W9825G2JB75I confi
>  RTEMS_BSPOPTS_SET([LPC24XX_EMC_IS42S32800D7],[*_plx800_rom_*],[1])
>  RTEMS_BSPOPTS_HELP([LPC24XX_EMC_IS42S32800D7],[enable ISSI IS42S32800D7 configuration for EMC])
>
> -RTEMS_BSPOPTS_SET([LPC24XX_EMC_IS42S32800B],[lpc17xx_ea_rom_*],[1])
> +RTEMS_BSPOPTS_SET([LPC24XX_EMC_IS42S32800B],[lpc17xx_ea_rom_* | lpc40xx_ea_rom_*],[1])
>  RTEMS_BSPOPTS_HELP([LPC24XX_EMC_IS42S32800B],[enable ISSI IS42S32800B configuration for EMC])
>
>  RTEMS_BSPOPTS_SET([LPC24XX_EMC_M29W160E],[lpc24xx_ncs_rom_*],[1])
> @@ -112,14 +112,14 @@ RTEMS_BSPOPTS_SET([LPC24XX_STOP_USB],[lpc23*],[])
>  RTEMS_BSPOPTS_SET([LPC24XX_STOP_USB],[*],[1])
>  RTEMS_BSPOPTS_HELP([LPC24XX_STOP_USB],[stop USB controller at start-up to avoid DMA interference])
>
> -RTEMS_BSPOPTS_SET([LPC_DMA_CHANNEL_COUNT],[lpc17*],[8])
> +RTEMS_BSPOPTS_SET([LPC_DMA_CHANNEL_COUNT],[lpc17* | lpc40*],[8])
>  RTEMS_BSPOPTS_SET([LPC_DMA_CHANNEL_COUNT],[*],[2])
>  RTEMS_BSPOPTS_HELP([LPC_DMA_CHANNEL_COUNT],[DMA channel count])
>
>  RTEMS_BSPOPTS_SET([BSP_START_RESET_VECTOR],[lpc24xx_ncs_rom_ext],[0x80000040])
>  RTEMS_BSPOPTS_HELP([BSP_START_RESET_VECTOR],[reset vector address for BSP start])
>
> -RTEMS_BSPOPTS_SET([BSP_USB_OTG_TRANSCEIVER_I2C_ADDR],[lpc17xx_ea*],[(0x2f << 1)])
> +RTEMS_BSPOPTS_SET([BSP_USB_OTG_TRANSCEIVER_I2C_ADDR],[lpc17xx_ea* | lpc40xx_ea*],[(0x2f << 1)])
>  RTEMS_BSPOPTS_HELP([BSP_USB_OTG_TRANSCEIVER_I2C_ADDR],[USB OTG transceiver I2C address used by USB stack])
>
>  RTEMS_BSP_CLEANUP_OPTIONS(0, 1)
> diff --git a/c/src/lib/libbsp/arm/lpc24xx/make/custom/lpc40xx.inc b/c/src/lib/libbsp/arm/lpc24xx/make/custom/lpc40xx.inc
> new file mode 100644
> index 0000000..2c921db
> --- /dev/null
> +++ b/c/src/lib/libbsp/arm/lpc24xx/make/custom/lpc40xx.inc
> @@ -0,0 +1,11 @@
> +#
> +# Config file for LPC40XX.
> +#
> +
> +include $(RTEMS_ROOT)/make/custom/default.cfg
> +
> +RTEMS_CPU = arm
> +
> +CPU_CFLAGS = -mthumb -march=armv7-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mtune=cortex-m4
> +
> +CFLAGS_OPTIMIZE_V = -O2 -g
> diff --git a/c/src/lib/libbsp/arm/lpc24xx/make/custom/lpc40xx_ea_ram.cfg b/c/src/lib/libbsp/arm/lpc24xx/make/custom/lpc40xx_ea_ram.cfg
> new file mode 100644
> index 0000000..4c4eb4d
> --- /dev/null
> +++ b/c/src/lib/libbsp/arm/lpc24xx/make/custom/lpc40xx_ea_ram.cfg
> @@ -0,0 +1,5 @@
> +#
> +# Config file for LPC40XX OEM Board from Embedded Artists.
> +#
> +
> +include $(RTEMS_ROOT)/make/custom/lpc40xx.inc
> diff --git a/c/src/lib/libbsp/arm/lpc24xx/make/custom/lpc40xx_ea_rom_int.cfg b/c/src/lib/libbsp/arm/lpc24xx/make/custom/lpc40xx_ea_rom_int.cfg
> new file mode 100644
> index 0000000..4c4eb4d
> --- /dev/null
> +++ b/c/src/lib/libbsp/arm/lpc24xx/make/custom/lpc40xx_ea_rom_int.cfg
> @@ -0,0 +1,5 @@
> +#
> +# Config file for LPC40XX OEM Board from Embedded Artists.
> +#
> +
> +include $(RTEMS_ROOT)/make/custom/lpc40xx.inc
> diff --git a/c/src/lib/libbsp/arm/lpc24xx/preinstall.am b/c/src/lib/libbsp/arm/lpc24xx/preinstall.am
> index a022b02..3bf67a6 100644
> --- a/c/src/lib/libbsp/arm/lpc24xx/preinstall.am
> +++ b/c/src/lib/libbsp/arm/lpc24xx/preinstall.am
> @@ -173,3 +173,59 @@ $(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
>         $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
>  TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds
>
> +$(PROJECT_LIB)/linkcmds.lpc17xx_ea_ram: startup/linkcmds.lpc17xx_ea_ram $(PROJECT_LIB)/$(dirstamp)
> +       $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.lpc17xx_ea_ram
> +TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds.lpc17xx_ea_ram
> +
> +$(PROJECT_LIB)/linkcmds.lpc17xx_ea_rom_int: startup/linkcmds.lpc17xx_ea_rom_int $(PROJECT_LIB)/$(dirstamp)
> +       $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.lpc17xx_ea_rom_int
> +TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds.lpc17xx_ea_rom_int
> +
> +$(PROJECT_LIB)/linkcmds.lpc17xx_plx800_ram: startup/linkcmds.lpc17xx_plx800_ram $(PROJECT_LIB)/$(dirstamp)
> +       $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.lpc17xx_plx800_ram
> +TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds.lpc17xx_plx800_ram
> +
> +$(PROJECT_LIB)/linkcmds.lpc17xx_plx800_rom_int: startup/linkcmds.lpc17xx_plx800_rom_int $(PROJECT_LIB)/$(dirstamp)
> +       $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.lpc17xx_plx800_rom_int
> +TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds.lpc17xx_plx800_rom_int
> +
> +$(PROJECT_LIB)/linkcmds.lpc2362: startup/linkcmds.lpc2362 $(PROJECT_LIB)/$(dirstamp)
> +       $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.lpc2362
> +TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds.lpc2362
> +
> +$(PROJECT_LIB)/linkcmds.lpc23xx_tli800: startup/linkcmds.lpc23xx_tli800 $(PROJECT_LIB)/$(dirstamp)
> +       $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.lpc23xx_tli800
> +TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds.lpc23xx_tli800
> +
> +$(PROJECT_LIB)/linkcmds.lpc24xx_ea: startup/linkcmds.lpc24xx_ea $(PROJECT_LIB)/$(dirstamp)
> +       $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.lpc24xx_ea
> +TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds.lpc24xx_ea
> +
> +$(PROJECT_LIB)/linkcmds.lpc24xx_ncs_ram: startup/linkcmds.lpc24xx_ncs_ram $(PROJECT_LIB)/$(dirstamp)
> +       $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.lpc24xx_ncs_ram
> +TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds.lpc24xx_ncs_ram
> +
> +$(PROJECT_LIB)/linkcmds.lpc24xx_ncs_rom_ext: startup/linkcmds.lpc24xx_ncs_rom_ext $(PROJECT_LIB)/$(dirstamp)
> +       $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.lpc24xx_ncs_rom_ext
> +TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds.lpc24xx_ncs_rom_ext
> +
> +$(PROJECT_LIB)/linkcmds.lpc24xx_ncs_rom_int: startup/linkcmds.lpc24xx_ncs_rom_int $(PROJECT_LIB)/$(dirstamp)
> +       $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.lpc24xx_ncs_rom_int
> +TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds.lpc24xx_ncs_rom_int
> +
> +$(PROJECT_LIB)/linkcmds.lpc24xx_plx800_ram: startup/linkcmds.lpc24xx_plx800_ram $(PROJECT_LIB)/$(dirstamp)
> +       $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.lpc24xx_plx800_ram
> +TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds.lpc24xx_plx800_ram
> +
> +$(PROJECT_LIB)/linkcmds.lpc24xx_plx800_rom_int: startup/linkcmds.lpc24xx_plx800_rom_int $(PROJECT_LIB)/$(dirstamp)
> +       $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.lpc24xx_plx800_rom_int
> +TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds.lpc24xx_plx800_rom_int
> +
> +$(PROJECT_LIB)/linkcmds.lpc40xx_ea_ram: startup/linkcmds.lpc40xx_ea_ram $(PROJECT_LIB)/$(dirstamp)
> +       $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.lpc40xx_ea_ram
> +TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds.lpc40xx_ea_ram
> +
> +$(PROJECT_LIB)/linkcmds.lpc40xx_ea_rom_int: startup/linkcmds.lpc40xx_ea_rom_int $(PROJECT_LIB)/$(dirstamp)
> +       $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.lpc40xx_ea_rom_int
> +TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds.lpc40xx_ea_rom_int
> +
> diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc40xx_ea_ram b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc40xx_ea_ram
> new file mode 100644
> index 0000000..d453596
> --- /dev/null
> +++ b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc40xx_ea_ram
> @@ -0,0 +1 @@
> +INCLUDE linkcmds.lpc17xx_ea_ram
> diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc40xx_ea_rom_int b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc40xx_ea_rom_int
> new file mode 100644
> index 0000000..612f491
> --- /dev/null
> +++ b/c/src/lib/libbsp/arm/lpc24xx/startup/linkcmds.lpc40xx_ea_rom_int
> @@ -0,0 +1 @@
> +INCLUDE linkcmds.lpc17xx_ea_rom_int
> --
> 1.8.1.4
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985




More information about the devel mailing list