嗨,我正在使用PIC32 MZ2048 EFH064,我有一个Bootloader位于BFM中。以及PFM中的应用固件。-第一次上电设备将处于主引导加载模式,并将下载应用固件。在应用程序中,我集成了二次Bootloader,以便我的应用固件可以作为辅助引导加载程序来更新主引导加载程序,或者它可以运行正常的应用程序任务。-我强制应用到二次引导加载模式来下载主引导加载程序。从主引导加载程序复制到我的应用程序的完全相同的源文件,只有我做的更改是使用NVBWP相关函数来禁用BFM WP的附加函数,将区域的地址更改为擦除/编程。主引导加载程序链接器:-KSK1Y-BootmiMe:Ont= 0xBFC000,长度=0x480/*C启动代码*/-KSG00SudioMym(Rx):Orthase= 0x9FC01000,长度=0xFF00 -0x1000 - KSG00BooToMeM:原点=0x9FC04B0,长度=0x00兆-kSe1BoObMyMy4B0:Orth= 0xBFC000 4B0,长度=0x1000~0x4B0-组态BFC0FF40:Orth= 0xBFC0FF40,长度=0x4-……(所有配置)我的应用程序链接器:-KSGE1XBoToMeMe:Orth= 0x9D900M,长度=0x480/*C启动代码*/-KSG00SudithMeX(Rx):Orthase= 0x9D900M+0x480,长度=0x20000 -0x480/*所有C文件将位于这里*/-KSG00BooToMeMe:Orth= 0x9D900M,长度=0x0i被混淆消除擦除启动闪存在地址0x1fc01000或0x1fc000?我需要擦除C启动代码,配置位吗?如果我擦除配置比特,时钟将如何执行?
以上来自于百度翻译
以下为原文
Hi,
- I am using PIC32MZ2048EFH064, I am having Primary bootloader located in BFM. And applica
tion firmware in PFM.
- On first power ON device will be in Primary bootloader mode, and it will download application firmware.
- In application, I integrated Secondary bootloader so that my application firmware can either run as Secondary bootloader to update primary bootloader, or it can run normal application tasks.
- I force application to secondary bootloader mode to download primary bootloader.
- Here comes problem :
I copied exact same source files from Primary bootloader to my application,Only changes I made are - Added function to disable BFM WP using NVMBWP related functions, changed addresses of area to erase/program.
Primary Bootloader linker :
- kseg1_boot_mem : ORIGIN = 0xBFC00000, LENGTH = 0x480 /*C Startup code */
- kseg0_program_mem (rx) : ORIGIN = 0x9fc01000, LENGTH = 0xFF00 - 0x1000
- kseg0_boot_mem : ORIGIN = 0x9fc004b0, LENGTH = 0x00000000
- kseg1_boot_mem_4B0 : ORIGIN = 0xBFC004B0, LENGTH = 0x1000 - 0x4B0
- config_BFC0FF40 : ORIGIN = 0xBFC0FF40, LENGTH = 0x4
- ....... (all configs)
My application linker :
- kseg1_boot_mem : ORIGIN = 0x9D000000, LENGTH = 0x480 /*C Startup code */
- kseg0_program_mem (rx) : ORIGIN = 0x9D000000 + 0x480, LENGTH = 0x200000 - 0x480 /* All C files will be located here */
- kseg0_boot_mem : ORIGIN = 0x9D000000, LENGTH = 0x0
I am confused whether to erase Boot flash starting at address 0x1FC01000 or 0x1FC00000 ? Do I need to erase C startup code, config bits? If I erase config bits how the clock will execute?