嗨,我一直在努力获得一个版本的MLA MSdSimeLeMo演示在我自己的硬件上没有成功。在调试器下运行(或下载下载运行时程序崩溃)时,我不断获得“由于用户代码中的软件断点而停止目标”的消息。最后,我用PIC24FJ256GB110 PIM回溯到Explorer 16,PICTHOST硬件和示例MLA MSDSimple EXEDE DEMO代码,但结果完全相同。当使用“调试主项目”按钮时,在C之后不久,我就得到了“由于用户代码中的软件断点而停止的目标”。ODE开始运行。当使用“制作和编程设备主项目”时,程序加载但出现崩溃。(在我自己的硬件,在相同的情况下,我可以看到微控制器重新启动,一旦它到执行USB任务的点)。尝试设置断点赶上事情出错了没有工作。我使用ICD3,MPLAB X IDE 4.10,XC16 V1.26,MLA V2017Y03Y06,并利用了所有。适当的文件(据我所知)来自MLA ApvsUSB 主机 MSDY SimuleMeDo和Fielo和USB框架。我的项目有3个逻辑FrutssFielo中的头文件:FILIO.H.FILIOOLLFN.H(可能不需要)FILIOOIMENTA.HSRC:AppIHOSTHOMMSDYORUNION.H FILIOOXCONFIG.H St.HythySoCyFig .hUBSCON
tiON.HUBB:U.BBSCH9.H UBSU.H.UbByHal.H.UbjHID.h(可能不需要)UBSHEST.H.UBSHOSTHOMDSM.H.UBSHOSTOMSTMSDYSCSI .H.UBJStrutStQueLay.类似地,我已经将项目源文件组织成3个逻辑FLDRESFILIO:FILIOO.CSRC:AppHythMasdMSUnLim.C St.CC.UbjHalpPix.fc.UbbHyPIC24f.c UbxHooStMDS.C UbxHooStMsdssi.C.这些文件都是MLA V2017Y03Y06中未更改的副本,除了对UbjalHalpPi24f.c的一些小改变,其中I1)将“BOOL USBSleepOnSuspend(无效)”改为“bool USBSleepOnSuspend(无效)2)CH。由于BoL和true是未定义的,在“最后一行”中返回“true”到“返回true”。对我可能做的错误的任何建议都将非常感谢!安得烈
以上来自于百度翻译
以下为原文
Hi,
I've been battling to get a version of the MLA msd_simple_demo working on my own hardware without success. I keep getting the "Target halted due to Software Breakpoint in user code" message when running under the debugger (or program crash when downloading to run). I eventually backtracked all the way back to an Explorer 16 with PIC24FJ256GB110 PIM, PICtail hardware and sample MLA msd_simple_demo code, but with exactly the same results.
When using the "Debug Main Project" button, I get "Target halted due to Software Breakpoint in user code" shortly after the code starts running. When using the "Make and Program Device Main Project", the program loads but appears to crash. (On my own hardware, in the same situation, I could see the microcontroller restarting once it got to the point of executing the USB tasks).
Trying to set breakpoints to catch where things go wrong has not worked.
I am using ICD3, MPLAB X IDE 4.10, xc16 V1.26, MLA v2017_03_06 and have made use of all appropriate files (as far as I know) from MLA appsu***hostmsd_simple_demo and from the fileio and u*** framework.
My project has Header Files in 3 logical folders
fileio :
fileio.h
fileio_lfn.h (probably not needed)
fileio_media.h
src :
app_host_msd_simple.h
fileio_config.h
system.h
system_config.h
u***_config.h
u*** :
u***.h
u***_ch9.h
u***_common.h
u***_hal.h
u***_hal_pic24f.h
u***_hid.h (probably not needed)
u***_host.h
u***_host_msd.h
u***_host_msd_scsi.h
u***_struct_queue.h
Similarly, I have organised the project Source Files into 3 logical folders
fileio :
fileio.c
src :
app_host_msd_simple.c
system.c
main.c
u***_config.c
u*** :
u***_hal_pic24f.c
u***_host.c
u***_host_msd.c
u***_host_msd_scsi.c
These files are all unaltered copies of what is in MLA v2017_03_06 except for a couple of minor changes to u***_hal_pic24f.c where I
1) Changed "BOOL USBSleepOnSuspend(void)" to "bool USBSleepOnSuspend(void)"
2) Changed "return TRUE" to "return true" in the last line of USBSleepOnsuspend()
due to BOOL and TRUE being undefined.
Any suggestions on what I might be doing wrong would be very much appreciated!
Andrew