This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

uVision - Manage Boot and App code locations

Is there a uVision example of how to manage boot and application code?

He's what I know to do:

- Boot code generated as normal uVision project with vector table relocated to RAM.
- Boot code runs then jumps to app code if app CRC flag found (typically at the end of code space to ensure the App update was complete.
- App code offset to higher flash

I use the target memory areas in uVision to determine the App prog space. Then use right click options for source to ensure all code, variables show up in the correct place.

Is this the right way of doing it?

Whilst I'm developing the App code I still need the Boot code to be in the project so that I can JTAG for debugging.

Is there any example using uVision3 or 4?

Thanks a bunch.

Parents Reply Children
  • Some discussions:

    http://www.keil.com/forum/docs/thread13707.asp

    - Boot code generated as normal uVision project with vector table relocated to RAM.

    My understanding is: when application runs, it will also need its own vector table. So the application code should do some handling.

    Then use right click options for source to ensure all code, variables show up in the correct place.

    What is the right click option? Where can I find it?

  • Hi,

    Thanks for the links, much appreciated.

    The right click I referred to can be made in the project workspace.

    I use this method for having Boot and App code folders in one uVision project.

    You can then right click each folder, choose options for group and then you can set the memory assignments for each group. You can also generate seperate hex/bin files from each folder (Boot, App) which allows debugging of the Bootloader and App in one project and bins to flash the target with or update in the field.

    My target is LPC2148, you can drop bin files into the micro via the USB, code gets copied to SD card then bootloader updates the micro.

    Similar project by Sparkfun on WinARM here:

    www.sparkfun.com/.../tutorial_info.php

    I'll post my uVision project when I get done.

  • Hi Mark,

    Thanks for your information.

    I took a very quick look on the link you provided.

    This will cause the target board to appear on any computer platform as a removable flash drive. The user can then seamlessly transfer files to the flash drive. In the background, the LPC2148 moves the user's files onto the SD card using the FAT16 file system.

    I am curious about the above description, I think it is much easier for a X86 computer to access the SD card directly?

  • Hi again,

    The example provides two update methods.

    1. Load the bin file onto the SD card via a card reader, then insert the SD card into the target to update firmware

    2. Register the target SD card as a removable drive over USB. Target streams bin file from the host onto the SD card then updates from the SD card.

    The LPC2148 behaves nicely as a removable drive and the USB protocol is supported by Win, Mac and Linux the same giving good compatibility.

    I find it strange given the number of questions regarding bootloading that Keil dont have an app note or example project on how to achieve boot+app using uVision settings?