Difference between revisions of "LPC Bootloader"
Line 2: | Line 2: | ||
* The Development Board used in SJSU courses contain Hyperload Bootloader pre-loaded, and a non-erasable Manufacturer Bootloader also exists. | * 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. | * 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 | + | * If using Hyperload, your project's loader file (*.ld) tells the compile to compile a program with offset of 64K because the first 64K is where Hyperload bootloader lives. |
== Bootloader == | == Bootloader == | ||
Line 17: | Line 17: | ||
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: | 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) | # Use FlashMagic to load a Hyperload bootloader (Secondary Bootloader) | ||
− | # Compile future programs with Flash Offset of | + | # Compile future programs with Flash Offset of 64K |
# Load all future programs with Hyperload | # Load all future programs with Hyperload | ||
Line 24: | Line 24: | ||
#: This factory bootloader communicates with '''FlashMagic''' Windows program to load a program to the controller. | #: 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 | # 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 | + | # This is where Hyperload lives, and it communicates with Windows Hyperload program to load a program starting from address 64K |
− | # Once Hyperload is finished executing, or it cannot communicate with Windows Hyperload program, it starts your program that lives at starting address | + | # Once Hyperload is finished executing, or it cannot communicate with Windows Hyperload program, it starts your program that lives at starting address 64K |
<br/> | <br/> | ||
[[File:TutorialImage_BootloaderMemoryMap.png|left|frame|Bootloader Memory Map]] | [[File:TutorialImage_BootloaderMemoryMap.png|left|frame|Bootloader Memory Map]] |
Revision as of 17:50, 4 February 2014
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 64K because the first 64K 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 64K
- 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 64K
- Once Hyperload is finished executing, or it cannot communicate with Windows Hyperload program, it starts your program that lives at starting address 64K