Traumflug / Teacup_Firmware

Firmware for RepRap and other 3D printers
http://forums.reprap.org/read.php?147
GNU General Public License v2.0
312 stars 199 forks source link

Usb issues? #38

Closed chimera15 closed 10 years ago

chimera15 commented 11 years ago

Can't get the firmware to be recognized by usb after compiled and uploaded?

Traumflug commented 11 years ago

Hmm. Do you use an USB-equipped ATmega like the ATmega32U4? In that case DaveX might have an answer, he wrote and tested all the USB-related stuff.

In case you use an USB-TTL converter, on-board of on a plug-in board, like most RepRap electronics, USB recognition isn't part of the Teacup firmware. Your operating system should recognize the serial device, even with no firmware on the ATmega at all. Often, unplugging and replugging of the USB cable (not the serial connector side) helps.

To solve the issue it would probably be helpful if you describe a bit what kind of electronics you're using.

chimera15 commented 11 years ago

Hmm, I've been talking to Dave, but I think I have him stumped... It's a teensy 2.0. With the teacup firmware uploaded to it, that I've compiled on a windows machine, it refuses to be acknowledged. I can upload other firmware to it, and it will recognize fine.

Traumflug commented 11 years ago

Does Dave's fork work? It's https://github.com/drf5n/Teacup_Firmware

While I committed pretty much everything Dave pointed me at, it's quite possible I missed something essential.

chimera15 commented 11 years ago

No, I couldn't get Dave's fork to compile at all. He knows about that.

Traumflug commented 11 years ago

Probably the first step should be to make Dave's fork compilable for you. As I have neither a Teensy nor Windows OS myself, I can only guess what's happening on the board.

What are the error messages?

(and in general, please be a bit more verbose. I'm no magician and have no magic crystal ball here, so I can see only what you write) :)

chimera15 commented 11 years ago

no error messages..just acts like it's not there when the firmware is loaded.

chimera15 commented 11 years ago

oh you mean for dave's...ok..one sec it's a usb serial problem

First error is this... In file included from temp.c:58: config.h:377: error: 'THERMISTOR_BED' undeclared here (not in a function)

Dave sent me a thermistor and config file that fixes this, but then there's more errors. There's tons of errors one after another.

Traumflug commented 11 years ago

config.h:377: error: 'THERMISTOR_BED' undeclared here (not in a function)

That's a simple one. Your config.h has two heaters defines, one using THERMISTOR_EXTRUDER and one using THERMISTOR_BED, but your ThermistorTable.h declares only THERMISTOR_EXTRUDER. Either define both heaters to use THERMISTOR_EXTRUDER or copy ThermistorTable-double.h to ThermistorTable.h. ThermistorTable-double comes with both tables.

What's the next error?

chimera15 commented 11 years ago

That actually let it compile. But same problem as before. Once it uploads it will not respond to the computer, will not install any drivers or react in any way. Basically it bricks it until it's reprogrammed.

Maybe Dave "fixed" the next error. I was getting usb_serial.h missing errors, or something like that next.

chimera15 commented 11 years ago

I've tried this on 3 different computers now, linux, and windows, and 2 different teensy's..so I know it's unlikely it's just my system that's messed up or something.

I haven't tried the command line gcc compiler that Dave is using yet though..apparently that's how he works and has generated hex files that will be recognized by my computer, but then the code has other problems with locking up, once a command is sent and I'm unable to modify the code for my setup which is a problem for calibration and stuff if I actually get this thing built.

Traumflug commented 11 years ago

I was getting usb_serial.h missing errors, or something like that next.

It would be help Teacup development a lot if you'd copy such errors here, so they can be fixed. After all it's a kind move to not let the next one run into the same situation, isn't it? Thanks.

I haven't tried the command line gcc compiler that Dave is using yet though.

What else? Arduino IDE? The Makefile figures out wether your ATmega is USB-equipped or not, so currently only this way is supported. As I write I'm thinking about how to make this Makefile-independent.

chimera15 commented 11 years ago

Yes, I was using the arduino ide with teensyduino... It has a pde in it that should allow it to be compiled? It's not supported?

Traumflug commented 11 years ago

The Gen7 branch should work with Arduino IDE for Teensy out of the box now. When pulling new sources, please don't forget to re-copy config.teensy.h.

What's the next error? :)

drf5n commented 11 years ago

The Gen7 branch here works for me.

My github fork is out of date, so I use this one.

Traumflug commented 10 years ago

Looks like this is resolved. Please open a new issue with the current behaviour if the problem persists. Thanks for reporting!