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.

debugging during development of BSL

i am new to BSL and i am playing around with the CC430 example from the custom BSL app note. I changed the BSL_Protect function so it always executes the BSL, which seems to work, as i am turning on a LED in the main() and the LED's lights up.

BSL_Protect: CLR RET_low ;lock (keep JTAGLOCK_KEY state) BIS #SYSBSLPE+SYSBSLSIZE0+SYSBSLSIZE1 , &SYSBSLC ; protects BSL BIS.W #BSL_REQ_APP_CALL, RET_low BCC2BSL RETA

however, if i set a breakpoint in the main() of the BSL example, that breakpoint is never hit. also, while the programing interface is still connected, the BSL also never starts. if i remove it, and reset the device, the BSL always starts, as intended for this development test. Is there a way to get the BSL to start, even with the programing interface (SBW) still connected? and furthermore, what is the proper way to be able to debug, break, step and continue for BSL development? 

from the app note, i read:

For development and debugging in the BSL_Protect function, either the simulator can be used, or the BSL memory protection bits can be left open during debugging. In either case, "Run to Main" should be unchecked. 

where/how exactly do i "leave open" the "BSL memory protection bits"?

Thanks,

-r

  • Rene Limberger said:
    where/how exactly do i "leave open" the "BSL memory protection bits"?

    Usually, the BSL code that checks for BSL entry sequence, also protects the BSL area by setting the SYSBSLPE and SYSBSLOFF bits. THis way, teh BSL area can only be read with an instruciton fetch. This will also block JTAG read access to teh BSL flash.
    By not including this part until teh BSL is ready, the debugger is allowed to read the BSL area and therefore you can debug the BSL.

    However, there might be other details to this. I never dealt with replacing the BSL.

**Attention** This is a public forum