Welcome! Log In Create A New Profile

Advanced

How to fit Teacup Firmware on a 168 chip?

Posted by edictor 
How to fit Teacup Firmware on a 168 chip?
January 11, 2011 11:31PM
Hi there,

I am trying to upload the FiveD hex to my 168 chip on my Deicimilla but get a fault when uploading: "avrdude: ERROR: address 0x820003 out of range at line 726". I am assuming that this is because the hex is too big.
One of the lines in the Readme file says: * can fit onto atmega168 depending on selected options.
I have tried commenting out all the stuff that I think I can leave out to get it onto my chip, but the hex is still about 32k. Way too big.
Would you be able to write a little summary on what the minimum setup is so that the hex fits onto the 168?
I am keen to get my machine working so I hope that you'd be able to answer my call for help.

Keep up the good work!

Paul
[Edit: Changed name to "Teacup Firmware" for the purposes of not confusing folk, after irc discussion. --Sebastien]

Edited 1 time(s). Last edit at 02/22/2011 02:19AM by SebastienBailard.
Re: How to fit FiveD hex on a 168 chip?
January 12, 2011 12:36PM
Check out the settings I used only 4 changes to the Makefile!
http://forums.reprap.org/read.php?147,33082,70321#msg-70321
I seem to remember getting that error but I don't think it was to do with the size!
maybe the progbaud, or version of avrdude.

MCU_TARGET = atmega168
AVRDUDE = /home/USER/arduino/arduino-0022/hardware/tools/avrdude
AVRDUDECONF = /home/USER/arduino/arduino-0022/hardware/tools/avrdude.conf
PROGBAUD = 19200
Re: How to fit FiveD hex on a 168 chip?
January 12, 2011 02:02PM
Thanks for the quick reply Avrmax.

I have changed all the settings that you have suggested, but still get the error..
Having said that.. for some reason my avrdude is not in the directories that you suggest they should be.
I am also running 0018.. Perhaps that is the issue?
I am just uploading through Arduino IDE. Perhaps I should try it "developers style".

Paul
Re: How to fit FiveD hex on a 168 chip?
January 12, 2011 07:04PM
18 and 22 I am getting errors with the arduino ide as well at the moment... :l
I thought I got rid of them, but I might of just stopped checking the arduino ide sad smiley
But it is fine in a shell! make, make program...
Re: How to fit FiveD hex on a 168 chip?
January 12, 2011 07:20PM
Well after thinking about this and reading I tried committing out the whole fuses.h file just put a /* at the start and a */ at the end. then it works fine on 22 and 18 arduino ide.
Re: How to fit FiveD hex on a 168 chip?
January 12, 2011 11:07PM
Aha!!

I only commented out the first bit of fuses.h..

Commenting out EVERYTHING did the trick!

Thanks for your help Avrmax and everyone that put their findings on this forum. Priceless!

Now to get the physical part of the machine working with the brain..
Re: How to fit Teacup Firmware on a 168 chip?
March 02, 2011 04:32PM
You might want to check to make sure the firmware is reliable on a 168 even if it fits in flash - the most recent version I tried - initially with a 168 - after a few commands the chip would reset itself - I think due to stack running out of any additional memory - once I moved to a 328 the problem went away.
Re: How to fit Teacup Firmware on a 168 chip?
March 02, 2011 06:07PM
Aha! So that's what is happening!
Indeed I can only upload a certain amount of commends to the chip when running from my host software. Then it just does nothing any more.
Any customization I could do to keep the memory used to a minimum?
The reason I went for this firmware as it was specifically designed to fit on a 168 chip..
Anyone?
Re: How to fit Teacup Firmware on a 168 chip?
March 02, 2011 08:46PM
Turn on bang bang instead of pid, make sure debug is disabled, try different or no acceleration, try disabling step interrupt interruptible. You will have problems with stack smashing while ram usage is above about 85% to 90% I think.

Yes, we did start out on the 168, then feature creep happened. Luckily most of the bigger ones can be disabled fairly easily.

Please let us know how you go, my 168 had a nasty incident with 12v which it did not survive


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: How to fit Teacup Firmware on a 168 chip?
March 02, 2011 10:36PM
Yeah - I started off using a 168 and was using 1 temp and 1 heater with bang bang control and still had bad issues with resets - However I did not try the no acceleration mode - which does not make for a happy printer anyways.... I had to quickly make up a board last night with a smt atmega368 I happened to have laying around to make progress - - perhaps we should mention that it works on 328's and higher now - or list the exact build configurations to get it working on a 168 so we dont run into too many strange software issues causing problems for newbs like us.
Re: How to fit Teacup Firmware on a 168 chip?
March 03, 2011 02:36AM
When discussing such issues it would be helpful if you could tell us which numbers a simple "make" reports.

I'm still on a '168 myself, without heater, without extruder (milling machine) and also without issues. I currently get 12068 bytes Flash (79%) and 917 bytes RAM (90%).


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

Click here to login