Difference between revisions of "LPC Bootloader"
(No difference)
|
Revision as of 15:53, 7 June 2012
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:
- Use FlashMagic to load a Hyperload bootloader (Secondary Bootloader)
- Compile future programs with Flash Offset of 4K
- Load all future programs with Hyperload
LPC Boot Process
- 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.
- Upon a normal RESET without NMI being LOW, the LPC starts from Address 0x0000.0000
- This is where Hyperload lives, and it communicates with Windows Hyperload program to load a program starting from address 4K
- Once Hyperload is finished executing, or it cannot communicate with Windows Hyperload program, it starts your program that lives at starting address 4K