Welcome! Log In Create A New Profile

Advanced

Gen7 - Impossible to upload firmware

Posted by Tibow 
Re: Gen7 - Impossible to upload firmware
August 20, 2013 07:36AM
That's entirely a problem with Marlin. Up to date I'm not sure which combination of Arduino and Sanguino/Gen7 support they expect. WProgram.h is one of the files which got added or removed somewhere between Arduino 0023 and Arduino 1.0. It should be part of the Sanguino/Gen7 support package.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Gen7 - Impossible to upload firmware
August 21, 2013 07:23AM
Hello,

I am having same problem as in initial post. Trying to load Test software via MCP2200 gives me 10 minutes waiting and then "timeout" message.
I am really getting desperate.
Board is Gen7 v 1.5 with Atmega1284p @ 20Mhz.

What I did to troubleshoot:
- Loaded Test software via Arduino as ISP. Works like it should.
- Loaded bootloader into Atmega via Arduino as ISP and then loaded test software via FTDI chip on the breadboard. Works!
- Took out Atmega from Gen7 and looped RX with TX pins from MCP2200. In Serial monitor I get in response exactly what i send.
- Pressed reset button before uploading soft.
- Changed different PCs with different OS. Same result on all.

One thing i noticed: when board executes test program, if i connect USB cable board stops. In both cases when program is in EEPROM or Flash.

I see there is no clear solution, but maybe..
Re: Gen7 - Impossible to upload firmware
August 22, 2013 04:49AM
Timeout means, there is no communications at all.

Quote

- Pressed reset button before uploading soft.

The reset is executed when you release the reset button. After a reset, the bootloader waits 3 seconds for an incoming firmware.

Quote

Took out Atmega from Gen7 and looped RX with TX pins from MCP2200. In Serial monitor I get in response exactly what i send.

Excellent idea for debugging!

Quote

One thing i noticed: when board executes test program, if i connect USB cable board stops.

Connecting USB usually causes an (auto-)reset. The ATmega should pick up work again a few seconds later, though.

Please be aware uploading something via ICSP erases the bootloader, so you have to re-upload that. That said, you can upload not only test firmwares, but also entire controller firmwares via ICSP.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Gen7 - Impossible to upload firmware
August 23, 2013 08:29AM
Thank you for your reply, Traumflug.

Quote

Timeout means, there is no communications at all.

But if i looped TX and RX and get same what i send, i think that Atmega should get comunication.

Quote

The reset is executed when you release the reset button. After a reset, the bootloader waits 3 seconds for an incoming firmware.

Ooh, if you knew how many times I pressed Reset in different ways smiling smiley. And turned off power.

Quote

Connecting USB usually causes an (auto-)reset. The ATmega should pick up work again a few seconds later, though.

No its not picking up again. So i looks like each component is working separately. just dont work together. Checked board with magnifying glass, for shorts, looks OK.

Quote

That said, you can upload not only test firmwares, but also entire controller firmwares via ICSP.

I see what you mean: "just give up and load via ICSP" winking smiley. I would like to get it working, if i soldered it onto the board. But I almost ready to follow your advice.
Re: Gen7 - Impossible to upload firmware
August 24, 2013 08:11AM
Quote

I see what you mean: "just give up and load via ICSP"

The point is, if you can upload firmwares, you can tweak SetupTest.ino for specific tests. Also, if your firmware communicates fine, the bootloader should, too. If not, it's a problem with the bootloader (e.g. wrong MHz variant).


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Gen7 - Impossible to upload firmware
August 25, 2013 11:56PM
Well i'm glad to say I fixed my problem which turned out to simply be the Rx pin on the mcp2200 wasn't making good contact with its pad. Tricky to see since the trace runs underneath the chip. I ended up just soldering on a new mcp2200 and triple checked my traces. When I finished I plugged it in and voila, it worked without any problems.

now just waiting for my stepper drivers :/
Re: Gen7 - Impossible to upload firmware
August 26, 2013 07:18AM
Nice to see you got it working. To help better with issues like yours, I added feedback on incoming characters to SetupTest.ino just yesterday: [github.com]


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Gen7 - Impossible to upload firmware
September 01, 2013 05:01PM
Hi Traumflug,
On my board i uploaded the bootloader, but i cannot upload anything using it. Neither the firmware nor SetupTest.ino. The board passes the Zoman's test with looped RX-TX. When uploading from the Arduino IDE, the left green LED blinks every 8-10 sec, the MCP2200 configuration utility recognizes the chip, but the Arduino IDE does not see it. Where can i find the compiled file of the Teacup firmware to try to upload it?
My configuration is:
Gen7 v.1.5
Atmega 644 @ 20 MHz

