LPC Bootloader

From Embedded Systems Learning Academy
Revision as of 15:53, 7 June 2012 by Preet (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Basics

  • The Development Board used in SJSU courses contain Hyperload Bootloader pre-loaded, and a non-erasable Manufacturer Bootloader also exists.
  • The term Hyperload refers to Windows Hyerpload program, and also a corresponding Hyperload Bootloader on the chip.
  • If using Hyperload, your project's loader file (*.ld) tells the compile to compile a program with offset of 4K because the first 4K is where Hyperload bootloader lives.

Bootloader

What is Bootloader exactly ?
Bootloader is a program in a microcontroller that can communicate with your PC to load a program. So yes, it is a program that helps you program. NXP LPC processors contain factory bootloader that works over UART0 and by utilizing RESET and NMI hard wires, it can be executed to load a program onto your processor without expensive JTAG hardware programmers.

This article attempts to explain the NXP's LPC microcontroller bootloaders, and why/how Hyperload extends this functionality.

NXP Bootloader & FlashMagic

NXP loads a special program that resides in their processors that helps you program over UART. FlashMagic is a Windows program that communicates with this factory bootloader to help you load a HEX file in the NXP microcontroller.

Hyperload

Hyperload is a Windows based program that is suited for programming any microcontroller, not just NXP LPC microcontrollers. The reason why it is used with the SJSU Development package is because it helps you program 10-20 times faster than NXP bootloader with FlashMagic. Here is an outline of the steps to use Hyperload:

  1. Use FlashMagic to load a Hyperload bootloader (Secondary Bootloader)
  2. Compile future programs with Flash Offset of 4K
  3. Load all future programs with Hyperload

LPC Boot Process

  1. If the NMI pin is LOW and RESET is toggled, LPC processors start from the top of memory, where the LPC factory bootloader lives.
    This factory bootloader communicates with FlashMagic Windows program to load a program to the controller.
  2. Upon a normal RESET without NMI being LOW, the LPC starts from Address 0x0000.0000
  3. This is where Hyperload lives, and it communicates with Windows Hyperload program to load a program starting from address 4K
  4. Once Hyperload is finished executing, or it cannot communicate with Windows Hyperload program, it starts your program that lives at starting address 4K


Bootloader Memory Map