USBIO board with MPLAB IDE

Post Reply
mgssnr
Posts: 6
Joined: Sat Mar 07, 2020 1:23 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

USBIO board with MPLAB IDE

Unread post by mgssnr » Sat Mar 07, 2020 1:37 am

Hi,

Sorry for the somewhat lengthy post.

I bought one of the cool usbio boards built with the PIC18F45K50 micro. It's really a great board, but it seems that the source code isn't not compatible with the most recent MPLAB IDE. Loading the project and attempting to compile gives nothing but errors. I got the project from the github link, and I tried the one from https://wiki.odroid.com/accessory/add-o ... and_odroid (there's a ZIP file that includes the source).

Is there a more recent version of this that will build with this IDE? I'm new to the PIC families, and haven't found enough resources yet to help me figure out exactly what I'd need to do what I want.

Basically, I want a more flexible firmware that allows things like pin configuration (PWM, UART, etc, etc) because the chip is pretty flexible and so is the board.

I know the board is an example as well as functional for some projects. The firmware is a great start, but I can't get it to compile much less modify it for what I want to do.

Thanks in advance,
mgssnr

User avatar
odroid
Site Admin
Posts: 33698
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 515 times
Been thanked: 507 times
Contact:

Re: USBIO board with MPLAB IDE

Unread post by odroid » Mon Mar 09, 2020 11:31 am

The tested latest version was MPLABX-IDE v2.05 a few years ago.

What errors did you meet while compiling the source with the latest IDE version?

mgssnr
Posts: 6
Joined: Sat Mar 07, 2020 1:23 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USBIO board with MPLAB IDE

Unread post by mgssnr » Tue Mar 24, 2020 10:59 pm

Thanks for your reply.

I will get back to you on this, with some info on where I put the code and what I'm seeing.

Sorry for the delay in responding; COVID-19 is causing me to be a little busier.

Regards,
mgssnr

mgssnr
Posts: 6
Joined: Sat Mar 07, 2020 1:23 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USBIO board with MPLAB IDE

Unread post by mgssnr » Thu Apr 09, 2020 11:06 am

Hi,

I appreciate your patience. I'm finally able to get back to this.

Here's what I've done.

a) git clone https://github.com/hardkernel/Odroid-USBIO into ~/work/
b) open MPLab X IDE v5.35
c) opened the MPLab.X project from "~/work/Odroid-USBIO/Microchip Solutions v2012-10-15/USB/Device - HID - Custom Demos/Firmware"
i) I get a notice that says "This will upgrade the project to the current project version. Would you like to continue? If you choose Yes, the project will be upgraded to the current version and the project can no longer be opened with the earlier version of the IDE." Yes/No
ii) I choose No.
iii) There are Configuration Errors:
>>>>>>>>>>>>>>>>>>
info: The project uses platform tool noID but that tool is not installed. From the main menu, select Tools then select Plugins. Install the missing plugin.
error: Configuration "PICDEM_FSUSB_K50" builds with "C18", but no toolchains of that type are installed.
Errors have occurred while loading one or more configurations.
If a specific error is not shown above, this may happen when you import a project from another computer.
+ You can add language tools in Tools->Options embedded tab.
+ You can change which language tool to use in the project properties dialog.
<<<<<<<<<<<<<<<<<<<

I did install a compiler for this SOC. xc8 v2.10. I don't recall now why I picked that, but something led me there.

In the Project Loading Error tab, I get the following

<<<<<<<<<<<<<<<<<<<
Error: Project "MPLAB" refers to file "HardwareProfile - PIC18F Starter Kit 1.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC18F46J50 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC18F47J53 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC18F87J50 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC24F Starter Kit.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC24FJ256DA210 Development Board.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC24FJ256GB110 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC24FJ256GB210 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC24FJ64GB004 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC32 USB Starter Kit.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC32MX460F512L PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC32MX795F512L PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PICDEM FSUSB.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - dsPIC33E USB Starter Kit.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - dsPIC33EP512MU810 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - LPC USB Development Kit - PIC18F14K50.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - LPC USB Development Kit - PIC16F1459.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC18F87J94 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC18F97J94 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC18F Starter Kit 1.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC18F46J50 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC18F47J53 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC18F87J50 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC24F Starter Kit.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC24FJ256DA210 Development Board.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC24FJ256GB110 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC24FJ256GB210 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC24FJ64GB004 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC32 USB Starter Kit.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC32MX460F512L PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC32MX795F512L PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PICDEM FSUSB.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - dsPIC33E USB Starter Kit.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - dsPIC33EP512MU810 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - LPC USB Development Kit - PIC18F14K50.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - LPC USB Development Kit - PIC16F1459.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC18F87J94 PIM.h" which does not exist in the disk. The project failed to load.
Error: Project "MPLAB" refers to file "HardwareProfile - PIC18F97J94 PIM.h" which does not exist in the disk. The project failed to load.
>>>>>>>>>>>>>>>>>>>

Lastly, in the Project Loading Warning, I get the following:

<<<<<<<<<<<<<<<<<<<
Some of the files in this Project "MPLAB" contain spaces or odd characters in their name or their path. This could potentially cause issues during the build process. This is a limitation of GNU Make tool that we use as part of our build process. Removing spaces from all file and folder names included in this project will eliminate this potential issue.
Some of the files in this Project "MPLAB" contain spaces or odd characters in their name or their path. This could potentially cause issues during the build process. This is a limitation of GNU Make tool that we use as part of our build process. Removing spaces from all file and folder names included in this project will eliminate this potential issue.
>>>>>>>>>>>>>>>>>>>

I hope this is helpful. I'd really like to do some different things with this board and expand its functionality.

Thanks in advance.

Best regards,
mgssnr

mgssnr
Posts: 6
Joined: Sat Mar 07, 2020 1:23 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USBIO board with MPLAB IDE

Unread post by mgssnr » Thu Apr 09, 2020 11:07 am

My apologies, I didn't answer your question, really.

When I go to Production to build, I get the following:


error: Configuration "PICDEM_FSUSB_K50" builds with "C18", but no toolchains of that type are installed.
Errors have occurred while loading one or more configurations.
If a specific error is not shown above, this may happen when you import a project from another computer.
+ You can add language tools in Tools->Options embedded tab.
+ You can change which language tool to use in the project properties dialog.


Thanks,
mgssnr

mgssnr
Posts: 6
Joined: Sat Mar 07, 2020 1:23 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USBIO board with MPLAB IDE

Unread post by mgssnr » Thu Apr 09, 2020 11:17 am

Next, when I clean up the project, I start getting errors during compilation like this:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
make[2]: *** [nbproject/Makefile-PICDEM_FSUSB_K50.mk:150: build/PICDEM_FSUSB_K50/production/_ext/1785203669
/usb_function_hid.p1] Error 1
make[2]: *** Waiting for unfinished jobs....
../../../../Microchip/USB/HID Device Driver/usb_function_hid.c:107:10: fatal error: 'GenericTypeDefs.h' file not found
#include "GenericTypeDefs.h"
^~~~~~~~~~~~~~~~~~~
1 error generated.
(908) exit status = 1
../../../../Microchip/USB/usb_hal_pic24.c:99:10: fatal error: 'USB/usb.h' file not found
#include "USB/usb.h"
^~~~~~~~~~~
1 error generated.
(908) exit status = 1
make[2]: *** [nbproject/Makefile-PICDEM_FSUSB_K50.mk:158: build/PICDEM_FSUSB_K50/production/_ext/926206843/usb_hal_pic24.p1] Error 1
make[2]: *** [nbproject/Makefile-PICDEM_FSUSB_K50.mk:142: build/PICDEM_FSUSB_K50/production/_ext/926206843/usb_device.p1] Error 1
../../../../Microchip/USB/usb_device.c:252:10: fatal error: './USB/usb.h' file not found
#include "./USB/usb.h"
^~~~~~~~~~~~~
1 error generated.
(908) exit status = 1
make[2]: *** [nbproject/Makefile-PICDEM_FSUSB_K50.mk:166: build/PICDEM_FSUSB_K50/production/_ext/1472/main.p1] Error 1
make[2]: *** [nbproject/Makefile-PICDEM_FSUSB_K50.mk:174: build/PICDEM_FSUSB_K50/production/_ext/1472/usb_descriptors.p1] Error 1
make[1]: *** [nbproject/Makefile-PICDEM_FSUSB_K50.mk:91: .build-conf] Error 2
make: *** [nbproject/Makefile-impl.mk:39: .build-impl] Error 2
../main.c:44:10: fatal error: 'usart.h' file not found
#include <usart.h> // hk_usb_io
^~~~~~~~~
1 error generated.
(908) exit status = 1
../usb_descriptors.c:157:10: fatal error: './USB/usb.h' file not found

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

I understand these might need cleaned up; I started that effort once upon a time, but I ran into some other trouble with the files.

Perhaps the issue is that the project needs to be moved from one version of the tool to the other, but I'm probably not the person to do that.

Some of the warnings (like characters in file names) are disconcerting.

I appreciate any help you are willing to offer.

Regards,
mgssnr

User avatar
odroid
Site Admin
Posts: 33698
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 515 times
Been thanked: 507 times
Contact:

Re: USBIO board with MPLAB IDE

Unread post by odroid » Thu Apr 09, 2020 11:38 am

Try building other stock PIC18 project example in MPLab-X to narrow down root causes.

BTW, do you run the IDE on Windows PC? or Linux PC?

mgssnr
Posts: 6
Joined: Sat Mar 07, 2020 1:23 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USBIO board with MPLAB IDE

Unread post by mgssnr » Thu Apr 09, 2020 9:30 pm

Hi, thanks for the quick response.

I'm using linux.

I don't know much at all about the MPLAB X IDE or any of its tools. From the errors, it's not the compiler, because it's being invoked. It seems like it's more the project.

Perhaps what I should do is create a new project from scratch and add the files I need, because it seems that the existing project is so out of date w.r.t. the tool that it cannot figure out where things are, even though they're listed in the project's settings under Included/Excluded files.

What do you think about that approach?

Post Reply

Return to “USB IO”

Who is online

Users browsing this forum: No registered users and 4 guests