Edited 1 time(s). Last edit at 09/01/2013 05:02PM by fix_it_alex.
Re: Gen7 - Impossible to upload firmware
September 02, 2013 08:25AM
Quote

the left green LED blinks every 8-10 sec

Your power supply turns on and off: [reprap.org]


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Gen7 - Impossible to upload firmware
September 02, 2013 02:26PM
I meant the Tx Led. The power supply does not turn on and off.
Re: Gen7 - Impossible to upload firmware
September 03, 2013 06:28AM
If it's the Tx LED, this is avrdude trying to get a connection.

You have compiled Teacup already yourself, Arduino IDE does so before trying to upload it and stores it in the temporary folder. something like /tmp/buildxxx.

Apparently the only problem left is, the IDE doesn't recognize the serial port? You can upload a firmware using avrdude directly, like

avrdude -C ..\etc\avrdude.conf -c stk500v2 -p atmega644 -P COM1 -B 1 -U flash:w:\path\to\teacup.hex


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Gen7 - Impossible to upload firmware
September 18, 2013 05:18PM
Hello,
i'm having trouble with Gen 7 electronics, V1.5.

What i can do and have done:
- setup.ino - works
- uploading firmwares - works
- tried arduino 1.03, 1.04 and 1.05 - works
- tried marlin - partially worked
- tried repetier - partially worked
- tried teacup - did not work
- tried marlin for delta - almost worked(needs configuration)

I tried using the repetier and pronterface host softwares for both machines.

When I uploaded the marlin delta firmware, suprisingly all the axes seemed to work(even if they were jittery, adjusting poloulus helped alot there). I'm trying repetier tomorrow to see how that moves things along

The issue i have with my controller/firmware on my mendel is that I can connect everything(motors and such) and firmware seems to be making the leds blink. But when i try to move the motors, they just twitch for a very very small amount and thats it. I've tried modifying the steps per meter, direction, and also ajusted the poloulu stepper driver but nothing worked. When i uploaded repetier/marlin, i got it to move very very slighty, but after a while it stopped moving(possible that i screwed up the firmware). Does anyone have any suggestions as to why this is happening? I also saw that i have the L1 coil soldered, could that be a problem?

.

Edited 1 time(s). Last edit at 09/18/2013 05:25PM by threemicrons.
Re: Gen7 - Impossible to upload firmware
September 19, 2013 06:24AM
Quote

- tried teacup - did not work

Coud you elaborate a bit on this? Teacup is the most supported firmware for Gen7, so it should work out of the box.

Quote

But when i try to move the motors, they just twitch for a very very small amount and thats it.

Sounds like mis-wired motors, not a firmware issue.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Gen7 - Impossible to upload firmware
September 19, 2013 08:15AM
When i uploaded teacup, calculated all the steps per meter etc, all the motors would do is twitch a little bit when using pronterface, repetier or repsnapper.

It may be possible that I have wired my motors up incorrectly - but has the wireing schematic changed since version 1.4.1? I used this schematic to wire all my things up - [wiki.openhardware.co.za] .
Why i doubt the wiring can be the problem, because the gen 7, 1.5 board worked with the hacked marlin delta firmware and those motors are set up the same way.

EDIT:

i got the 1.5 board to work with repetier 0.81 firmware, and the motors moved. when i tried to upload the teacup firmware, it did not even turn the "psu" LED on near the lower right side(next to the USB port).

i'm using win 7 64 bit, arduino 1.04, teacup firmware downloaded from github.

Edited 1 time(s). Last edit at 09/19/2013 11:47AM by threemicrons.
Re: Gen7 - Impossible to upload firmware
September 20, 2013 09:37AM
Quote

but has the wireing schematic changed since version 1.4.1?

No, and it never will. Because motors have two coils and that's it. And Gen7 has the exactly same wiring as all other electronics.

Quote

when i tried to upload the teacup firmware, it did not even turn the "psu" LED on near the lower right side(next to the USB port).

That's a feature! Teacup turns on the PSU only when a supply is actually needed. Command a movement and it'll spring to life. And it'll turn back off after the movement is done, of course. Same for heaters.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Gen7 - Impossible to upload firmware
September 21, 2013 02:04PM
Hey Traumflug,

I tried fireing up the machine again and unfortunately it's still not working. The firmware uploads fine, but when using pronterface or repetier host, neither can turn the psu on. I tried loading a job and trying to force it to run, but unfortunately that did not help either. I read at a different thread that the L1 coil can cause problems in earlier versions(1.4.1), can it be a case here aswell?

