Microchip's Accessory Framework for Android(tm)
46
8 FAQs, Tips, and Troubleshooting
8.1 My PIC32 project gets a run time exception.
What could be wrong?
There are several issues that could be causing the runtime exceptions in a PIC32 project. Here are some things to check
that might help you find the source of the issue.
1. Check to make sure that you have a heap size defined. The USB host stack uses dynamic memory allocation, thus needs
a heap size defined. To add a heap to the project, go to the linker settings. This can be found in the "Project->Build
Options->Project->MPLAB PIC32 Linker" menu in MPLAB 8. This can be found in the "File->Project Properties->(current
build configuration)->C32->pic32-ld" in MPLAB X.
2. If a heap size is defined you can use the general exception vector to trap the error and determine what address caused
the exception. This can be done using something similar to the following code:
#if defined(__C32__)
void _general_exception_handler( unsigned cause, unsigned status)
{
unsigned long address = _CP0_GET_EPC();
DEBUG_ERROR("exception");
while (1){}
}
#endif
This will catch the exception and lock the code in a while(1). From this point you can halt the code and look at the address
variable to see what address caused the exception. Use the disassembly listing to determine the corresponding line of C
code.
8.2 How do I debug without access to ADB?
Though the USB is connected to the accessory now instead of the IDE for debugging, you can still access the ADB interface
through a network. Please see http://developer.android.com/guide/topics/usb/index.html for more information about how to
set this up.
You might also consider using a USB analyzer to determine what is actually happening on the USB bus. Please refer to the
Debugging the USB connection section for more details.
8
46
相关PDF资料
DM300004-2 BOARD DEMO DSPICDEM.NET 2
DM300014 BOARD DEMO DSPICDEM 1.1 GEN PURP
DM300016 BOARD DEMO DSPICDEM STARTER
DM300017 BOARD DEMO DSPICDEM STARTER
DM300020 BOARD DEV DSPICDEM MC1 MOTORCTRL
DM300021 MODULE PWR DSPICDEM MC1H HV 3PHS
DM300022 MODULE PWR DSPICDEM MC1L LV 3PHS
DM320002 BOARD EXPANSION PIC32 I/O
相关代理商/技术参数
DM2410-0AL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-0BL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-0CL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-0DL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-0GL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-0HL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-0SL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-1AL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic