Page 1 of 2
fatal error: CDC_Setup.h: No such file or directory
Posted: Fri Feb 26, 2021 7:57 am
by SpeedPIC32
Hello Benj, LeighM and affected.
I am really angry
why does USB not work with the PIC32?
Since I've been using FC7 and FC8 and FC9 it doesn't work.
Pic choose,
USB choose
to adjust,
Initialize and compile without errors
It is exactly like that
I'm buying a new car with air conditioning.
In the summer I find out she doesn't work.
The dealership is trying to fix it, but open the window until we find the fault.
OK, I'll buy a newer model with air conditioning, it doesn't work either.
Last attempt, new car Does not work either.
do we always have to use a different chip for USB?
Please fix the build rate error immediately.
with kind regards to those affected
Re: fatal error: CDC_Setup.h: No such file or directory
Posted: Fri Feb 26, 2021 10:01 am
by BenR
Hello,
Please can you post your project file and I'll investigate the problem for you.
Edit. I've managed to replicate the issue. Bear with me and I'll try and get it sorted for you.
Re: fatal error: CDC_Setup.h: No such file or directory
Posted: Fri Feb 26, 2021 10:37 am
by SpeedPIC32
Hello benj,
a zip file attached
can you remove the USB interface from the PIC32mx1xx? They don't have any
I can also send a ZIP file for this.
Please also at some point the error with the wrong Baut setting
Thanks in advance
Re: fatal error: CDC_Setup.h: No such file or directory
Posted: Fri Feb 26, 2021 11:02 am
by BenR
Hello,
Right here is what you currently need to do to solve the compilation problem.
1) You need to download and install the Harmony 1.11 library from here. This contains the USB drivers and missing files.
https://www.microchip.com/mymicrochip/f ... e=en597939
Make sure you install the harmony library in the default location C:\microchip\harmony\v1_11
2) In Flowcode click Build -> Compiler options
3) Select the PIC32 programmer you are using ICD3/PICkit3/PICkit4 from the list on the left and then click on the save button at the top right of the window.
4) Give the setting a new name e.g. PIC32 USBSerial
5) Select the new item you have created in the list on the left and change the compiler location to one of the following.
HID
$(compilerpic32)batch\PIC32compHID.bat
Serial
$(compilerpic32)batch\PIC32compCDC.bat
6) Change the compiler parameters to this.
"$(chip)" "$(srcdir)" "$(target)" "$(family)"
7) Tick the "Default compiler for platform" checkbox
8) Click the OK button
9) Next extract and copy the updated compiler scripts to the toolchain folder. C:\Program Files (x86)\Flowcode\Common\Compilers\pic32\batch
Fingers crossed the USB Serial and USB HID components should now compile correctly for you.
Sorry it's not anywhere near as plug and play as normal, this one seems to have slipped through the net several times. I'll add it to the list to try and make this a bit more seamless in future.
Re: fatal error: CDC_Setup.h: No such file or directory
Posted: Fri Feb 26, 2021 11:49 am
by SpeedPIC32
hi Benj
can Harmoni version 3 be used?
you can't make a rubric in the forum where such relevant things are made public. e.g. changes since the last update for PIC AVR ESM32 and so on.
Then there is no need to search everywhere.
Many Thanks
Re: fatal error: CDC_Setup.h: No such file or directory
Posted: Fri Feb 26, 2021 11:56 am
by BenR
Hello,
can Harmoni version 3 be used?
We developed the component when Harmony 1.11 was the latest, Harmony 3 might work but the liklihood is it won't as things change over time.
Yes we try and apply most fixes via the update system. USB is currently an issue on PIC32 and AVR as you need external libraries and custom build scripts to make it work. We are working on ways to hopefully improve this so it's easier to make it work out of the box.
Re: fatal error: CDC_Setup.h: No such file or directory
Posted: Fri Feb 26, 2021 12:54 pm
by SpeedPIC32
Hi,
followed your instructions, but it does not work.
Code: Select all
Launching the compiler...
C:\Program Files (x86)\Flowcode\Common\Compilers\pic32\batch\PIC32compCDC.bat 32MX470F512L" "C:\Users\uwe\Documents\Daten\Matrix\" "USB" "32MX
Project
Device 32MX470F512L" "C:\Users\uwe\Documents\Daten\Matrix\" "USB" "32MX
Objects _32MX470F512L" "C:\Users\uwe\Documents\Daten\Matrix\" "USB" "32MX
C:\Users\uwe\Documents\Daten\Matrix>xc32-gcc -mprocessor=32MX470F512L" "C:\Users\uwe\Documents\Daten\Matrix\" "USB" "32MX -I. -IC:\ProgramData\MatrixTSL\FlowcodeV9\CAL\PIC32BIT\USB\CDC -IC:\microchip\harmony\v1_11 -IC:\microchip\harmony\v1_11\framework -w -c -ffunction-sections -O1 -o "_32MX470F512L" "C:\Users\uwe\Documents\Daten\Matrix\" "USB" "32MX\.o" ".c"
Der Befehl "xc32-gcc" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Error(s) in build
C:\Program Files (x86)\Flowcode\Common\Compilers\pic32\batch\PIC32compCDC.bat reported error code 0x1
He seems to use the wrong path. But I don't understand why.
Re: fatal error: CDC_Setup.h: No such file or directory
Posted: Fri Feb 26, 2021 3:23 pm
by BenR
Hello,
You seem to be missing the start and end quotes.
Here's how yours looks.
C:\Program Files (x86)\Flowcode\Common\Compilers\pic32\batch\PIC32compCDC.bat 32MX470F512L" "C:\Users\uwe\Documents\Daten\Matrix\" "USB" "32MX
compared to mine
C:\Program Files (x86)\Flowcode\Common\Compilers\pic32\batch\PIC32compCDC.bat "32MX470F512L" "C:\Users\Ben\Desktop\" "USB" "32MX"
Check your compiler options parameters has the quotes before $(chip) and after $(family).
"$(chip)" "$(srcdir)" "$(target)" "$(family)"
Re: fatal error: CDC_Setup.h: No such file or directory
Posted: Fri Feb 26, 2021 6:54 pm
by SpeedPIC32
Hi,
as you said, the quotes where missing. But the problem stays the same. He can't find "xc32-gcc".
Re: fatal error: CDC_Setup.h: No such file or directory
Posted: Mon Mar 01, 2021 12:10 pm
by BenR
Hello,
Please can you post your latest compiler messages. It's all working as expected for me so it's strange it' not working for you.
Code: Select all
Launching the compiler...
C:\Program Files (x86)\Flowcode\Common\Compilers\pic32\batch\PIC32compCDC.bat "32MX230F064B" "C:\Users\Ben\Desktop\" "PIC32_USB" "32MX"
Project PIC32_USB
Device 32MX230F064B
Objects PIC32_USB_32MX230F064B
C:\Users\Ben\Desktop>xc32-gcc -mprocessor=32MX230F064B -DMX_USBFS -IC:\Users\Ben\Desktop\. -IC:\ProgramData\MatrixTSL\FlowcodeV9\CAL\PIC32BIT\USB\CDC -IC:\microchip\harmony\v1_11 -IC:\microchip\harmony\v1_11\framework -w -c -ffunction-sections -O1 -o "PIC32_USB_32MX230F064B\PIC32_USB.o" "PIC32_USB.c" -DMX_USBFS
C:\Users\Ben\Desktop>xc32-gcc -mprocessor=32MX230F064B -DMX_USBFS -IC:\Users\Ben\Desktop\. -IC:\ProgramData\MatrixTSL\FlowcodeV9\CAL\PIC32BIT\USB\CDC -IC:\microchip\harmony\v1_11 -IC:\microchip\harmony\v1_11\framework -w -c -ffunction-sections -O1 "C:\microchip\harmony\v1_11\framework\usb\src\dynamic\usb_device.c" -o "PIC32_USB_32MX230F064B\usb_device.o"
C:\Users\Ben\Desktop>xc32-gcc -mprocessor=32MX230F064B -DMX_USBFS -IC:\Users\Ben\Desktop\. -IC:\ProgramData\MatrixTSL\FlowcodeV9\CAL\PIC32BIT\USB\CDC -IC:\microchip\harmony\v1_11 -IC:\microchip\harmony\v1_11\framework -w -c -ffunction-sections -O1 "C:\microchip\harmony\v1_11\framework\usb\src\dynamic\usb_device_cdc.c" -o "PIC32_USB_32MX230F064B\usb_device_cdc.o"
C:\Users\Ben\Desktop>xc32-gcc -mprocessor=32MX230F064B -DMX_USBFS -IC:\Users\Ben\Desktop\. -IC:\ProgramData\MatrixTSL\FlowcodeV9\CAL\PIC32BIT\USB\CDC -IC:\microchip\harmony\v1_11 -IC:\microchip\harmony\v1_11\framework -w -c -ffunction-sections -O1 "C:\microchip\harmony\v1_11\framework\usb\src\dynamic\usb_device_cdc_acm.c" -o "PIC32_USB_32MX230F064B\usb_device_cdc_acm.o"
C:\Users\Ben\Desktop>xc32-gcc -mprocessor=32MX230F064B -DMX_USBFS -IC:\Users\Ben\Desktop\. -IC:\ProgramData\MatrixTSL\FlowcodeV9\CAL\PIC32BIT\USB\CDC -IC:\microchip\harmony\v1_11 -IC:\microchip\harmony\v1_11\framework -w -c -ffunction-sections -O1 "C:\microchip\harmony\v1_11\framework\system\int\src\sys_int_pic32.c" -o "PIC32_USB_32MX230F064B\sys_int_pic32.o"
C:\Users\Ben\Desktop>xc32-gcc -mprocessor=32MX230F064B -DMX_USBFS -IC:\Users\Ben\Desktop\. -IC:\ProgramData\MatrixTSL\FlowcodeV9\CAL\PIC32BIT\USB\CDC -IC:\microchip\harmony\v1_11 -IC:\microchip\harmony\v1_11\framework -w -c -ffunction-sections -O1 "C:\microchip\harmony\v1_11\framework\system\devcon\src\sys_devcon.c" -o "PIC32_USB_32MX230F064B\sys_devcon.o"
C:\Users\Ben\Desktop>xc32-gcc -mprocessor=32MX230F064B -DMX_USBFS -IC:\Users\Ben\Desktop\. -IC:\ProgramData\MatrixTSL\FlowcodeV9\CAL\PIC32BIT\USB\CDC -IC:\microchip\harmony\v1_11 -IC:\microchip\harmony\v1_11\framework -w -c -ffunction-sections -O1 "C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\PIC32BIT\USB\CDC\CDCComp.c" -o "PIC32_USB_32MX230F064B\CDCComp.o"
C:\Users\Ben\Desktop>xc32-gcc -mprocessor=32MX230F064B -DMX_USBFS -IC:\Users\Ben\Desktop\. -IC:\ProgramData\MatrixTSL\FlowcodeV9\CAL\PIC32BIT\USB\CDC -IC:\microchip\harmony\v1_11 -IC:\microchip\harmony\v1_11\framework -w -c -ffunction-sections -O1 "C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\PIC32BIT\USB\CDC\CDC_FS_Desc.c" -o "PIC32_USB_32MX230F064B\CDC_Desc.o"
.
C:\Users\Ben\Desktop>xc32-gcc -mprocessor=32MX230F064B -DMX_USBFS -IC:\Users\Ben\Desktop\. -IC:\ProgramData\MatrixTSL\FlowcodeV9\CAL\PIC32BIT\USB\CDC -IC:\microchip\harmony\v1_11 -IC:\microchip\harmony\v1_11\framework -w -c -ffunction-sections -O1 "C:\microchip\harmony\v1_11\framework\driver\usb\usbfs\src\dynamic\drv_usbfs.c" -o "PIC32_USB_32MX230F064B\drv_usbxs.o"
C:\Users\Ben\Desktop>xc32-gcc -mprocessor=32MX230F064B -DMX_USBFS -IC:\Users\Ben\Desktop\. -IC:\ProgramData\MatrixTSL\FlowcodeV9\CAL\PIC32BIT\USB\CDC -IC:\microchip\harmony\v1_11 -IC:\microchip\harmony\v1_11\framework -w -c -ffunction-sections -O1 "C:\microchip\harmony\v1_11\framework\driver\usb\usbfs\src\dynamic\drv_usbfs_device.c" -o "PIC32_USB_32MX230F064B\drv_usbxs_device.o"
C:\Users\Ben\Desktop>xc32-gcc -mprocessor=32MX230F064B -DMX_USBFS -IC:\Users\Ben\Desktop\. -IC:\ProgramData\MatrixTSL\FlowcodeV9\CAL\PIC32BIT\USB\CDC -IC:\microchip\harmony\v1_11 -IC:\microchip\harmony\v1_11\framework -w -c -ffunction-sections -O1 "C:\microchip\harmony\v1_11\framework\system\devcon\src\sys_devcon_pic32mx.c" -o "PIC32_USB_32MX230F064B\sys_devcon_pic32mxz.o"
C:\Users\Ben\Desktop\PIC32_USB_32MX230F064B>xc32-gcc -mprocessor=32MX230F064B -Wl,-T"C:\PROGRA~2\Flowcode\Common\COMPIL~1\pic32\batch\..\bin\..\pic32mx\lib\proc\32MX230F064B\p32MX230F064B.ld",--defsym=__MPLAB_BUILD=1,--defsym=_min_heap_size=0,--gc-sections "CDCComp.o" "CDC_Desc.o" "drv_usbxs.o" "drv_usbxs_device.o" "PIC32_USB.o" "sys_devcon.o" "sys_devcon_pic32mxz.o" "sys_int_pic32.o" "usb_device.o" "usb_device_cdc.o" "usb_device_cdc_acm.o" -o "..\PIC32_USB.elf"
C:\Users\Ben\Desktop\PIC32_USB_32MX230F064B>xc32-bin2hex "..\PIC32_USB.elf"
C:\Users\Ben\Desktop\PIC32_USB_32MX230F064B>xc32-objdump -t -d -h "..\PIC32_USB.elf" 1>"PIC32_USB.lst"
C:\Users\Ben\Desktop\PIC32_USB_32MX230F064B>xc32-size -B "..\PIC32_USB.elf"
text rodata data bss dec hex filename
16828 392 80 852 18152 46e8 ..\PIC32_USB.elf
Compilation successful