Thanks!
Re: Gen7 - Impossible to upload firmware
September 22, 2013 11:12AM
Quote

The firmware uploads fine, but when using pronterface or repetier host, neither can turn the psu on.

Please try to ged rid of the idea of "turning on" a printer. That's a pointless maneuver, so Teacup doesn't support it. Connect to the printer, command to move a motor and it will move the motor.

In case you fear your electricity bill, a RepRap electronics consumes less than 50 mW in standby, or 0.5 kWh per year. Your power supply likely consumes a lot more for its standby mode, so it might be advised to turn off it's mains switch when not in use for a few days.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Gen7 - Impossible to upload firmware
September 27, 2013 07:13PM
In repetier and marlin as well as sprinter you need to give the M80 command to turn on the power supply, if your using ATX as your PSU. M81 to turn it off BTW.
Also for those of you with the 1284 without the (P) - pu trust me I have tried all kinds of way to program that thing even a dedicated programmer based on the arduino design, it keeps failing so I gave up on this chip. there is something inherently different, someone might have to dig up the data sheets, even if I load the boot loader something is amiss. there have been several arduino bobduino mighty 1284 threads on this subject it just is a no go, most peeps don't succeed when it comes to that chip.
terramir
Re: Gen7 - Impossible to upload firmware
September 30, 2013 09:59AM
Hello,

I am having problem with MCP2200.
If I load firmware (Teacup) via ISP into 1284P and connect it to Pronteface I have message 'start' repeated infinite. And nothing works.
When i solder it out and connect FT232 to 1284P directly, everything works. FT232 does not work if i don't solder out MCP2200.
Board looks fine, i checked it with magnifying glass also.
What could it be? Auto reset?
Re: Gen7 - Impossible to upload firmware
September 30, 2013 11:44AM
Quote

I am having problem with MCP2200.
If I load firmware (Teacup) via ISP into 1284P and connect it to Pronteface I have message 'start' repeated infinite.

If you can read the message, your MCP2200 works fine.

Your ATmega apparently resets for some reason. Does this happen when using a serial terminal (PuTTY, GtkTerm), too?

Quote

FT232 does not work if i don't solder out MCP2200.

That's expected, both share the same serial port.

Quote

Auto reset?

To disable it, remove C21.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Gen7 - Impossible to upload firmware
October 01, 2013 07:15AM
Quote

Does this happen when using a serial terminal (PuTTY, GtkTerm), too?

Yes, Rx LED starts to glow as soon as i connect USB cable to PC. Without any program. On different PCs.
In PuTTY i have "OK Start" all the way.

Quote

To disable it, remove C21.

Done it. Did not helped.
Re: Gen7 - Impossible to upload firmware
November 14, 2013 07:40AM
Hi,
I have built a strip prototype version of the gen 7 board running Marlin firmware. I am using stand alone motor drivers so I dont need the drivers located on the main board. I had tested the board on the bench and everything worked ok. All motors were tested, heat on extruder and bed worked and all three sensors could be read with M119. When I connected the board to the printer and tried to connect the usb I started getting errors. Sometimes I had to recycle the power as the usb driver was not being recognised. Once I got the usb recognised I could get the printer to go online in pronterface but then it would freeze and I couldn't get it to respond to any commands. I tried to reload the firmware with usb connected to my gen7 board via the MCP2200 but got time out errors. The tx led of the MCP2200 would just flash every few seconds. Troubleshooting took the following steps:
1) I verified the MCP2200's correct operation by removing the ATmega1284P ic and shorting the Tx and rx pins. (14 and 15 )
2) I reloaded the bootloader and frimware through the ISP connector using an Arduino Uno as ISP. There were no errors generated in the download. but still when I attempted to connect to pronterface the problems were the same.
3) When I first burned the bootloader I did it while the ATmega was on a breadboard following the instructions in the reprap link here; ->[reprap.org]
In this example Pin 32 (Aref) of the Atmega is tied to +5V. I had a look in the datasheet of the ATmega1284P and it says the Aref may be connected to the AVCC pin or use an internal vref. The selected ref voltage is controlled by writing to one of the control registers in the ATmega.
In the schematics of the Gen 7 elactronics pin 32 of the ATmega tied to a capacitor to gnd. The pin is also connected to connector 4 where a voltage can be applied to the pin.
4) I connected pin 32 to +5v on my gen 7 pcb and programmed to bootloader again using the ISP as before. No errors were returned.
5) Then using the usb connected to the gen 7 pcb ( via the MCP2200 ) I downloaded the firmware and it downloaded fine. I tested the board again and all functions were working fine. I power cycled the pcb and tried to connect to my printer again. Everything went ok. I had a spare ATmega 1284 ic which already had the bootloader burned and I loaded the firmware on it through my gen7 board without problems.

My question; is is possible that the connection of Aref to +5 volts could have solved this issue? Also I don't know if at the lowest level of the firmware the register is programmed to use Aref, AVCC or the internal ref. The data sheet says if the internal ref is selected in software that Aref shouldn't be connected.

"If the user has a fixed voltage source connected to the AREF pin, the user may not use the other
reference voltage options in the application, as they will be shorted to the external voltage. If no
external voltage is applied to the AREF pin, the user may switch between AVCC and 2.56V as
reference selection." (datasheet version: 8059D–AVR–11/09 pg. 248 )

Maybe Aref should only be connected to +5v to burn the bootloader and then left floating when downloading the firmware.
Any advice would be apreciated.
Thanks.
Bru
Re: Gen7 - Impossible to upload firmware
January 17, 2014 11:07AM
Hi zungmann,
I have build Gen7 1.4.1 board for my prusa i3 . Now what problem I am facing is I am not able to burn Bootloader. I am using atmega644A controller with 16Mhz crystal. I tried to burn using Arduino IDE 1.0.4 as well 1.0.5 version and arduino uno as programmer. Even I tried with command prompt avrdude. I am working on windowsXP OS.
so please help me, I want to know how to burn bootloader as you have done this.

Edited 1 time(s). Last edit at 01/19/2014 01:47AM by Bru.
Bru
Re: Gen7 - Impossible to upload firmware
January 19, 2014 01:46AM
I have burn bootloader using command promt and before bootloader I set fuse. So any one please reply if i have done something wrong. I have attach screenshots of steps in 3 part .
after doing such thing i am not able to upload setup test code as well as firmware. I am using usb to ttl cp2012.
any suggestion most welcome.
Attachments:
open | download - prog part1.JPG (140.9 KB)
open | download - prog part2.JPG (152.6 KB)
open | download - prog part3.JPG (135.8 KB)
Re: Gen7 - Impossible to upload firmware
January 19, 2014 08:51AM
@Bru: so you have successfully burn the boot loader, that is good. To upload the firmware using the usb-ttl adapter cp2012, I need to push the reset button when the Arduino just showing 'Uploading' the firmware message.
Well, I manage to 'practice' it several time until get it correctly.
Bru
Re: Gen7 - Impossible to upload firmware
January 20, 2014 11:38AM
Hi,
Still I am not able to upload setup test code. I have attach file which shows some part of upload but the remaining portion in image remain as it is. more than 10 min I waited but no success.
what I think this problem may be because of ->

1.Wrong Fuse by me:
I want to know about fuse whether I have set it correctly because on below it is showing something different
[reprap.org]

I have set -U lfuse:w:0xff:m -U hfuse:w:0x99:m -U efuse:w:0xfc:m (for atmega644A on 16MHz) while on link it is LFUSE = 0xF7, HFUSE = 0xDC, HFUSE = 0xDC.


2. when I connect power supply with atx24 pin option 1 then on my electronic board led of heater blink once and then turn off. This happen before the upload of setup test code. Is there something wrong in my electronic board?
any suggestion how to check, please tell me.

Edited 2 time(s). Last edit at 01/20/2014 11:44AM by Bru.
Attachments:
open | download - upload img.JPG (62.1 KB)
Re: Gen7 - Impossible to upload firmware
January 21, 2014 01:14AM
See [www.engbedded.com] for a good fuse calculator

Also see [www.ladyada.net] for some descriptions of fields.
Re: Gen7 - Impossible to upload firmware
January 25, 2014 03:15PM
I am trying to upload the Teacup firmware to an atmega644 on which I myself have burned the boatloader file "bootloader-644-20MHz.hex from Gen7 arduino IDE support using winavr/avrdude and a usbasp programmer.

Uploading firmware won't work on this atmega644 from the Generation 7 board,
I already have another atmega644/20MHz running teacup on the same board and I can easily upload the firmware on it.

Why I can't upload teacup/test fimware to it any idea ?
Re: Gen7 - Impossible to upload firmware
August 15, 2015 07:11PM
Hello,
I'm unable to verify the Setup program - I get the below errors, captured with "verbose output" during compilation. In case it helps, I added a note where the error list begins.

I have a Gen7 v1.5, Ubuntu Linux.

