Jump to content
43oh

What is the significance of Boot Strap Loader in MSP430?


Recommended Posts

Hello all,

 

I have been trying to understand the importance of the BSL. From the TI doc, "Programming with the BSL" I realize that BSL is used to access Memory, during the different phases of the controller.

 

My question is: why do we need this BSL? is it required to calibrate the controller? like setting the temperature and operating

conditions, before the controller takes the program execution address from the reset vector?

 

Generally, from my understanding and usage: we used the JTAG, FET tool to download the code onto the controller, to debug the code. Then why do we need the BSL?

 

Thanks a lot for sharing your experiences!

 

Vin43

Link to post
Share on other sites

In a not too distant past FET programmers cost hundreds of dollars.  Customers didn't want to spend thousands of dollars to program multiple devices in a production environment so a popular option was boot loading.  All you need to use BSL is a serial connection and a host computer to burn your firmware on the chip.  BSL is just for erasing, loading and verifying the flash memory. It provides none of the other features you get with Spy-Bi-Wire or 4 wire JTAG.

 

So do you need it ? No, not really in this day where you can get a full featured programmer / debugger in the form of low cost launchpads that include it.

Do you need it to calibrate? No, depending on the chip it may inadvertently wipe out your calibration values.

 

-rick

Link to post
Share on other sites

  All you need to use BSL is a serial connection and a host computer to burn your firmware on the chip.  BSL is just for erasing, loading and verifying the flash memory. It provides none of the other features you get with Spy-Bi-Wire or 4 wire JTAG.

 

-rick

thanks for your inputs. I wanted little more clarification and info regarding burning the chip/debugging.

As a new to microcontroller usage, I have below points: Please enlighten me with you experience. Googling is ineffective in these questions!

1. In cheap-launchpads (LP), we have In-circuit-debugger: where we just connect the LP to the PC via the USB and everything (downloading the hex, debugging) is done by the In-circuit debugger. Then why cant we have in-circuit debuggers on all development kits?

 

2. I had a microcontroller-kit, with pin-outs on all the pins (used in development/testing) where we can drop in the chip and download/debug the code using the external FET (flash emulation tool). Why is it called so? It emulates the controller?(debugging?) historically, controller memories were flash, so it is called FET, is it? What are the advantages/differences of using FET

 

3. JTAG (4 wire) is another way to download the hex into the controller. significance of JTAG? How is it helpful? In MSP the PJ port pins have the JTAG as secondary functions and by-default, the PJ pins are used as GPIOs. Then how to use them for JTAG. I know the PJSELx settings, but I wanted to know how is it connected to the PC? TDO,TDI, TMS, TCK.

 

4. SBW (2 wire) saves 2 pins. Similar to JTAG?

 

5. Among all these, how the BSL is significant? you said no external devices are needed. Just the PC and UART connection right?. It offers more control than other methods? It is said, we can 'hack' the device through BSL! Is it?

 

Please share your experiences and knowledge. I'm very new to the controller-world. I just use the MSP430 kits and write the code. I generally dont have to worry much on these issues, but I wanted to understand these points better. I'm also googling about them.

 

Many thanks :-)

Regards

Vin43

Link to post
Share on other sites

BSL is covered by slau319 MSP430 Programming Via the Bootstrap Loader, and SBW / JTAG is covered by slau320 MSP430 Programming Via the JTAG Interface. As already mention BSL request some simple / cheap glue logic, with simple PC software side. SBW / JTAG need master device, and it is more expensive for sure than BSL implementation. In general, SBW / JTAG is used for developement, and BSL is used for firmware updates on finished product. With open SBW / JTAG access device is unprotected, and there is software / hardware JTAG fuse for disabling SBW / JTAG. With blown JTAG fuse, BSL is used for simple firmware updates on customer side. With 2xx devices there is ROM BSL, while with F5xx/6xx family devices BSL is stored in flash and full customization is possible. For example, my CDC BSL has AES.

Link to post
Share on other sites

@jazz: thanks for the reply. I had read very roughly the 2 documents before posting this question. The docs give the details. However, I wanted to know the overall significance of the different downloading/debugging/firmware-update mechanisms and how and when are they mostly used depending whether the controller is under-development phase or in the customer side.

Thanks. I will try to get more info regarding this topic.

 

Regards,

Vin43

"thank you"

Link to post
Share on other sites

@@vin43 SBW is essentially a "multiplexed" version of JTAG, proprietary to TI. This saves pins.

JTAG is an industry standard protocol for stepping in between memory elements and logic. So you can either test the logic hardware with it, or write data in memory with it. As a result, it happens to be usable as a programming protocol.

Link to post
Share on other sites

I guess I shouldn't say it isn't really needed.  There might be a case for using it. There are some msp430 chips that allow you to replace the TI provided BSL firmware with your own custom bootloader.  Say you wanted to update the firmware using SPI reading the data from an SD card.  The chip has a framework in place that would allow you to do just about anything you want.

 

For a firmware developer the easiest way to program the chip is with the launchpad. However, If you want to provide firmware updates in the field to customers then using USB BSL bootloading ( not serial as I mentioned ) as @@chicken suggested might be a great option.

 

-rick

Link to post
Share on other sites

Cheap FETs are a very recent thing, I suspect TI pioneered that with the launchpad (since I see STM and maybe others are doing it now too), but even so the hardware to implement your own FET in a final consumer-facing product is probably more expensive than the hardware to implement BSL updates in-the-field.

Link to post
Share on other sites

@@spirilis I think they actually pioneered cheap FETs with their ezFET line. Those were USB sticks with a tiny (1x1cm) breakout board for the microcontroller in them. Those cost about 40 euros/dollars. They have since been superseded by the launchpad and the MSP430G valueline series.

The original ezFET connector is still available on the launchpad as a 0.05" pitch connector just next to the jumper array.

Link to post
Share on other sites
@all: I wanted to ask about DLL. I read about the MSP debug stack and how it is important (giving the interface between the PC software and the target MCU).
I have read about the FET, which we use and how it gets updated if it doesnt have the latest drivers.
 
  1. I wanted to know little about the DLLs. I know this is off-topic. Since I'm trying to understand more about the debug world it is good to know what exactly the DLLs do?                                                                                                                                                                                                                          
  2. I have read the wiki  ( http://processors.wiki.ti.com/index.php/MSP_Debug_Stack ) . It has been mentioned they have been written in C++.                  
  3. So I downloaded the DLL Developers Package v3.4.3.4  to know what it contains. It has the HIL.dll and msp430.dll. Are these the once which we can also see in the CCS installation folder-> DebugServer->Drivers folder? From my understanding, from the header files in the Include folder (of DLL Package) and the Lib folder, the 2 DLLs (HIL.dll and msp430.dll) are generated. Am I right? Ofcourse, we cannot open the DLLs in Notepad++, its unreadable!

Thank you!

 

Regardsm

Vin43

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...