嗨,和声2.04增加了一个USB例子为PIC32 MK系列(使用PIC32 MK GP板,我有)我能够让它运行,然后剥离我不需要的一切,所以我可以用它作为一个基础项目。伟大的!不过,我还想添加一个USB引导加载程序,而当我了解引导程序的程序流程并可以写一个程序时,USB部分就是我遇到的问题。一个更好的解决方案不是重新创建轮子,使用一个现成的引导加载程序(希望在引导内存块中安装)。在当前版本的和声(2.04)中,USB设备Bootloader(我想我想使用它)没有PIC32 MK的项目配置设置。我试图用MK1024GPE100作为处理器创建一个新的和声配置,重新配置时钟。并检查其他配置字以匹配我的板。编译,如果我运行代码,当这个代码块被删掉时我会得到一个异常,我该怎么办?我想在下一个和声版本中看到一个CONF文件,但是我不知道新版本何时会出现(现在可能有两个MK的例子,只有一个在真正需要的区域,USB)。
以上来自于百度翻译
以下为原文
Hi,
H
ARMony 2.04 added an u*** example for the PIC32MK series (using the PIC32MK GP board, which i have)
I was able to get it to run and then strip away everything i didn't need so i can use it as a base project. Great!
However, i'd like also to add a USB bootloader and while i undestand the program flow of a bootloader and can write one, the USB part is what I am having problems at.
A better solu
tion would be not to reinvent the wheel and use a ready made bootloader (that hopefully fits inside the boot memory block) but i can't find one.
In the current version of harmony (2.04) the USB Device Bootloader (which is what i think i want to use) doesn't have a project configuration setting for PIC32MK. I tried to create a new harmony configuration using the MK1024GPE100 as the processor, reconfigurated the clock and checked the other configuration words to match my board. Compiles, buth if i run the code i get an exception when this block of code is excecuted
PLIB_TEMPLATE bool USB_OTG_InterruptFlagGet_Default( USB_MODULE_ID index , USB_OTG_INTERRUPTS interruptFlag )
{
volatile u***_registers_t * u*** = ((u***_registers_t *)(index));
return ( ( ( ( u***->UxOTGIR.w ) & ( interruptFlag) )) ? 1 : 0 );
}
how should i proceed?
I'd like to see a conf file in the next harmony release but i don't know when the new release will be (there are maybe two examples for the MK at the moment, and only one in an area where it's really needed, USB)
thanks to all