Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9183893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:54:51+00:00 2026-06-17T18:54:51+00:00

I am working on a boot loader for Stellaris LM3S1607 chip. I am using

  • 0

I am working on a boot loader for Stellaris LM3S1607 chip.
I am using Keil MicroVision4 C compiler.
The idea is to create 2 independent firmware that one will update another.
In firmware1 i downloaded firmware2 file and write it to flash in address 0x3200. untill here it is working. i also verifed that the data is being written to flash correct.
Now i have in flash two applications. one is my uip boot loader and the seoncd one is my main project.
i want to know how can i jump from the first program to the second program located in 0x3200.

If someone can help me to jump it will be great.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:54:53+00:00Added an answer on June 17, 2026 at 6:54 pm

    This will work on any Cortex-M part…

    Create an assembler function like:

    __asm void boot_jump( uint32_t address )
    {
       LDR SP, [R0]       ;Load new stack pointer address
       LDR PC, [R0, #4]   ;Load new program counter address
    }
    

    In-line assembler syntax varies; this example is Keil ARM-MDK / ARM RealView.

    Then at the end of your bootloader:

    // Switch off core clock before switching vector table
    SysTick->CTRL = 0 ;
    
    // Switch off any other enabled interrupts too
    ...
    
    // Switch vector table
    SCB->VTOR = APPLICATION_START_ADDR ;
    
    //Jump to start address
    boot_jump( APPLICATION_START_ADDR ) ;
    

    Note that APPLICATION_START_ADDR in this case is the base or location address of your linked application code (0x3200 in this case), not the entry point indicated in the link map. The application vector table is located at this address, and the start of the vector table contains the application’s initial stack pointer address and program counter (the actual code entry point).

    The boot_jump() function loads a stack pointer and program counter from the application’s vector table, simulating what happens on reset where they are loaded from the base of Flash memory (the bootloader’s vector table).

    Note that you must have set the start address in your application code’s linker settings to the same as that which the bootloader will copy the image. If you are using the Keil debugger, you will not be able to load and run the application in the debugger without the bootloader present (or at least without manually setting the SP and PC correctly or using a debugger script), because the debugger loads the reset vector addresses rather than the application vector addresses.

    It is important that interrupts are disabled before switching the vector table, otherwise any interrupt that occurs before the application is initialised will vector to the application’s handler, and that may not be ready.

    Be careful of any peripherals that you use in both the application and boot code, any assumptions about reset conditions may not hold if the peripheral registers have already been set by the boot code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on an embedded firmware project using U-Boot. We are required to have
I'm working on a boot loader on an x86 machine. When the BIOS copies
I'm working on my app that trigger the phone boot(finish boot), When I tried
I'm working on making my own boot loader and kernel in D, and I've
I am working on creating my own prinf() for a boot loader I am
Hello I am working with a simulator that uses rcS scripts to boot, this
I have a boot complete broadcast receiver but it wasnt working as expected. Nor
Working on a small game using an HTML5 canvas, and javascript. And it's working
Working with an undisclosed API, I found a function that can set the number
I am working on a project where I need to write a GUI using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.