title: ARM Cortex M3 Bootloader with User code at normal 0 address?
body: <p>I have been researching ARM M3 bootloaders and most seem to work with the bootloader code sitting in low memory and the user code in higher memory.  This requires the users application to be linked differently when used with the bootloader.  That is some address above the bootloader code which is located at 0x00000000.  I think this an inconvenience.</p>
  
  <p>I would like to know if it is possible to have a bootloader which is located in high memory and yet still allow the users application to be linked normally so it starts at 0x00000000 in low memory ?</p>
  
  <p>I have done this before with PIC bootloaders which also have reset &amp; stack code at 0x0000 similar to ARM M3's NVIC table.</p>
  
  <p>They way this has worked form me on the PIC is that bootloader is located in the top 1k of the flash.  Reset vector and SP code which is at 0x0000 points to the start address of the bootloader code. Thus the bootloader starts after reset.</p>
  
  <p>Now when the bootloaders is downloading the user code it puts it into low memory where the linker thinks it should go, the only exception being it does not allow overwriting of its own reset and SP vectors located at 0x0000.  Instead it 'catches' these and stores them in flash within its high memory.</p>
  
  <p>When the bootloader is ready for the users code to start it retrieves the initial reset and SP vectors it stored during the download and starts the user code using these.</p>
  
  <p>At the next reset the bootloader will start and it can do a check to see if it should wait for a new user program or just start the users code using the vectors it has stored.</p>
  
  <p>Could the above method be translated for use on the ARM M3  ?</p>