Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pinguino PIC32MX440Fxxx native USB HID operation
20-05-2016, 02:40 PM,
#1
Pinguino PIC32MX440Fxxx native USB HID operation
I am attempting to develop a routine based on two example projects.  Based on a Wire I2C master read and Custom USB HID native operation.  I have decided to use the newer Arduino tool kit and have attempted to compile these examples with MPIDE, UECIDE without any luck.   It appears as if I can get the Wire to compile, don't know if it works?  When I attempt to compile CustomHID.pde I see issues that I don't understand, below. 
 
 
Arduino: 1.6.8 (Windows 7), Board: "PIC32 Pinguino"
C:\Users\Ken\AppData\Local\Temp\build2ee4b577e1509cd794bdb52531edd480.tmp/core\core.a(HardwareSerial_usb.c.o): In function `__vector_dispatch_45':
c:/users/ken/appdata/local/arduino15/packages/chipkit/hardware/pic32/1.0.1/cores/pic32/hardwareserial_usb.cSad.vector_45+0x0): multiple definition of `__vector_dispatch_45'
libraries\chipKITUSBDevice\utility\usb_device.c.o:c:/users/ken/documents/arduino/libraries/chipkitusbdevice/utility/usb_device.cSad.vector_45+0x0): first defined here
c:\users\ken\appdata\local\arduino15\packages\chipkit\tools\pic32-tools\4.8.3-pic32gcc\bin\bin\gcc\pic32mx\4.8.3\..\..\..\..\bin/pic32-ld.exe: function at exception vector 45 too large
c:\users\ken\appdata\local\arduino15\packages\chipkit\tools\pic32-tools\4.8.3-pic32gcc\bin\bin\gcc\pic32mx\4.8.3\..\..\..\..\bin/pic32-ld.exe: Link terminated due to previous error(s).
collect2.exe: error: ld returned 255 exit status
exit status 255
Error compiling for board PIC32 Pinguino.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

 
 
Here is a compile with a MX4cK board.
 
