Hi,
First of all, I suggest you use SDM_LPM mode, because there is only 32KW on-chip RAM, so it is okay to use SDM. In the CW tools, you just need to select SDM_LPM project, it is okay.
For the bootloader mode, you just need to modify the following array, especially, the item:
/* NV_FOPT: FOPT[7:6] = 11b means boot from ROM, other value means boot from Flash */ \
0xFFU, \ Rong wrote: start from bootloader after reset
/* NV_FOPT: FOPT[7:6] = 11b means boot from ROM, other value means boot from Flash */ \
0x3FU, \ Rong wrote: start from application code after Reset
In other words, the data in the array determines the booting mode instead of pin logic after Reset as the other processor does.
Hope it can help you
BR
XiangJun Rong
#pragma define_section reserved_FCF "reserved_FCF.text" RX
#pragma section reserved_FCF begin
static const uint8_t _flash_config_field[] = {
/* NV_BACKKEY3: KEY=0xFF */ \
0xFFU, \
/* NV_BACKKEY2: KEY=0xFF */ \
0xFFU, \
/* NV_BACKKEY1: KEY=0xFF */ \
0xFFU, \
/* NV_BACKKEY0: KEY=0xFF */ \
0xFFU, \
/* NV_BACKKEY7: KEY=0xFF */ \
0xFFU, \
/* NV_BACKKEY6: KEY=0xFF */ \
0xFFU, \
/* NV_BACKKEY5: KEY=0xFF */ \
0xFFU, \
/* NV_BACKKEY4: KEY=0xFF */ \
0xFFU, \
/* NV_FPROT3: PROT=0xFF */ \
0xFFU, \
/* NV_FPROT2: PROT=0xFF */ \
0xFFU, \
/* NV_FPROT1: PROT=0xFF */ \
0xFFU, \
/* NV_FPROT0: PROT=0xFF */ \
0xFFU, \
/* NV_FSEC: KEYEN=1,MEEN=3,FSLACC=3,SEC=2 */ \
0x7EU, \
/* NV_FOPT: FOPT[7:6] = 11b means boot from ROM, other value means boot from Flash */ \
0xFFU, \
/* Reserved */ \
0xFFU, \
/* Reserved */ \
0xFFU
};