-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get unit_test to work with PIC18F4550 #4
Comments
Does it enumerate on other OS hosts? Where does it fail in the enumeration? Are there any logs? What do they say? Plug it into a Linux box and see what the log messages say. Are you getting any USB interrupts? Which demo are you trying to run? You shouldn't need to change any more than you already have, and those addresses look right. Also, the 4550 is both an ancient and expensive chip. There's no reason for doing a new design with it. You're much better off with a PIC18 that has a J or K in the part number like the 18f25k50. The new J and K parts are better in every way and a lot less money. |
On 20/06/2014 16:40, Alan Ott wrote:
I've not yet tested on any other OS, will do in due course and report here. Thanks for confirming that the changes I made look correct, hmm have As to 4550, this an existing design, see here: http://www.sparetimelabs.com/eazycnc/toad4/toad4.php and I'm toying/playing with the idea of moving away from USB CDC ACM to Thanks for pointing out 18f25k50, looks interesting. br Kusti |
Instead of HID, I'd recommend going with just a straight vendor-defined USB device with a couple of bulk endpoints. On Linux/Mac/Windows, you can use libusb to communicate with it. Windows Libusb uses WinUSB under the hood, and in Win7, you can do this without a driver or INF file (xp requires an INF file). See the apps/bootloader for an example. |
On 20/06/2014 16:55, Alan Ott wrote:
Besides I still support WinXP and IIRC WindUSB is not available there I'm accessing USB from Java and I have reasonable 100% Pure Java br Kusti |
BTW M-stack seems to be about 7.5 kB when compiled with the MPLABX Free version, do you have access to the Pro version and what is the size then? My CDC stuff takes about 2.5 kB (IIRC) and I'm a bit (haha) short of space atm. br Kusti |
The XC8 compiler in free mode is atrocious, and on the PIC18, it's a major regression from the older C18 compiler in this respect, unfortunately. I don't have the pro mode, but when you build with the free one it will tell you what it the PRO mode will do. Here's what mine says for the HID Mouse example (pic18f46j50): Memory Summary: Also unfortunately, I don't currently support C18 with M-Stack. C18 would create some technical challenges as there are two classes of pointer in C18 (RAM and ROM), but with XC8 (and the GCC-based XC16 and XC32), I can address whatever I need to with one type of pointer. This is why the Microchip code has duplicate functions, one for RAM pointers and one for ROM pointers. It is of course doable; I just haven't done it. I'm also not opposed to supporting SDCC, but last time I checked, SDCC was unable to use the linear addressing mode. Maybe that was just on PIC16F though, as that was my target at the time. I see that your code uses SDCC, so maybe that's something we could work on together if you're interested. |
On 20/06/2014 17:38, Alan Ott wrote:
So about half size with Pro, okey, that is not too bad size. My CDC code SDCC still does not support linear addressing mode (well it does but A SDCC port of M-stack would be interesting ... but might require For me to use M-stack (as it is today) would require moving from I came across this today, have not had time to read it through but http://www.t4f.org/articles/optimization-of-microchip-pic-xc8-compiler-in-free-and-pro-mode/ br Kusti |
I am having the same issue on Windows 7. The device fails to enumerate. Using Windows logman, it appears the device is responding with USBD_STATUS_STALL_PID on the first GET_DEVICE_DESCRIPTOR request from the host. Any ideas? |
Hi,
I added the following to usb_hal.h:
and this to main.c
(The commented out lines are from own ACM CDC stack I used as reference to ensure that the configs are right for my hardware (4 MHz XTAL) and I verified from the .hex file that they are indeed ok.)
The code compiles and runs but on Mac OS X Mountain Lion the device does not get enumerated. (The board is self powered but that should not make a difference?)
Before I dig deeper I thought I'd pop in here and ask for advice…?
The text was updated successfully, but these errors were encountered: