FC 8.2 + PIC32MZ + USB HID

Moderator: Benj

ronaldlijs
Posts: 98
Joined: Tue Jan 05, 2010 10:07 am
Has thanked: 9 times
Been thanked: 21 times
Contact:

FC 8.2 + PIC32MZ + USB HID

Postby ronaldlijs » Thu Oct 17, 2019 9:03 pm

Hi guys (Ben),

I'm tryiung to get USB HID working on PIC32MZ1023EFE100 without luck.

I've followed the instructions on a Word Document (PIC32 USB Instructions.doc) from 2017 that I found on the Forum referring to Harmony 1.11 (which I found and downloaded - although current Harmony version is 3.x) and Flowcode 7.x (which at the moment its' Flowcode 8.2 I'm using), but compiling doesn't work and well, was just wondering how to get USB HID component to actually work on PIC32MZ and FC8...? Would you have some documentation about this?

Problem is that the Word document talks about FC7 and the FC8 folders are totally different than FC7... :-(

Code: Select all

C:\Program Files (x86)\Flowcode\Compilers\pic32\batch\PIC32compHID.bat  "32MZ1024EFE100" "D:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1\" "CONTROL_PCB_V1_TEST" "32MZ"

Project CONTROL_PCB_V1_TEST
Device 32MZ1024EFE100
Objects CONTROL_PCB_V1_TEST_32MZ1024EFE100

D:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1>xc32-gcc -mprocessor=32MZ1024EFE100 -DMX_USBHS -ID:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1\. -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\USB\HID -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony\framework -w -c -ffunction-sections -O1 -o "CONTROL_PCB_V1_TEST_32MZ1024EFE100\CONTROL_PCB_V1_TEST.o" "CONTROL_PCB_V1_TEST.c"

D:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1>xc32-gcc -mprocessor=32MZ1024EFE100 -DMX_USBHS -ID:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1\. -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\USB\HID -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony\framework -w -c -ffunction-sections -O1 "C:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony\framework\usb\src\dynamic\usb_device.c" -o "CONTROL_PCB_V1_TEST_32MZ1024EFE100\usb_device.o"
xc32-gcc.exe: error: C:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony\framework\usb\src\dynamic\usb_device.c: No such file or directory
xc32-gcc.exe: fatal error: no input files
compilation terminated.
Error(s) in build


How can I get this to actually work in FC8??

Cheers,
R

ronaldlijs
Posts: 98
Joined: Tue Jan 05, 2010 10:07 am
Has thanked: 9 times
Been thanked: 21 times
Contact:

Re: FC 8.2 + PIC32MZ + USB HID

Postby ronaldlijs » Sat Oct 19, 2019 9:15 pm

Hi Ben,

Althought the CAL elements in my FC 8.2 install are under:
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC32BIT

I had copied the harmony files in this folder. I have copied the harmony files AND the USB files that are under
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC32BIT
into:
C:\Program Files (x86)\Flowcode\CAL\PIC32BIT

And now the first error does not appear any more. However it now complains about MX_MANF_NAME_P32 and MX_PRDCT_NAME_P32, I suppose these need to be "MZ" instead of "MX"?

Anyway, hope this helps as I have no clue how to fix this one...

Code: Select all

Launching the compiler...
C:\Program Files (x86)\Flowcode\Compilers\pic32\batch\PIC32compHID.bat  "32MZ1024EFE100" "D:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1\" "CONTROL_PCB_V1_TEST" "32MZ"

Project CONTROL_PCB_V1_TEST
Device 32MZ1024EFE100
Objects CONTROL_PCB_V1_TEST_32MZ1024EFE100


D:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1>xc32-gcc -mprocessor=32MZ1024EFE100 -DMX_USBHS -ID:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1\. -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\USB\HID -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony\framework -w -c -ffunction-sections -O1 -o "CONTROL_PCB_V1_TEST_32MZ1024EFE100\CONTROL_PCB_V1_TEST.o" "CONTROL_PCB_V1_TEST.c"

D:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1>xc32-gcc -mprocessor=32MZ1024EFE100 -DMX_USBHS -ID:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1\. -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\USB\HID -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony\framework -w -c -ffunction-sections -O1 "C:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony\framework\usb\src\dynamic\usb_device.c" -o "CONTROL_PCB_V1_TEST_32MZ1024EFE100\usb_device.o"

D:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1>xc32-gcc -mprocessor=32MZ1024EFE100 -DMX_USBHS -ID:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1\. -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\USB\HID -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony\framework -w -c -ffunction-sections -O1 "C:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony\framework\usb\src\dynamic\usb_device_hid.c" -o "CONTROL_PCB_V1_TEST_32MZ1024EFE100\usb_device_hid.o"

D:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1>xc32-gcc -mprocessor=32MZ1024EFE100 -DMX_USBHS -ID:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1\. -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\USB\HID -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony\framework -w -c -ffunction-sections -O1 "C:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony\framework\system\int\src\sys_int_pic32.c" -o "CONTROL_PCB_V1_TEST_32MZ1024EFE100\sys_int_pic32.o"

D:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1>xc32-gcc -mprocessor=32MZ1024EFE100 -DMX_USBHS -ID:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1\. -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\USB\HID -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony\framework -w -c -ffunction-sections -O1 "C:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony\framework\system\devcon\src\sys_devcon.c" -o "CONTROL_PCB_V1_TEST_32MZ1024EFE100\sys_devcon.o"

D:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1>xc32-gcc -mprocessor=32MZ1024EFE100 -DMX_USBHS -ID:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1\. -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\USB\HID -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony\framework -w -c -ffunction-sections -O1 "C:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\USB\HID\HIDComp.c" -o "CONTROL_PCB_V1_TEST_32MZ1024EFE100\HIDComp.o"

D:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1>xc32-gcc -mprocessor=32MZ1024EFE100 -DMX_USBHS -ID:\Projects\CASHAR~1\Products\ELECTR~1\U22BEL~2\FC8\CONTRO~1\. -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\USB\HID -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony -IC:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\harmony\framework -w -c -ffunction-sections -O1 "C:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\USB\HID\HID_HS_Desc.c" -o "CONTROL_PCB_V1_TEST_32MZ1024EFE100\HID_Desc.o"
C:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\USB\HID\HID_HS_Desc.c:327:9: error: 'MX_MANF_NAME_P32' undeclared here (not in a function)
         MX_MANF_NAME_P32
         ^
C:\PROGRA~2\Flowcode\COMPIL~1\pic32\batch\..\..\..\CAL\PIC32BIT\USB\HID\HID_HS_Desc.c:344:3: error: 'MX_PRDCT_NAME_P32' undeclared here (not in a function)
   MX_PRDCT_NAME_P32
   ^
Error(s) in build
.

C:\Program Files (x86)\Flowcode\Compilers\pic32\batch\PIC32compHID.bat reported error code 1


Cheers,
R

ronaldlijs
Posts: 98
Joined: Tue Jan 05, 2010 10:07 am
Has thanked: 9 times
Been thanked: 21 times
Contact:

Re: FC 8.2 + PIC32MZ + USB HID

Postby ronaldlijs » Thu Oct 24, 2019 9:41 am

Hi Ben,

Any chance of having a quick look at this? We are kind of stuck atm without USB :-(

Is this just a batch compiling issue or more difficult to fix?

Thanks for your time,
R