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.
Hi, everyone:
I'm new to MSP430. So please forgive my ignorance.
I'm trying to build a customized bootloader based on "slaa600a_Main Memory Bootloader for MSP430" using MSP430FR5739. But I got a problem trying to jump from the bootloader to the application.
Two simple projects are built to demo the idea:
1. Code A is the source which is stored from 0xF000 to 0xFFFE in the FRAM (reset vector is in 0xFFFE). Code A only does one thing: jump to Code B using :
((void (*)()) 0xEFFE) ();
2. A separate Code B is the target which is stored from 0xC200 to 0xEFFE in the FRAM (reset vector is in 0xEFFE).
I used CCS5.3 IDE to download code B to the chip first. Then in the menu : Project > Properties > Debug > MSP430 Properties > Download Options > "Erase and download necessary segment only (Differential Download) " is selected. After that I downloaded Code A to the lower memory location and started the debug. After executing the jump (((void (*)()) APP_RESET_VECTOR) ();), The CCS IDE reports "No source available for "0xeffe" although I checked the memory that the reset vector for Code B is there.
I must be doing something wrong. Could you please help to point it out?
BTW, why the MSPBoot uses boot.c to load main_boot(). Why not use main() since it's a seperate project from APP1 and APP2?
The souce code for Code A ("bootloader") :
#include <msp430.h>
#define APP_RESET_VECTOR 0xEFFE
/*
* main.c
*/
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
// configue clock
CSCTL0_H = 0xA5;
CSCTL1 = DCOFSEL_1;
CSCTL1 |= DCORSEL;
CSCTL2 = SELA_3 + SELS_3 + SELM_3;
CSCTL3 = DIVA__32 + DIVS_0 + DIVM_0;
CSCTL0_H = 0x01;
__delay_cycles(10000);
// Jump to applciation
((void (*)()) APP_RESET_VECTOR) ();
return 0;
}
The memory allocation in .cmd file:
FRAM : origin = 0xF000, length = 0x0F88
...
RESET : origin = 0xFFFE, length = 0x0002 // bootloader reset vector
**Attention** This is a public forum