Welcome! Log In Create A New Profile

Advanced

Error on arduino core ccp

Posted by neilatkinson 
Error on arduino core ccp
September 18, 2019 06:28AM
I am currently working on re flashing the software on my geeetech I3 pro b.

While compiling the marlin for loading I get the following error codes -


core.a(main.cpp.o): In function `main':
C:\Users\HOUSE of ATKINSON\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino/main.cpp:5: undefined reference to `setup'
C:\Users\HOUSE of ATKINSON\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino/main.cpp:15: undefined reference to `loop'

now I am using Arduino 1.0.1 and I have found the file that needs correcting but I do not understand coding well enough to do so.

the code is - 

#include

int main(void)
{
   init();

#if defined(USBCON)
   USBDevice.attach();
#endif
   
   setup();
    
   for (; {
      loop();
      if (serialEventRun) serialEventRun();
   }
        
   return 0;
}


Dose anyone know how to correct this? I am toatlly stuck and need som guidance 

many thanks
Re: Error on arduino core ccp
September 18, 2019 07:33AM
That doesn't look arduinio, Normal C uses main(), arduino doesn't! (not at the user level)

you need a much newer version of arduino IDE... version 1 is from late 2011! 9 years old may as well be the stone age.

Current Marlin requires C++11 support (gcc >= 4.7, Arduino IDE >= 1.6.8)

If your trying to compile and older firmware that needs an older Arduino IDE, Don't, they lack common safety features of today's firmwares.
Re: Error on arduino core ccp
September 18, 2019 08:08AM
Sadly and this is according to geeetech, arduino 1.0.1 is the only one that runs error free for this version of marlin so I'm suck trying to fix this
Re: Error on arduino core ccp
September 18, 2019 08:23AM
So your trying to compile the firmware "5) Firmware for I3 pro&proB" from [www.geeetech.com] ?

if so what board ? as there are several
GT2560 or ramps or sanguinololu??

I tried the GT2560 version, it complied fine under 1.0.1, no changes needed.
Also now tried the ramps version, its also compiles no issues (but slightly trickier with no .ino file. You need to select all files and drop them into the ide to open all extracted files, then compile.)

Edited 4 time(s). Last edit at 09/18/2019 09:06AM by Dust.
Re: Error on arduino core ccp
September 18, 2019 09:30AM
And yes this firmware does not have safety features. Use at your own risk.

DO NOT LEAVE THIS PRINTER UNATTENDED WHILE ON, EVER.

If it should fail, It will happily burn down your house!
Re: Error on arduino core ccp
September 18, 2019 01:37PM
I have to gt2560 board.
Is it advisable to get an updated marlin out of safety concerns?
Re: Error on arduino core ccp
September 18, 2019 03:21PM
Ok a better question maybe, can I download a newer marlin and put that into my printer or will I have to make alot of alterations to the scripts to run it. I pretty new to this and lost of messing with codes and scripts is a daunting prospect
Re: Error on arduino core ccp
September 18, 2019 06:18PM
Both Marlin 1.1.x and 2.0.x include example configuration files for the geeetech I3 pro X - I don't know how different (if at all) the B and the X are.
Re: Error on arduino core ccp
September 19, 2019 03:07AM
Do these profiles have the safety features that the pro b scripts clearly need.
I have to say between the mechanical program errors and now I know the firmware is unsafe I'm actually regretting purchasing this machine.
Re: Error on arduino core ccp
September 19, 2019 03:42AM
The main safety feature is thermal runaway detection.

They are enabled by default on modern firmwares.

In marlin configuration.h
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed

Edited 1 time(s). Last edit at 09/19/2019 03:42AM by Dust.
Re: Error on arduino core ccp
September 19, 2019 04:06AM
This may help you...

[github.com]

This is for a Geeetech I3 Pro B but with a BLTouch and T8 lead screws , so you simply dont' enable thse features.

check witch motherboard you have either
BOARD_GT2560_REV_A // Geeetech GT2560 Rev. A
or BOARD_GT2560_REV_A_PLUS // Geeetech GT2560 Rev. A+ (with auto level probe)

Ensure this line is disabled
//#define BLTOUCH

It also talks about a different lead screw...
so for a T8 lead screw use #define DEFAULT_AXIS_STEPS_PER_UNIT { 81.5, 81.5, 400.69, 108 }
if not a T8 use #define DEFAULT_AXIS_STEPS_PER_UNIT { 81.5, 81.5, 2560, 108 }

Edited 1 time(s). Last edit at 09/19/2019 04:12AM by Dust.
Re: Error on arduino core ccp
September 19, 2019 10:37AM
So I've uploaded the new version and now I have the x y and z posistion on the LCD intermittently flashing with a question mark and the machine wont home. I'm guessing that is doesnot recognise where it currently is.
Any advice on how to correct this?
Re: Error on arduino core ccp
September 19, 2019 11:25AM
flashing X,Y Z is simply the axis has not been homed.


Test your endstops with M119 command and manually triggering each end stop (Ie hold the switch closed)
Test both open and closed positions for X, Y and Z

It it says triggered when its open and changes to open when triggered, you need to invert your end stop
eg change one of these
#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.

Edited 2 time(s). Last edit at 09/19/2019 11:28AM by Dust.
Re: Error on arduino core ccp
September 20, 2019 05:41AM
ok I really don't know what to do now

to start with.
the display showing the x y and z axis positions is still flashing between 0 and a question mark. when I move the axis the current position shows but continues to flash with a question mark. I have tried M119 and manually hold in the end stop down and it does not change what the readout says.

when homing the x axis there is now a loud buzzing the axis moved to home and hits the end stop, however the motor continues to pull as if it is not registering the end stop until the homing fails. changing the logic of the end stop does not work to correct this


similarly the y axis on homing emits a loud buzzing and moves in the total opposite direction until the homing fails again with the motor continuing to pull


the z axis will not home.


I am using repetier host as a slicer and it is currently saying the serial connection is denied. and wont connect and I have to disconnect and reconnect the printer to the pc to lead the Arduino scripts and the IDE times out.
the baudrate is set to 250000 do I need to change this to enable the connection.


Im feeling totally lost now

any advice would be great

thnks
Re: Error on arduino core ccp
September 20, 2019 06:22AM
well I have had to alter the baudrate for repetier to 115200 and that made a connection with the printer but then quckly came back with an error of - communication timeout resend buffer block
Re: Error on arduino core ccp
September 20, 2019 06:33AM
Firstly please confirm this is what your printer looks like? [www.amazon.com]

The very first thing you have to set in firmware is the MOTHERBOARD in configuration.h, if this is wrong nothing works correctly.

google shows me several different control boards for this printer so I cannot verify it is a GT2560 board. (can you take a clear large picture to confirm what it is?)

Next you need to get your endstops setup.

You can see from these images that the X endstop is at the left, this in the X-MIN position
You can see another endstop at the back, this is the Y-MIN position
Lastly you can see the Z endstop, it is at Z-MIN

So your firmware need to be set at follows
// Direction of endstops when homing; 1=MAX, -1=MIN
// :[-1,1]
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1

The endstops are all switch type so they all need pull ups enabled in configuration.h

#define ENDSTOPPULLUPS

Now you need to test your endstops with M119 and a control program.
Then should say triggered when the endstop switch is closed and open when the switch is not closed.

next you need to look at stepper motor direction.
If when you try and home an axis it should try to move towards your endstops. if moves away from the endstops you need to invert the axis
eg find the following and flip from false to true or true to false on the axis that is backwards.

// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false

If your axis are not running smoothly did you install the three micro stepping jumpers under each stepper driver?

Also did you set your driver type?
 * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
 */
#define X_DRIVER_TYPE  A4988
#define Y_DRIVER_TYPE  A4988
#define Z_DRIVER_TYPE  A4988


now try homing the axis

The baud rate doesn't matter as long as the host software and the firmware are set the same baud rate. But you do want 250000 or 115200

Edited 4 time(s). Last edit at 09/20/2019 07:08AM by Dust.
Re: Error on arduino core ccp
September 20, 2019 04:24PM
Ok to start with the printer. Yes that's the culprit and it did come from Amazon.

It is the 2560 rev a + board and as far as I can see the stepper drivers are there.

For some reason I cant upload pics to the forum because they are too large

I cant even use M119 to test end stops because I can connect repetier host to it anymore without the communication timing out

I have tried the settings in the code you suggested and both speeds on the baudrate. Nothing changes. What is worse is that it was working in some sense up until I used cura and the damn thing wound up like this

Edited 1 time(s). Last edit at 09/20/2019 05:40PM by neilatkinson.
Re: Error on arduino core ccp
September 20, 2019 05:58PM
slight improvement I have managed to get the end stops to react to M119 - they are working as you would expect them to work. I just cant figure you this odd motion in the axis


the home command for x raises the z axis and steps the extruder away from the end stop
the home for Y just produces the vibration I mentioned earlier because the motor does not stop pulling at then end stop and carried on turning until the homing fail and reset request comes up.


the home command for z produces nothing at all, so movement no sound of anything triggered at all.

question how do I ascertain what driver type I have

Edited 1 time(s). Last edit at 09/20/2019 05:59PM by neilatkinson.
Re: Error on arduino core ccp
September 20, 2019 11:23PM
"question how do I ascertain what driver type I have"

with a visual inspection.

Ideally read the number on the chip. If that is covered by heat sink then comparing what you can see to other stepper modules.

Or perhaps your invoice will list it, or the original advert....
Re: Error on arduino core ccp
September 21, 2019 03:57AM
Well it looks like I have A4988 stepper drivers
Sorry, only registered users may post in this forum.

Click here to login