I use MKE06 debug bootloader ,please sent to me some files about it,best chinese files,
thank you !!!
Hi ahjg_xu,
There are several bootloader projects you can use. Which one do you use? KE06 need Flash base bootloader and KE16F has ROM bootloader.
Regards,
Jing
Hello!
Thank you for your feedback,
Now, I use the mke06z128xxx4 chip, debug the bootloader.
My design is to use the first 50K flash for bootdemo, and then (128k-50k) for appdemo. The bootdemo is the bootloader.
I think we should change "mke06z4_ Project_ c_ Debug.ld ”File, and redefine interrupt vector table, but I changed several versions of the program, failed.
Please give me some advice.
My current compiler is mcuxpresso 11. thank you !
Hi,
Before you jump to App, you should set SP pointer and PC pointer. If the App start address is 0xb000, the SP pointer initial address is 0xb000 and PC pointer initial address is 0xb004.
Please refer to below code.
appEntry =(*(unsigned int*)0xb0004);
appStack = (*(unsigned int*)0xb0000);
static void (*farewellBootloader)(void) = 0;
farewellBootloader = (void (*)(void))appEntry ;
// Set the VTOR to the application vector table address.
SCB->VTOR = 0xb000;
// Set stack pointers to the application stack pointer.
__set_MSP(appStack );
__set_PSP(appStack );
// Jump to the application.
farewellBootloader();
Regards,
Jing
Thank you very much for your help.
MKE06 bootLoader is ready to use.
Without your help, I don't know how longTime to debug.
Now,I have a question about setting "MCUXpresso IDE". How to output the.S19 file and how to set the output length of each line of the file?
Hi,
You can generate .s19 file in MCUXpresso directly. Right click the .axf file ->Binary Utilities->Create S-record. But it can't set output length of each line.
Regards,
Jing
But it can't set output length of each line.
Actually this is possible, see https://mcuoneclipse.com/2017/03/29/mcuxpresso-ide-s-record-intel-hex-and-binary-files/, there is an option page for the command in the workspace settings.
You can simply add --srec-len (see https://mcuoneclipse.com/2013/10/29/s-record-manipulation-with-gnu-objcopy-and-burner-utility/) to the options.
I hope this helps,
Erich
See
--srec-len
in the above article https://mcuoneclipse.com/2017/03/29/mcuxpresso-ide-s-record-intel-hex-and-binary-files/
Hi,
Which bootloader do you use? What problem you are facing? Can't jump to application? In MCUXpresso, you needn't change the .ld file manually. Just let flash start from 50k. The compiler will put vector table at the head of 0xc800. The bootloader should know it and get Reset_handler address and SP address from there.
Regards,
Jing