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.
Currently, I am trying to set up a custom BSL for my MSP430F5310. I have tried to follow the SLAA450C , after some forth and back I am able to flash the BSL part of the µC. I am working with CCS6.
I have set the addresses of the various functions as follows:
#pragma RETAIN(addr_protect) #pragma LOCATION(addr_protect,0x17F2) const uint16_t addr_protect = 0x1010; #pragma RETAIN(bsl_code2) #pragma LOCATION(bsl_code2,0x17F4) const uint16_t bsl_code2 = 0x3CA5; #pragma RETAIN(bsl_code1) #pragma LOCATION(bsl_code1,0x17F6) const uint16_t bsl_code1 = 0xC35A; #pragma RETAIN(addr_protect) #pragma LOCATION(addr_protect,0x17FA) const uint16_t addr_reflash = 0x1100; #pragma RETAIN(jtag_key) #pragma LOCATION(jtag_key,0x17FC) const uint8_t jtag_key[] = {0xFF,0xFF,0xFF,0xFF};
The functions themselves are declared in a similar way:
#pragma RETAIN(goto_protect)
#pragma LOCATION(goto_protect,0x1000)
void goto_protect() {
asm(" jmp protect");
}
#pragma RETAIN(protect)
#pragma LOCATION(protect,0x1010)
void protect(void) {
[...]
#pragma RETAIN(reflash)
#pragma LOCATION(reflash,0x1100)
void reflash(void) {
[...]
CCS forces me to have a main() function, which simply calls goto_protect(). This seems to work alright, after I added the usual _system_pre_init(), I can step from main() into goto_protect() and then further into protect(). However, CCS complains that "no code is associated with ..." as soon as I try to set a breakpoint outside of main(). I have enabled "full symbolic debug" in the project preferences.
This is pretty annyoing as the code (with decryption and decompression) is rather complex and won´t be fun to debug. Without symbolic debugging, it won´t get any better.
Any suggestions?
One more point: does the BSL use the watchdog and _system_pre_init()? I suppose it does not, but I would rather make sure.
Max
I don’t know why the debugger complains. Maybe it has something to do with the protection mechanism of the BSL flash.
However, to test your BSL code, you may simply run it in normal flash and debug it there until it works, Then move it to BSL flash :)
**Attention** This is a public forum