/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega1284p -DF_CPU=20000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -D__PROG_TYPES_COMPAT__ -I/home/aaron/sketchbook/hardware/Gen7/cores/arduino
-I/home/aaron/sketchbook/hardware/Gen7/variants/gen7 /tmp/build6012115862471332917.tmp/sketch_aug11a.cpp -o /tmp/build6012115862471332917.tmp/sketch_aug11a.cpp.o
Using previously compiled: /tmp/build6012115862471332917.tmp/wiring_analog.c.o
Using previously compiled: /tmp/build6012115862471332917.tmp/wiring.c.o
Using previously compiled: /tmp/build6012115862471332917.tmp/wiring_digital.c.o
Using previously compiled: /tmp/build6012115862471332917.tmp/wiring_shift.c.o
Using previously compiled: /tmp/build6012115862471332917.tmp/WInterrupts.c.o
Using previously compiled: /tmp/build6012115862471332917.tmp/wiring_pulse.c.o
Using previously compiled: /tmp/build6012115862471332917.tmp/IPAddress.cpp.o
Using previously compiled: /tmp/build6012115862471332917.tmp/CDC.cpp.o
Using previously compiled: /tmp/build6012115862471332917.tmp/HardwareSerial.cpp.o
Using previously compiled: /tmp/build6012115862471332917.tmp/new.cpp.o
Using previously compiled: /tmp/build6012115862471332917.tmp/WMath.cpp.o
Using previously compiled: /tmp/build6012115862471332917.tmp/Stream.cpp.o
Using previously compiled: /tmp/build6012115862471332917.tmp/Print.cpp.o
Using previously compiled: /tmp/build6012115862471332917.tmp/main.cpp.o
Using previously compiled: /tmp/build6012115862471332917.tmp/HID.cpp.o
Using previously compiled: /tmp/build6012115862471332917.tmp/Tone.cpp.o
Using previously compiled: /tmp/build6012115862471332917.tmp/USBCore.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega1284p -DF_CPU=20000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -D__PROG_TYPES_COMPAT__ -I/home/aaron/sketchbook/hardware/Gen7/cores/arduino
-I/home/aaron/sketchbook/hardware/Gen7/variants/gen7 /home/aaron/sketchbook/hardware/Gen7/cores/arduino/WString.cpp -o /tmp/build6012115862471332917.tmp/WString.cpp.o

Errors:
/home/aaron/sketchbook/hardware/Gen7/cores/arduino/WString.cpp: In member function ‘void String::init()’:
/home/aaron/sketchbook/hardware/Gen7/cores/arduino/WString.cpp:117:2: error: ‘flags’ was not declared in this scope
flags = 0;
^
/home/aaron/sketchbook/hardware/Gen7/cores/arduino/WString.cpp: At global scope:
/home/aaron/sketchbook/hardware/Gen7/cores/arduino/WString.cpp:530:8: error: redefinition of ‘String String::substring(unsigned int) const’
String String::substring( unsigned int left ) const
^
In file included from /home/aaron/sketchbook/hardware/Gen7/cores/arduino/WString.cpp:22:0:
/home/aaron/sketchbook/hardware/Gen7/cores/arduino/WString.h:174:9: error: ‘String String::substring(unsigned int) const’ previously defined here
String substring( unsigned int beginIndex ) const { return substring(beginIndex, len); };
^
Re: Gen7 - Impossible to upload firmware
August 16, 2015 04:26PM
Quote
aaron.r
Hello,
I'm unable to verify the Setup program - I get the below errors, captured with "verbose output" during compilation. In case it helps, I added a note where the error list begins.

I have a Gen7 v1.5, Ubuntu Linux.

/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega1284p -DF_CPU=20000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -D__PROG_TYPES_COMPAT__ -I/home/aaron/sketchbook/hardware/Gen7/cores/arduino
-I/home/aaron/sketchbook/hardware/Gen7/variants/gen7 /tmp/build6012115862471332917.tmp/sketch_aug11a.cpp -o /tmp/build6012115862471332917.tmp/sketch_aug11a.cpp.o
[...]
Errors:
/home/aaron/sketchbook/hardware/Gen7/cores/arduino/WString.cpp: In member function ‘void String::init()’:
/home/aaron/sketchbook/hardware/Gen7/cores/arduino/WString.cpp:117:2: error: ‘flags’ was not declared in this scope
flags = 0;
^
[...]

Somebody cared to post the error messages. Excellent, this way one can help.

It looks like the library code for the Gen7 doesn't like other files. Two questions:

- Is it the package coming with Gen7 Arduino IDE Support package or the one coming with Marlin? The Gen7 package should work, at least up to version 1.0.5 of Arduino IDE, I use it myself.

- Which version of Arduino IDE is it? Arduino doesn't take care of backwards compatibility, so add-on libraries break often. As said, 1.0.5 is fine.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Sorry, only registered users may post in this forum.

Click here to login