Keil Logo

C166: Transferring Control from Boot Loader to Application


Information in this article applies to:

  • C166 Version 4.20 and later

QUESTION

My target hardware has a BOOT loader (that starts at 00:0000h) and a separate application that is downloaded into FLASH memory at 10:0000h. The BOOT loader redirects the interrupt vectors as suggested in C166: Interrupt Vector Redirection. The BOOT loader application calls 10:0000h to transfer control to the loaded application.

The suggestion in C166: Generating a Call to an Absolute Memory Location was used to invoke the downloaded application. This application contains its own startup code and is completely independent of the BOOT loader.

Is this the proper procedure to follow and are there any other things I should consider?

ANSWER

This implementation source correct for the BOOT loader. However, you must configure the downloaded application correctly. Here are a few items to check:

  1. Make sure you enter the address range of the external Flash ROM under Options for Target - Target - External Memory. For example: #1 ROM Start: 0x100000 Size: 0x80000.
  2. Make sure Options for Target - L166 Locate - Use Memory Layout from Target Dialog is enabled. This configures the correct CLASSES directive for the L166 Linker/Locater.
  3. Since you redirect the interrupt vectors in the BOOT loader, the downloaded application must be configured so that the interrupt vector table starts at address 0x100000. Enter 0x100000 under Options for Target - L166 Misc - Interrupt Vector Table Address.

MORE INFORMATION

  • µVision2 Getting Started with µVision2 User's Guide, Chapter 4. Creating Applications

SEE ALSO


Last Reviewed: Thursday, February 25, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.