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.

MSPM0G3519: Custom Bootloader

Part Number: MSPM0G3519


Tool/software:

Hello,

I am working with MSPM0G3519 with custom bootloader. I placed custom bootloader to 0x00000000 and I placed the app after custom bootloader code with offset. 

I do necessary linker modifications. I reduced flash size for bootloader project and I added offset for the flash section on the app project's linker. I also changed .intvecs section on the app side.

I added "SCB->VTOR = (FLASH_BASE | k_ADDRESS_APP);" this line on the app project at the top of main function.

Here is my jump function : 

/* function pointer to jump from boot to application code */
typedef void (*pf_application)(void);

static uint32_t v_JumpUserApp(void)
{
  static volatile pf_application pfnc_jump_app = NULL;
  static volatile uint32_t dw_jump_app_address = 0;

  // Get App Address
  uint32_t EntryAddr = dw_GetAppAddress();

  __disable_irq;
  dw_jump_app_address = *(volatile uint32_t*)(EntryAddr + 4);
  pfnc_jump_app = (pf_application)dw_jump_app_address;
  /* Initialize user application's Stack Pointer */
  __set_MSP(*(volatile uint32_t*)(EntryAddr));
  /* Jump to application */
  pfnc_jump_app();

  return(EntryAddr);
}

My question is do I have to use BSL and BCR? I will check CRC of the app on bootloader. Do I need BSL or BCR for any other needs ? (for ex: cybersecurtiy)

Thanks

  • Hi,

    I would say in your case, you do not need to configure BSL and BCR. Since your boot code starts at 0x0 address. 

    If you do need the security function configured in BSL and BCR. Then it is another topic. 

    Best regards,

    Cash Hao