Welcome! Log In Create A New Profile


Marlin Error code 'fpos_t' after 'struct'

Posted by hkraft 
Marlin Error code 'fpos_t' after 'struct'
September 22, 2016 09:27AM
I have the following error codes as per the attached and I need some help. It is for the Prusa i3... If someone can guide me to fix it, I would appreciate it

Edited 2 time(s). Last edit at 09/22/2016 10:16AM by hkraft.
open | download - Error Codes.txt (19.1 KB)
Re: Marlin Error code 'fpos_t' after 'struct'
September 23, 2016 02:04AM
Your using an old version of marlin firmware with a new arduino IDE

The old firmware uses the variable name fpos_t unfortunately this is now a reserved word in the newer arduino IDE.

You have to edit two files SdBaseFile.h and SdBaseFile.cpp

find all occurrences of fpos_t and change it to something else eg FatPos_t

If your using linux you can just
sed -i 's/fpos_t/FatPos_t/' SdBaseFile.h
sed -i 's/fpos_t/FatPos_t/' SdBaseFile.cpp

otherwise your going to have manually search and replace in what ever editor you have
Re: Marlin Error code 'fpos_t' after 'struct'
September 23, 2016 07:05AM
Hi Dust. Thanx for the reply. I currently use Arduino 1.0.6. If I upgrade/update to the latest Arduino 1.6.12 and Marlin, how do I update my original compiled Firmware sketch without any errors? as there is quite a lot of extras, for instance; auto bed levelling, as my current sketch lacks that. I would love to include the auto bed levelling.... can it be done?
Re: Marlin Error code 'fpos_t' after 'struct'
September 23, 2016 09:52AM
your log clearly shows "Arduino: 1.6.10 (Windows 7)," so I don’t know what your talking about in regards to arduno 1.0.6

"how do I update my original compiled Firmware sketch without any errors?"

You try, you get errors, your fix errors, your repeat till all errors are gone. You can't magically make all errors go away.

basically to upgrade you print out your current configuration.h and print out your current eeprom settings by sending the printer a M503 command then saving that to a file.

Then you get a new marlin edit the new configuration .h and enter in the values from the old one.
NB DO NOT COPY YOUR OLD configuration.h OVER A NEW MARLIN configuration.h, it wont work, to many thing have changed.

Once you have the basics working (ie motherboard type, endstops working, hotend temp reading correctly, heated bed reading correctly and direction of movement correct and steps/mm set for all axis) then play with additional Features like LCD and auto bed levelling.
Re: Marlin Error code 'fpos_t' after 'struct'
September 23, 2016 12:19PM
Dust. I have not loaded the eeprom as yet. I build a second 3D printer and tried to load my first printer Marlin Config sketch to the second one. Since I have installed the latest Arduino.ide, I encountered the errors, I have then reverted back to Arduino:1.0.6. As per your first advice; "You have to edit two files SdBaseFile.h and SdBaseFile.cpp". There is nothing named "fpos_t" in both those files.... Since I reverted back to 1.0.6, I received an error as per the attached txt doc. You will notice that I have tried to save it as "fpos_t1". I have also named it as per your advice; FatPos_t, but I get the same error...
open | download - fpos_t.txt (426 bytes)
Re: Marlin Error code 'fpos_t' after 'struct'
September 23, 2016 08:43PM
errors are:
SdBaseFile.h:199: error: 'fpos_t1' has not been declared
SdBaseFile.h:203: error: 'fpos_t1' has not been declared

somewhere between your first post and this one you have changed fpos_t to fpos_t1

but it looks like you have missed one or broken it.

there is a section near the beginning of the SdBaseFile.h file that should looks like

struct fpos_t1 {
/** stream position */
uint32_t position;
/** cluster for position */
uint32_t cluster;
fpos_t1() : position(0), cluster(0) {}

I'm guessing you have an error in this area, in particular in the name fpos_t1 (from the error in the first line of this section)

Edited 3 time(s). Last edit at 09/23/2016 08:52PM by Dust.
Marlin Error code '
December 02, 2016 08:37AM
Hi.when I upload marlin firmware to mega 2560 the ice give me this error.please help me
open | download - IMG_20161202_164503.jpg (84.4 KB)
Sorry, only registered users may post in this forum.

Click here to login