STM32 bootloader and linker question

Comments

5 comments

  • Avatar
    Robert Wood

    Ah, the size is right in ST_STM32F103RB_MemoryMap.xml. I'd read that as 0x2000, but it's 0x20000. Still really don't understand where the linker file actually is though.

    0
    Comment actions Permalink
  • Avatar
    Robert Wood

    Talking to myself, but stumbled across this thing where you can right click on the project and import the memory map. then worked out how to actually edit it, changed the size of flash and the starting  point. This does seem to rebuild the project with the elf file showing the vectors starting at 0x8000800, so that looks good. Seems I was under a total misapprehension about needing a linker file changing. Hopefully this will help other people in future.

    0
    Comment actions Permalink
  • Avatar
    Darcy Williams

    Did you figure this out in the end?

    0
    Comment actions Permalink
  • Avatar
    Robert Wood

    No! I have finally gone back to doing this. Seems I am very close in that I can create a hex file with the program starting at 0x8003000, I have written a bootloader which starts at 0x8000000, runs below 0x8003000, quite clearly reprograms the flash with what is in the hex file starting at 0x8003000 in the repositioned "normal" program, I seem to be able to jump to 0x8003004 and yet it doesn't run the repositioned program that starts at 0x8003000. I have, I think, repositioned the vector table too. I must be very close! I'll post answers when I finally suss it.

    0
    Comment actions Permalink
  • Avatar
    Robert Wood

    Now I have sorted it. The programming worked just fine, but there was a flash LED sequence at the start that was getting optimised out in the release code. Previously, I'd just been running debug code in the target (non-bootloader program). So, it really is as simple as importing the xml file and changing start point and size.

    0
    Comment actions Permalink

Please sign in to leave a comment.