Arduino: 1.6.8 (Windows 7), Board: "Cerebot MX4cK"
Build options changed, rebuilding all
libraries\chipKITUSBDevice\utility\usb_device.c.o: In function `USBDeviceAttach':
c:/users/ken/documents/arduino/libraries/chipkitusbdevice/utility/usb_device.c:2866: undefined reference to `INTEnableSystemMultiVectoredInt'
c:/users/ken/documents/arduino/libraries/chipkitusbdevice/utility/usb_device.c:2866: undefined reference to `INTEnableInterrupts'
collect2.exe: error: ld returned 255 exit status
exit status 255
Error compiling for board Cerebot MX4cK.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
 
Where am I going wrong?
Ken
Reply
20-05-2016, 03:06 PM,
#2
RE: Pinguino PIC32MX440Fxxx native USB HID operation
On this Pinguino forum we work with the Pinguino IDE v12 or V11, not with MPIDE or UECIDE. Sorry we can't reply so ask on their forum for your troubles.
André
Reply
20-05-2016, 03:17 PM,
#3
RE: Pinguino PIC32MX440Fxxx native USB HID operation
(20-05-2016, 03:06 PM)gtcbreizh Wrote: On this Pinguino forum we work with the Pinguino IDE v12 or V11, not with MPIDE or UECIDE. Sorry we can't reply so ask on their forum for your troubles.
André
I will attempt to use Pinguino tools maybe this will work?
Reply
21-05-2016, 02:12 PM,
#4
RE: Pinguino PIC32MX440Fxxx native USB HID operation
Andre

I installed Pinguino IDE rev959.  After a little fumbling I have it working and was able to get som of the examples working with one of my Pinguino-Micro RevB boards.  Interestingly I was unable to get any of the USB examples to work, here is the error information from the USB BULK .... project

if exist C:\x4-easy-rev959\source\main32.o @del C:\x4-easy-rev959\source\main32.o

if exist C:\x4-easy-rev959\source\main32.elf @del C:\x4-easy-rev959\source\main32.elf

if exist C:\x4-easy-rev959\source\main32.hex @del C:\x4-easy-rev959\source\main32.hex

if exist C:\x4-easy-rev959\p32\obj\non-free\processor.o @del C:\x4-easy-rev959\p32\obj\non-free\processor.o

C:\x4-easy-rev959\win32\p32\bin\mips-gcc.exe -EL -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -march=24kc -msoft-float -minterlink-mips16 -Wl,-LC:\x4-easy-rev959\p32\obj\non-free -Wl,--defsym,_min_heap_size=16384 -Wl,-Map=C:\x4-easy-rev959\source\output.map -D __PIC32MX__ -D __32MX440F256H__ -D PIC32_PINGUINO_MICRO -TC:\x4-easy-rev959\p32\lkr\PIC32_PINGUINO_MICRO\procdefs.ld -TC:\x4-easy-rev959\p32\lkr\PIC32_PINGUINO_MICRO\elf32pic32mx.x -LC:\x4-easy-rev959\p32\obj\non-free\usb -lm -lgcc -lc -fdollars-in-identifiers -IC:\x4-easy-rev959\p32\include\non-free -IC:\x4-easy-rev959\p32\include\pinguino\core -IC:\x4-easy-rev959\p32\include\pinguino\libraries -IC:\x4-easy-rev959\p32\lkr\PIC32_PINGUINO_MICRO -IC:\x4-easy-rev959\examples\04.Communication\USB\Bulk -IC:\x4-easy-rev959\p32\obj\non-free -msoft-float -ffunction-sections -fdata-sections  -mips16 -c -o C:\x4-easy-rev959\source\main32.o C:\x4-easy-rev959\source\main32.c 

In file included from C:\x4-easy-rev959\source\main32.c:38:0:

C:\x4-easy-rev959\source\/user.c: In function 'loop':

C:\x4-easy-rev959\source\/user.c:17:5: error: 'BULK' undeclared (first use in this function)

C:\x4-easy-rev959\source\/user.c:17:5: note: each undeclared identifier is reported only once for each function it appears in

make: *** [link] Error 1


So I moved to a Chipkit example.  I think this problem for starters is due to me not knowing how to import a project into IDE.  The file below "chipKITUSBHIDFunction.h: No such file or directory" is in the same directory as the project file " CustomHID.pde"   


if exist C:\x4-easy-rev959\source\main32.o @del C:\x4-easy-rev959\source\main32.o

if exist C:\x4-easy-rev959\source\main32.elf @del C:\x4-easy-rev959\source\main32.elf

if exist C:\x4-easy-rev959\source\main32.hex @del C:\x4-easy-rev959\source\main32.hex

if exist C:\x4-easy-rev959\p32\obj\non-free\processor.o @del C:\x4-easy-rev959\p32\obj\non-free\processor.o

C:\x4-easy-rev959\win32\p32\bin\mips-gcc.exe -EL -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -march=24kc -msoft-float -minterlink-mips16 -Wl,-LC:\x4-easy-rev959\p32\obj\non-free -Wl,--defsym,_min_heap_size=16384 -Wl,-Map=C:\x4-easy-rev959\source\output.map -D __PIC32MX__ -D __32MX440F256H__ -D PIC32_PINGUINO_MICRO -TC:\x4-easy-rev959\p32\lkr\PIC32_PINGUINO_MICRO\procdefs.ld -TC:\x4-easy-rev959\p32\lkr\PIC32_PINGUINO_MICRO\elf32pic32mx.x -LC:\x4-easy-rev959\p32\obj\non-free\usb -lm -lgcc -lc -fdollars-in-identifiers -IC:\x4-easy-rev959\p32\include\non-free -IC:\x4-easy-rev959\p32\include\pinguino\core -IC:\x4-easy-rev959\p32\include\pinguino\libraries -IC:\x4-easy-rev959\p32\lkr\PIC32_PINGUINO_MICRO -IC:\x4-easy-rev959\examples\11.chipKIT Network and USB Libs-20150115\libraries\chipKITUSBDevice\examples\CustomHID -IC:\x4-easy-rev959\p32\obj\non-free -msoft-float -ffunction-sections -fdata-sections  -mips16 -c -o C:\x4-easy-rev959\source\main32.o C:\x4-easy-rev959\source\main32.c 

In file included from C:\x4-easy-rev959\source\main32.c:29:0:

C:\x4-easy-rev959\source\/define.h:10:35: fatal error: chipKITUSBHIDFunction.h: No such file or directory

compilation terminated.

mips-gcc.exe: Network: No such file or directory

mips-gcc.exe: and: No such file or directory

mips-gcc.exe: USB: No such file or directory

mips-gcc.exe: Libs-20150115\libraries\chipKITUSBDevice\examples\CustomHID: No such file or directory

make: *** [link] Error 1


Can you point me in the correct direction?

Ken
Reply
21-05-2016, 03:42 PM,
#5
RE: Pinguino PIC32MX440Fxxx native USB HID operation
Hello Ken,
Immediately I am busy but as soon as possible I shall look at the bulk problem.
For the import you can not do it as  easily as you imagine. Could you attach your pde example in a new reply ?
Bye
André
Reply
21-05-2016, 04:36 PM,
#6
RE: Pinguino PIC32MX440Fxxx native USB HID operation
Hello Ken,
In the 04.Communications\USB folder you find 2 subdirectories BULK and CDC. Up to now the BULK examples work only with 8bits microcontrollers. This is why your compiling aborted.
Try the CDC examples. You have to open a serial terminal. A virtual port COMxx is created by these examples. Look into the device panel to know the value xx.
To developp the BULK functions which are in p8\include\pinguino\libraries we need a little time.
Bye
André
Reply
22-05-2016, 02:47 PM,
#7
RE: Pinguino PIC32MX440Fxxx native USB HID operation
Andre

I was able to get CDC examples to work, nice.  Mt additional requirement is for the device to be a HID interface so that the application can locate it without user intervention.  Attached is the HID example I am using.  

Thank you fro helping me.
Ken


Attached Files
.zip   CustomHID.zip (Size: 32.82 KB / Downloads: 2)
Reply
22-05-2016, 02:54 PM,
#8
RE: Pinguino PIC32MX440Fxxx native USB HID operation
Andre

I think you need more of the library tree.  Attached is a zip taken a little higher up the tree.


Attached Files
.zip   chipKITUSBDevice.zip (Size: 268.65 KB / Downloads: 2)
Reply
22-05-2016, 03:36 PM,
#9
RE: Pinguino PIC32MX440Fxxx native USB HID operation
Hello Ken,
Thanks for CustomHID.zip.
It is unsufficient to test CustomHID.pde.
Could you give me the chipKIT URL where I should be able  to upload the chipKIT USB library and more generally chipKIT libraries because I found missing files ?
1- chipKITUSBDevice.h lacks.
2- USB\usb_function_hid.h too. For this file I tried to replace  it by the Microchip one but it does not work.
I imagine other ones are missing.

N.B. I own a Pinguino Micro. I worked a bit with it . So I should be able to test.

Bye
André
Reply
22-05-2016, 03:39 PM,
#10
RE: Pinguino PIC32MX440Fxxx native USB HID operation
Sorry when I was testing, another post is arrived. I look at it to know if I find the missing elements.
André
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)