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

Loading Two Projects in one Debug mode for Boot loader Simulation

Is it possible to load two project in one debug mode to simulate Boot loader and Application simulation

Parents
  • Configuration for the Boot loader is
    Flash - Start Address - 0x0000 Length - 0x1000

    Configuration for Application is
    Flash - Start Address - 0x1000 Length - 0x7000

    When Boot Loader programs a valid application in flash it will jump to Application i.e. 0x1000 location

    /* Load main stack pointer with application stack pointer initial value,
    stored at first location of application area */
                    asm volatile("ldr r0, =0x1000");
                    asm volatile("ldr r0, [r0]");
                    asm volatile("mov sp, r0");
    
    /* Load program counter with application reset vector address, located at
    second word of application area. */
                    asm volatile("ldr r0, =0x1004");
                    asm volatile("ldr r0, [r0]");
                    asm volatile("mov pc, r0");
    


    But when we check the location in 0x1000 and 0x1004 instead of branch instruction LSLS instruction is present , please have a look below

    0x00001000 0270      LSLS     r0,r6,#9rload_rt2_thumb_only (0x000000C8)
    0x00001004 0169      LSLS     r1,r5,#5rload_rt2_thumb_only (0x000000C8)
    

Reply
  • Configuration for the Boot loader is
    Flash - Start Address - 0x0000 Length - 0x1000

    Configuration for Application is
    Flash - Start Address - 0x1000 Length - 0x7000

    When Boot Loader programs a valid application in flash it will jump to Application i.e. 0x1000 location

    /* Load main stack pointer with application stack pointer initial value,
    stored at first location of application area */
                    asm volatile("ldr r0, =0x1000");
                    asm volatile("ldr r0, [r0]");
                    asm volatile("mov sp, r0");
    
    /* Load program counter with application reset vector address, located at
    second word of application area. */
                    asm volatile("ldr r0, =0x1004");
                    asm volatile("ldr r0, [r0]");
                    asm volatile("mov pc, r0");
    


    But when we check the location in 0x1000 and 0x1004 instead of branch instruction LSLS instruction is present , please have a look below

    0x00001000 0270      LSLS     r0,r6,#9rload_rt2_thumb_only (0x000000C8)
    0x00001004 0169      LSLS     r1,r5,#5rload_rt2_thumb_only (0x000000C8)
    

Children