嗨,我正在使用目录C:\\\\\\\\\\\\\微芯片\\\\微芯片\\\\\\\\\\\\\固件,如果我禁用“使用引导加载程序”,那么上面的应用程序固件是很好(它在EEPROM上写数据),但是当我启用bootloader时,构建应用程序链接器脚本和引导加载程序类型为USB_DEVICE,然后它不与基本引导加载程序一起工作。仅更改了函数:app.c文件:int APP_ForceBootloaderCheck(void){//对于大多数基本引导加载程序,对开关(S3)和//内存位置的检查将决定问题。//If(bSP.SwitkStaseSype=BSPwitwitsTwiteGET(BSPEX SwitCH3))(*(U
ti32×T**)BooTouleRoFras-TrutGrGy地址!=0xFFFFFFFF).(1);.(0);return(0);}和system_config.h:#定义BOOTLOADER_LEGACY\#定义BOOTLOADER_BOOTLOADER_FLASH_TRIGGER_TRIGGER_TRIGGER_ADDRESS0x9D061000增加了这些行。(附上我的i2c_测试固件以构建它,成功地将其保持在“C:\\\\\\\\\\\\i2c_testi2c_test目录
以上来自于百度翻译
以下为原文
Hi,
I am using basic firmware present in directory C:microchiph
ARMonyv1_07_01appsbootloaderbasicfirmware, and I kept my application firmware in C:microchipharmonyv1_07_01appsu***devicei2c_testi2c_testfirmware, if I disable the 'Use bootloader' then the above application firmware is working fine( its writting data on EEPROM), but when I enable use bootloader, build application linker script and bootloader type as USB_DEVICE, then its not working with basic bootloader.
For customizing the bootloader, I made Few changes in basic bootloader as below:
In the apps/bootloader/basic fw I only changed the function:
app.c file :
int APP_ForceBootloaderCheck(void)
{
// For most of the basic bootloaders, the check of the switch (S3) and
// the memory location will decide the question.
//if (BSP_SWITCH_STATE_PRESSED == BSP_SwitchStateGet(BSP_SWITCH_3))
if (*(uint32_t *)BOOTLOADER_FLASH_TRIGGER_ADDRESS != 0xFFFFFFFF)
return (1);
return (0);
}
and in system_config.h:
#define BOOTLOADER_LEGACY
#define BOOTLOADER_FLASH_TRIGGER_ADDRESS 0x9D061000
these lines added.
(attached my i2c_test firmware to build it succesfully keep it in "C:microchipharmonyv1_07_01appsu***devicei2c_testi2c_test" directory)
Attachment(s)
firmware.zip (499.97 KB) - downloaded 27 times