LPC177x_8x u-boot port

Document created by jorge_plascencia Employee on Apr 25, 2016
Version 1Show Document
  • View in full screen mode

This project explains how to build and deploy u-boot for platforms using the LPC177x_8x devices. To build u-boot, you will need to system running the Linux operating system, that latest CodeSourcery GNU tools for the Linux OS, the u-boot source code, and the u-boot patch(es) for the LPC1788.

Feaures implemented
--------------------------------------------------------------------------------
Support for the EA1788 board with 32-bit DRAM (32MB)
Support for the EA1788 board's NAND FLASH
Support for the LPC177x_8x internal FLASH
Ethernet support
Limited MPU support

u-boot known issues
--------------------------------------------------------------------------------
Issue: 'reset' command causes the board to crash
Workaround: Use 'cmreset' command instead

Issue: 'boot' command causes the board to crash
Workaround: Use environment variables and scripting with go command instead

Issue: bootvx command causes board crash
Workaround: None, but there is no reason to use this command

Feaures not implemented
--------------------------------------------------------------------------------
FLASH 'protect' command and features are not implemented (easily implemented)
Interrupt/NVIC support not implemented (easily implemented)

Possiible improvements
--------------------------------------------------------------------------------
Systick can be used instead of the LPC1788 match timer
The relocation code has been 'worked around' and is not implemented correctly
A macro file for device spcific IRQs ie needed with weak links to be included
in the startup file (arch specific with device overrides)
A basic MPU driver is there and seems to work, but could be improved
The ethernet driver and PHY setup are 'board specific', but could be moved
to the drivers area and the generic PHY support could be used

u-boot operational bootup overview
--------------------------------------------------------------------------------
Here is an overview of how u-boot boots on the LPC1788.
- LPC1788 boot ROM transfer control to u-boot code in internal FLASH at
address 0x0 per CM3 bootup procedure
- u-boot code first sets up the MPU
- Pin muxing, clocking, and DRAM are all initialized
- Code and data are relocated from FLASH to DRAM
- BSS segment is cleared in DRAM
- Control is transferred to u-boot code in DRAM
- u-boot board_init_f() is called which does initial u-boot setup
- board_init_r() is called for later u-boot setup
- u-boot operates normally out of DRAM

Location of the ported files
--------------------------------------------------------------------------------
arch/arm/cpu/cortex-m3 - Cortex M3 specific files (mpu, startup, etc.)
arch/arm/cpu/cortex-m3/lpc1788 - LPC1788 specific files (timer, serial, etc.)
arch/arm/include/asm/arch-cortex-m3 - Cortex M3 header files
arch/arm/include/asm/arch-lpc17xx - LPC177x_8x specific header files
board/nxp - board specific area for board using NXP devices
board/nxp/ea1788 - EA1788 board specific files (setup, nand, etc.)
include/configs/ea1788.h - EA1788 board specific configuration file

Attachments

    Outcomes