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.

Custom BSL

Other Parts Discussed in Thread: MSP430F67641

Hello All,

We are working on the custom BSL and new for us. We use the msp430f67641 mcu. Our task to make custom bootloader which read the text file of the code from

the SPI based EEPROM and write to BSL.

We follow link for custom BSL is:

processors.wiki.ti.com/.../Custom_MSP430_BSL 

My confusion is:

1> How switch bootloader mode to the application mode ?

2> Is it necessary to unlock the BSL ?

3> Is it necessary to follow sequence of the path as followed in program for write the txt file in BSL area ?

4>Theoretically it read the password and unlock the BSL, which read the perticular address and verify it from this it decide enter bootlooder mode or application  

mode

but i didnot find at the end of the write the txt file in BSL part and change the particular address data so it is not enter every time bootlooder mode

i need help...for solving our task

Thanks 

Chintan

  • Hello All,

    We are working on the Custom BSL using SPI based EEPROM and mcu is: msp430f67641

    I follow below link and port in ccs

    processors.wiki.ti.com/.../Custom_MSP430_BSL

    Software: CCS

    I didnot find the some intrinsic function :

    1> __data20_read_char( )

    2> __data20_read_char( )

    and this intricsic function available in IAR workbench.

    So how we can use it?

    Need to add any header file ?

    Need help...to solve it

    Thanks & Regards

    Chintan

  • Hello All,

    We are working on Custom BSL using the SPI based EEPROM. It uses MSP430f67641 mcu.

    I follow below blink but there no any specification for type of file.

    http://processors.wiki.ti.com/index.php/Custom_MSP430_BSL

    Here, I confuse on one point..

    1> Which type of file used by custom BSL ? 

           ex> .txt file or binary file 

    Need help i confuse here...

    Thanks & Regards

    Chintan

  • Hello chintan,

    I've merged your threads since they regard the same topic. A custom BSL allows different options for invoking the BSL, choosing a communication peripheral, and BSL protocol. Access to the BSL memory is protected against misuse by a user-defined password, more information on this is provided in SLAU319. So you will need to provide the correct BSL password before being able to program your custom BSL into flash memory, more information on creating a custom BSL is found in SLAA450 which also provides a code package for reference. You would use a TI TXT binary image, generated from your custom BSL project, to program the BSL flash memory.

    __data20_read_char() is provided in intrinsics.h and should be included in your CCS project, typically through msp430.h or your specific device's header file.

    Regards,
    Ryan

  • Chintan,

    Here are my answers to you questions posted Sept. 29:

    1> How switch bootloader mode to the application mode ?

    To the chip, there is no difference between bootloader mode and application mode. You can start to execute your Application via a Reset. For example, by doing WDTCTL = 0;

    2> Is it necessary to unlock the BSL ?

    The factory preprogrammed BSL uses password to unlock most of the BSL function. But for a Customized BSL, this is not mandatory.

    3> Is it necessary to follow sequence of the path as followed in program for write the txt file in BSL area ?

    I do not quite understand your question. If you want to modify the existing BSL, you need to erase it and re-write it. Otherwise, you should not alter anything in the BSL area (i.e., Flash memory form 0x1000-0x1FFF).

    4>Theoretically it read the password and unlock the BSL, which read the perticular address and verify it from this it decide enter bootlooder mode or application mode but i didnot find at the end of the write the txt file in BSL part and change the particular address data so it is not enter every time bootlooder mode

    The factory preprogrammed BSL uses password to unlock most of the BSL function. Without that you can only do a Mass Erase, or enter password. For a Customized BSL, theoretically you can do whatever you like. I do not understand the last part of your question.

    -- OCY
  • Hello,

    Thanks for your valuable reply.

    I understand it.

    I have query regarding last question 

    "The factory preprogrammed BSL uses password to unlock most of the BSL function. Without that you can only do a Mass Erase, or enter password. For a Customized BSL, theoretically you can do whatever you like. I do not understand the last part of your question."

    that means, Before BSL write we need to unlock it and then write the binary TXT on it and then it is lock again.

    In our scenario i wil follow:

    1> write TXT binary file on eeporm after updated new TXT file make logic for binary new availble

    2> then we check the update TXT file logic is ok. if it is ok then follow

         ---> open BSL area

         ---> write TXT binary on this flash area

         ---> at the end of the TXT binary write then it will lock again

         ---> at the end restart the mcu by logically

    Is is ok ? if any mi-stack please guide me ....

  • Hello ,
    Thanks for your valuable answer,

    "__data20_read_char() is provided in intrinsics.h and should be included in your CCS project, typically through msp430.h or your specific device's header file."

    I add the intrinsics.h file and it include all this function.
    While i compile it, it give the error and worning:
    #18 expected a ")"
    - #551-D variable "__dst" is used before its value is set
    - #179-D variable "__tmp" was declared but never
    So how can i fix it, need help to solve it...
  • I am afraid we have some misunderstanding about "BSL write", "lock/unlock", and "BSL area".

    On the chip, there is a hardware feature to protect part of the Frame on the chip (with address 0x1000-0x17FF) from being accidentally erased or written. That part of the Flash on the chip is intended to store BSL code (and some other vital constants) and is referred as BSL area. TI always store their version of the factory default BSL code (and some other vital constants) and set the hardware lock during their manufacturing. You normally do not need to erase or write to that area. Thus you normally should not unlock that hardware protection.

    Now, the factory default BSL code is designed to provide the user a way to eraser write or read all other Flash (as well as RAM and peripheral registers). It is not capable of erasing writing or reading  the BSL area itself. Furthermore, when you evoke and run this BSL code, initially, it will only allow you to do a Mass Erase (for all the Flash outside the BSL area) or to enter a password. All other functions of this factory BSL are locked by software, and can only be unlocked by the correct password. The factory BSL code also requires that you use TI's BSL protocol and hardware interface.

    Thus we have two different part of Flash -- the BSL area and other Flash. We have two different kind of "BSL write" -- write into the BSL area and write into other Flash. And we also have two different kind of "lock/unlock" -- a hardware lock for the BSL area and a software (factory BSL code) lock for other Flash.

  • Hello,

    Thanks for your valuable reply,

    I understand it,

    So, from your reply we are not able to read,write,erase the BSL protected area (with address 0x1000-0x17FF) , just we able to read, write and Erase the Other Flash BSL area.

    and so no need to unlock and lock mechanism for the Other Flash BSL area.

    I follow the below link:

    processors.wiki.ti.com/.../Custom_MSP430_BSL

    is it correct ?

    if i goes to wrong path so please guide me...



    Thanks

    Chintan
  • Hello chintan,

    The error is simply a syntax mistake involving your C code at the referred-to line or the one before it, you will need to correct this by finding the proper location for the missing end parenthesis. I trust the warnings are self-explanatory.

    Regards,
    Ryan
  • chintan said:
    So, from your reply we are not able to read,write,erase the BSL protected area (with address 0x1000-0x17FF) , just we able to read, write and Erase the Other Flash BSL area.

    No, that is not what I said. You will be able to do those things if you unlock the hardware BSL protection. You will not be able to do so without unlock that.

    chintan said:
    and so no need to unlock and lock mechanism for the Other Flash BSL area.

    Not quite right. If you want to use the existing BSL that already resides in the BSL-area, you should not unlock the hardware BSL protection. But if you want to replace the existing BSL with a different BSL code, you do need to unlock the hardware BSL protection, erase the BSL area, and re-write BSL area with your new BSL code, and then lock the hardware BSL protection.

    chintan said:
    I follow the below link:

    processors.wiki.ti.com/.../Custom_MSP430_BSL

    is it correct ?

    Yes, this applies if you want to replace the existing BSL with a different BSL code. Once this is successfully done, Your new BSL code will take effect and you can use that new BSL to erase and write other Flash. You do not need to unlock the hardware BSL protection to do that anymore; and your new BSL may not need Password software protection to lock/unlock either (it is up to you).

**Attention** This is a public forum