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.

BSL_Protect and BSL_Low_Level_Init.asm

Other Parts Discussed in Thread: MSP430WARE

Hello All,

Looking at the example code in directory:

/msp430/MSP430ware_1_97_00_47/boot_loader/Customizing_the_BSL/src/5xx_6xx_Example_BSL_Source/CCS_v5.5.0_BSL-5438A/BSL430_Low_Level_Init.asm


The listing is below:

BSL_Protect:
              CLR      RET_low                  ;lock (keep JTAGLOCK_KEY state)

              BIS     #SYSBSLPE+SYSBSLSIZE0+SYSBSLSIZE1 , &SYSBSLC ; protects BSL
              ;BIC     #BSL_REQ_JTAG_OPEN, RET_low   ;lock (keep JTAGLOCK_KEY state)
              ;BIS     #BSL_REQ_JTAG_OPEN, RET_low   ;make sure it remains open for debugging
              bit     #SYSBSLIND,&SYSCTL      ; check for BSL start request
              jz      BCC2BSL

              BIS.W   #BSL_REQ_APP_CALL, RET_low
BCC2BSL       RETA

    .sect ".BSLSIG";

How does the compiler know to set the Reset Vector to this address? My Linker allocates the BSLSIGN:

BSLSIG                  : origin = 0x17F0, length = 0x000C

So does the compiler automatically look for label called BSL_Protect?

  • Woops, I figured it out.  Trying to develop custom BSL without knowing assembly language.  So in the same file there is the following listing:

     .sect "BSLSIG"
    
                     .word       0xFFFF
    BslProtectVecLoc .word       BSL_Protect             ;adress of function
    PBSLSigLoc       .word       03CA5h                  ;1st BSL signature
    SBSLSigLoc       .word       0C35Ah                  ;2nd BSL signature
                     .word       0xFFFF
    BslEntryLoc      .word       BSL_Entry_JMP           ;BSL_Entry_JMP
    
    PJTAGLOCK_KEY    .word       0xFFFF                  ; Primary Key Location
    SJTAGLOCK_KEY    .word       0xFFFF                  ; Secondary Key Location
                                                         ; set default unlock JTAG with option to lock with writting
                                                         ; a value <> 0x0000 or 0xFFFF


    The listing start in BSLSIG memory region, so the second word is the address of the BSL_Protect function.

  • Glad you were able to clear this up - let us know if you have more BSL questions.

**Attention** This is a public forum