This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPM0L1105: How to debug accross different flash partition

Part Number: MSPM0L1105

Hi team,

1. My customer use M0L1105 and devide flash into two parts, Bootloader(0x0000-0x2FFF) and APP(0x3000-0x7FFF). They modify the APP start address from 0x3000. But it cannot debug (after press "debug", it cannot stay at "main()").
They press "suspend", it seems the code stay between 0x0000-0x1500, not move to the modified address.

2. If customer debug from Bootloader, after FW run to APP, how could they do debug for APP ?

  • Hi Jerry,

    Is the customer using one of the Secondary BSL examples from the SDK?

    Can you share their linker (cmd) file?

    Best,

    Owen

  • We are not using the SDK “Secondary BSL” examples yet.

    Our goal is to build a Boot + App structure on MSPM0L1105:
    - Bootloader: 0x0000 – 0x2FFF
    - Application: 0x3000 – 0x7FFF
    - App vector table is relocated to 0x3000

  • -uinterruptVectors
    --stack_size=256
    
    
    MEMORY
    {
        FLASH           (RX)  : origin = 0x00003000, length = 0x00004FF8
        SRAM            (RWX) : origin = 0x20000000, length = 0x00001000
        BCR_CONFIG      (R)   : origin = 0x41C00000, length = 0x00000080
        BSL_CONFIG      (R)   : origin = 0x41C00100, length = 0x00000080
    }
    
    SECTIONS
    {
        .intvecs:   > 0x00003000
        .text   : palign(8) {} > FLASH
        .const  : palign(8) {} > FLASH
        .cinit  : palign(8) {} > FLASH
        .pinit  : palign(8) {} > FLASH
        .rodata : palign(8) {} > FLASH
        .ARM.exidx    : palign(8) {} > FLASH
        .init_array   : palign(8) {} > FLASH
        .binit        : palign(8) {} > FLASH
        .TI.ramfunc   : load = FLASH, palign(8), run=SRAM, table(BINIT)
    
        .vtable :   > SRAM
        .args   :   > SRAM
        .data   :   > SRAM
        .bss    :   > SRAM
        .sysmem :   > SRAM
        .stack  :   > SRAM (HIGH)
    
        .BCRConfig  : {} > BCR_CONFIG
        .BSLConfig  : {} > BSL_CONFIG
    }
    

  • Hi Poca,

    I would like to note that putting the secondary BSL at 0x0000 will result in booting into the BSL on every startup. If this is not the intended behavior, I would suggest moving the BSL elsewhere in Flash. I don't expect this to be the intended behavior, as typically the BSL is used for updates.

    I would also like to mention, if you are not programming the BSL yet, the linker file you shared may result in a locked device. This is because that region of memory will be filled with 0xFFFF, which isn't a valid opcode. Then it will see that 0xFFFF isn't a valid hard fault location and it will lock up. You will have to perform a factory reset to recover the device.

    The secondary BSL examples in the SDK are a great place to start.

    Furthermore, here are some documents you may find helpful:

    Best,

    Owen