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.

MSPM0G1507: MSPM0G1507 Application not working after uploaded TXT file through Custom BSL

Part Number: MSPM0G1507

Tool/software:

Hi,

I’m currently facing an issue with a project I’m developing on CCS Theia IDE, using the MSPM0G1507 microcontroller.

I am able to upload and run the application successfully using the “Debug” configuration, where the .cmd linker file sets the application start address at 0x0000. In this setup, the code runs perfectly without any issues.

However, the actual deployment requires the application to run alongside a custom secondary BSL, where:

  • BSL starts at 0x0000

  • Application starts at 0x2000

So I modified the .cmd file to set the application start address to 0x2000.
Then, I flashed the custom BSL hex file to the device (which has been tested and is working), and used my BSL GUI application to upload the same application (now built to start at 0x2000) via UART.

Upon power cycle, I can observe that some initial code runs — as I can see indicators LEDs turn on — but the application seems to hang or stop working shortly after. I'm not sure what’s going wrong beyond that point.

To verify that the BSL is functioning correctly, I tried uploading another application (which uses almost the same peripherals) via the same custom BSL, and it runs without any issue.

I’d appreciate any suggestions or guidance to help resolve this issue.

Thanks in advance for your support.

  • Hi Anthony,

    If you can ues the custom bsl to load another application, then there looks like there should have some issues with the first app code. 

    What I suspect is that the interrupt vector, have you set the SCB->VTOR to 0x2000?

    B.R.

    Sal

  • Hi Sal Ye, thanks so much for the reply and apology for my late response. Yes, you're right, I didn't add the INTVECS in the ".cmd" so I did but the problem still exists. This is the cmd file.

    -uinterruptVectors
    --stack_size=512
    
    MEMORY
    {
        INT_VECS		(RX)  : origin = 0x00002000, length = 0x000000C0
        FLASH           (RX)  : origin = 0x000020C0, length = 0x0001DF40
        SRAM            (RWX) : origin = 0x20200000, length = 0x00008000
        BCR_CONFIG      (R)   : origin = 0x41C00000, length = 0x00000080
        BSL_CONFIG      (R)   : origin = 0x41C00100, length = 0x00000080
    
    }
    
    SECTIONS
    {
        .intvecs:   > INT_VECS
        .marker:  > 0x0001FFF8
        .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
    }
    

    FYI, 

    .marker:  > 0x0001FFF8 is the verification byte for new FW update. Other than that, is there any thing else that I need to change? Thanks so much in advance.
  • Hi Sal Ye, I finally resolved the issue. I didn't disable the automatic file generation of "Startup File Reference" in my project's .syscfg file. So the compiler took the auto generated startup file.

    Thefore, I un-checked it first

    and copied the startup file (startup_mspm0g150x_ticlang.c) from SDK directory.

    Finally, I have set the SCB->VTOR in this startup file and it worked.

    Thanks so much for your help. Slight smilePray