1 (edited by Bad Coffee 2013-04-16 18:03:36)

Topic: Panelolu/ATmega1284 issue.

I'm in the process of installing an external encoder/lcd so I can print without a computer.  All the hardware is done, (Mendel Ready!) and I'm trying to load up the new firmware.

Every time I try to load, I get this error:

stepper.cpp: In function 'short unsigned int calc_timer(short unsigned int)':
stepper.cpp:261: error: 'speed_lookuptable_fast' was not declared in this scope
stepper.cpp:268: error: 'speed_lookuptable_slow' was not declared in this scope


OSX 10.6.8
Arduino 0.22

I'm not really a programmer, but I can stumble through if someone has suggestions.

Thanks
B

2

Re: Panelolu/ATmega1284 issue.

can you compile the code without a upload? This seems like a fw problem and not a upload issue.  Have you installed the arduino drivers for the correct board and set it in arduino?

Did you use lawsys fw or what firmware are you trying to modify/upload?

3

Re: Panelolu/ATmega1284 issue.

You are correct.  It will not compile. 

I've been following Lawsy's step-by-step instructions. The FW is the one with z hysterisis fix.  I've tried in both Arduino 0.22 and 0.23

The drivers are there for the 1284P.  However, it shows up as both 8mhz and 16mhz.  If I try the 16hz, Arduino says "no 1284 found"  if I lower the speed to 8mhz, it uploads but I get the error.

I'm out of town for the next few days.  When I get back I'll try a different FW version.  I think I still have the original from the first upgrade.  I'll roll it back and see.

B

4

Re: Panelolu/ATmega1284 issue.

Still getting the error.  I tried uploading both Lawsy's current, and the one on the SD website.  The SD one will compile, Lawsy's won't.  Here's a pic. of the window.

Any Suggestions?

B

Post's attachments

Screen shot 2013-04-13 at 12.56.30 PM.png
Screen shot 2013-04-13 at 12.56.30 PM.png 47.76 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

5

Re: Panelolu/ATmega1284 issue.

Just figured out it's in stepper.cpp tab. Going to go line-by-line and see if I can find the difference between the two files.

6 (edited by Bad Coffee 2013-04-16 18:04:40)

Re: Panelolu/ATmega1284 issue.

edited:not needed. BC

7

Re: Panelolu/ATmega1284 issue.

Bad Coffee wrote:

I went through all of the files and compared.  I did find one error in line 34 where there weren't parentheses after an 'if'  Adding them got rid of the first error.

Which one is the "if" that you changed exactly?

The "Speed_Lookuptable_fast" issue is still happening.

attached as a text file,  I can see the stuff that was added for the LCD, it makes sense.  The rest of it, however is still a mystery.

I had a look at the issue. So the problem is in the file speed_lookuptable.h, which only has the definitions for 16MHz and 20Mhz.

If you are compiling for a different clock, the appropriate variables are not defined, hence the error. The older firmware (posted on the solidoodle website) did not have a check for the 20Mhz, so what happens is that if you are compiling the 8Mhz clock version, the old firmware assumes that you have a 20Mhz clock instead.

Where did you get the 1284 from? Have you already tried printing with it before installing the LCD?

8 (edited by Bad Coffee 2013-04-16 18:02:54)

Re: Panelolu/ATmega1284 issue.

in Stepper.cpp:
Old version:

#include "speed_lookuptable.h"
#if DIGIPOTSS_PIN > -1
#include <SPI.h>
#endif

New version:

#include "speed_lookuptable.h"
#if (DIGIPOTSS_PIN > -1)
#include <SPI.h>
#endif

Looking through the file all the other #if's were structured that way.  I took a chance and changed the line, and the error went away.

The firmware came from Lawsy's Github.  It's the new fw with the LCD stuff included. The 1284 came with the panelolu kit.

The printer was doing fine until I changed the chip.  I still have the old chip (with the working fw on it) as a backup.

I just changed the board type to 16mhz and it compiled fine.  I'll load it up later today and see if it works.

Thanks for the help.  This has been bugging me for quite a while.

B

9

Re: Panelolu/ATmega1284 issue.

Well that was fun, sort of.

Switched to 16mHz, and tried to upload.

It gave me an error (forgot exact syntax) about 1284 not found, then gave me the big list of chips.  I recopied avrdude.config into the correct directory, overwriting the old version:
I'm on a Mac with 10.5.8, so it's:

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/

I tried the upload and got a different error:

avrdude: parallel port access not available in this configuration
avrdude: error at avrdude.conf:531: programmer type not specified

Took about an hour of searching, and found out you have to edit the avrdude.conf file.  This post on an other printer's wiki summed it up nicely:

If you receive the following error when trying to upload the firmware to your board, you will need to edit the avrdude.conf file and remove or comment out the parallel port programmers from line 520 to line 712.


Open the file /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf (I used TextEdit.)
Search for

# Parallel port programmers

Cut out (or comment out with a # in front of each line) the whole section, including the ';' before

#
# some ultra cheap programmers use bitbanging on the 
# serialport.

Save the file, and try the upload.  It worked for me.  Hope someone else going through the install can use this info.

10

Re: Panelolu/ATmega1284 issue.

Bad Coffee wrote:

Save the file, and try the upload.  It worked for me.  Hope someone else going through the install can use this info.

Thanks for sharing, it's definitely useful information!

11

Re: Panelolu/ATmega1284 issue.

Yeah we are All trying to get this to work, we have all seen the Same Video! I suspect try deleting all the None Marlin folders and files that get installed when you Download from github and see if that helps... I got Marlin 2.0.3 bugfix to compile Once!! using VSC Atom but I can't seem to find my Bigtree 32Bit Clone MKS knockoff board with TE2865 Stepper drivers (Purple Board)
Its a Sanguine clone.. I suspect I used the wrong compiler or Board base... I cant seem to get VSC to Drop the base Mega also I had better results downloading the official code from the Marlin official site bug fix is only an Issue if your trying to install a None BLTOUCH Galvanic sensor like i have... Marlin 1.1.9 should be all you need if your installing a BL touch be careful though if your using a 8Bit board you only have 512Kb to work with... and you may be having EPROM storage issues and not programming Issues. check your code for bytes used if your at 450Kb you have a storage Issue...