Welcome! Log In Create A New Profile

Advanced

Sanguinololu 1.3a, Marlin 1.1.9

Posted by MKSA 
Sanguinololu 1.3a, Marlin 1.1.9
August 07, 2018 02:29AM
Early this year, under Arduino 1.8.6 I managed to compile, upload, run Marlin 1.1.8 on this old board.

Today, I wanted to give a try to 1.1.9 the last and final 8 bits Marlin. Using the same env., compilation of 1.1.9 it fails with this error:

Arduino: 1.8.6 Hourly Build 2018/01/03 03:33 (Windows 7), Board: "Sanguino, ATmega1284 or ATmega1284P (16 MHz)"

...
pins_RAMPS.h:48: error: #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."

#error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."

^

exit status 1
#error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."


Compilation of 1.1.8 in the same env, still works.
Had a quick look on the Marlin site but couldn't determine if this old board is still OK for 1.1.9.

Note I am not really using this board anymore, I use Smoothie but wanted to see the difference between the two controller/firmware on the same 3D printer. This helps distinguish issues due to the mechanic of the printer and the controller/firmware.


"A comical prototype doesn't mean a dumb idea is possible" (Thunderf00t)
Re: Sanguinololu 1.3a, Marlin 1.1.9
August 07, 2018 05:41AM
You did update #define MOTHERBOARD BOARD_SANGUINOLOLU_12

as I just cloned it and tried it and it still compiles. (after setting the board and MPU etc)
Re: Sanguinololu 1.3a, Marlin 1.1.9
August 07, 2018 12:10PM
Thanks.
Forgot to change that (and other stuff BTW). Even had to make again the downgrade of the upload speed !
My fault, I didn't document as I assumed there would be nothing after 1.1.8. Now it is OK.
As I said, I just put the Sanguino back to compare.

Edited 2 time(s). Last edit at 08/07/2018 03:42PM by MKSA.


"A comical prototype doesn't mean a dumb idea is possible" (Thunderf00t)
Re: Sanguinololu 1.3a, Marlin 1.1.9
December 12, 2018 05:23PM
Hi Guys.

For everyone who wanna upgrade the firmware in a 3D Printer with sanguinololu board.
Follow some tips.
-----------------------------------------------------------------------------------------
If you receive one error like this:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x40
-----------------------------------------------------------------------------------------

I believe that the problem is because some sanguinololu boards have old boot_loaders,
they can communicate in 115200 but can not upload at this speed.

To fix the communication problems you need change the upload speed for 57600.
===================================================================
Just go to the directory/file:
>> C:\Program Files (x86)\Arduino\hardware\Sanguino-master\avr\boards.txt
and change the upload speed in the line:
from:
>> sanguino.menu.cpu.atmega1284p_8m.upload.speed=115200
to:
>> sanguino.menu.cpu.atmega1284p_8m.upload.speed=57600

Attention:
=========================================================
1 - I believe you can update your boot_load to fix it, but it is another history.

2 - Do not change the directory/file:
>> C:\Program Files (x86)\Arduino\hardware\Sanguino-master\boards.txt
it will not fix the problem.

I spend almost a full day to fix it because the file above.
=========================================================

The software version:

Arduino IDE version 1.8.8 (https://www.arduino.cc/en/Main/Software)
Sanguino-master last version (https://github.com/Lauszus/Sanguino) (2018-12-12)
Marlin version 1.1.9 (http://marlinfw.org/meta/download/)

Arduino IDE setup:
> Tools
>> Board: "Sanguino"
>> Processor: "ATMega 1284 or AtMega 1284P (16 MHz)"
>> Port: "COM7" (for my board)
>> Programmer: "ArduinoISP"

Just do not forgive to hold the reset buttom in the sanguinololu board.
You need hold it pressed during the compilation process until the start of the upload process in the arduino IDE.
Worked for me.

Kind regards Juan.
Re: Sanguinololu 1.3a, Marlin 1.1.9
April 12, 2020 06:34AM
Hi,

I am trying to upload Marlin 1.1.9. onto my almost 8 years old Sanguinololu 1.3a, which features the atmega644P (I guess at 16 MHz?)

Compiling of Marlin under Arduino 1.8.12 works fine, but when trying to upload I get the following report:
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x6f

I've followed now all the advices I could find on the web, including the one of Juan in this forum (I reduced the bootloader communication speed to 57600 and then further to 38400, without success).
After trying this for days now, I would be really grateful for help!

Best,
Alex

----

Interestingly, with my old computer that runs my 3D printer, and Arduino 0022 which is installed there, I am still able to upload the super-old version of Marlin which I origninally installed in 2013 (I couldn't even find out which Marlin version this is.) I am doing this occasionally whenever I need to change some settings.
Re: Sanguinololu 1.3a, Marlin 1.1.9
April 12, 2020 09:24AM
The old bootloader upload details are:

protocol=stk500
maximum_size=63488
upload.speed=38400

the newer bootloader has

protocol=arduino
maximum_size=64512
upload.speed=115200

So you need to change all these then restart arduino ide as it doesn't notice config file changes without a restart.
Re: Sanguinololu 1.3a, Marlin 1.1.9
April 12, 2020 03:19PM
Thank you very much.
It has definitely changed something.
But then I receive a very unspecific error message:

"An error occurred while uploading the sketch"

I get a more detailed error message when activating "Show verbose output during upload":


Using Port : COM10
Using Programmer : stk500
Overriding Baud Rate : 38400
avrdude: stk500v2_ReceiveMessage(): timeout
...
avrdude: stk500v2_getsync(): timeout communicating with programmer


I am sure the sanguinololu board is OK, because I can flash it flawlessly with the old Arduino/Marlin combination.
What seems strange is that programmer is set to "stk500", but the error message from the Arduino IDE mentions"stk500v2". Could this be the problem?

Alex
Re: Sanguinololu 1.3a, Marlin 1.1.9
April 13, 2020 12:47PM
SOLVED: Just wanted to let anyone interested know that I solved it. The programmer must be set to "arduino" and not "stk500".
Re: Sanguinololu 1.3a, Marlin 1.1.9
August 24, 2020 03:49PM
Hi everyone I'm trying to do the same, update the Sanguinololu 1.3.a with Marlin 1.1.9, folow all the steps, I was able to compile Marlin without errors but when it try to deploy the communicaction fails with the Sanguinololu.


avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding

all this is set:

Arduino IDE setup:
> Tools
>> Board: "Sanguino"
>> Processor: "ATMega 1284 or AtMega 1284P (16 MHz)"
>> Port: "COM4" (for my board)
>> Programmer: "ArduinoISP"


Sanguino is listed in the boards menu at Arduino IDE and is compliled without errors, but when I try to to change C:\Program Files (x86)\Arduino\hardware\arduino\avr\boards.txt to change the bootloader baurate the is no Sanguino listed here, is a dumb question but Should I mannually add it??? or should be there and is missing, probably I have something wrong in my installation, I am running a Windows 10 PC


Any help would be appreciated Thanks in advance Regards
Re: Sanguinololu 1.3a, Marlin 1.1.9
August 24, 2020 09:51PM
Modern Arduino IDE stores Sanguino boards.txt in .arduino15/packages/Sanguino/hardware/avr/1.0.3

You shouldn't have to change the baudrate if you installed new bootloader, as the boards.txt matches the bootloader baudrate.

If you uploaded a new bootloader (which you should as as optiboot is 1/4 the size of the old one)

You do however need to edit the fuses in the Sanguino boards.txt file.
The Sanguino presumes a crystal not a resonator like Sanguinololu has.

exit Arduino ide and updated these lines.
sanguino.bootloader.low_fuses=0xF7
sanguino.bootloader.high_fuses=0xDE
sanguino.bootloader.extended_fuses=0xFD

Install the bootloader again (as this also installs the fuses)

Edited 1 time(s). Last edit at 08/24/2020 09:52PM by Dust.
Re: Sanguinololu 1.3a, Marlin 1.1.9
August 25, 2020 02:46AM
Deard Dust First of all Thank you very much for taking the time to answer, really appreciate your help

This is what I was test up know, finally I have to do a vanila installation with Arduino 1.8.8 Ide as described in a W7 environment, to notice that I also need to download the zip file from [github.com] uncompress the file and copy to C:\Program Files (x86)\Arduino\hardware\Sanguino-master and then add in preferences of arduino ide into board manager [raw.githubusercontent.com], because for a reason I dont know, it shows the sanguino board in my previous arduino ide installation, is listed and compiles and this was the reason that I could not find the boards.txt file with the sanguino settings, once this mistery it solves I thought that will be much easier but I'm still without success.

Once I was able I tryed different settings in the boards.txt and I use the one you recommend me This is the content of the boards.txt I always restart the IDE after change the file:

atmega1284p.name=Sanguino W/ ATmega1284 or ATmega1284P (16MHz)

atmega1284p.upload.maximum_size=130048
atmega1284p.upload.maximum_data_size=16384

atmega1284p.upload.protocol=arduino
atmega1284p.upload.speed=115200
atmega1284p.bootloader.path=optiboot
atmega1284p.bootloader.file=optiboot_atmega1284p.hex

atmega1284p.bootloader.low_fuses=0xF7
atmega1284p.bootloader.high_fuses=0xDE
atmega1284p.bootloader.extended_fuses=0xFD
atmega1284p.bootloader.unlock_bits=0x3F
atmega1284p.bootloader.lock_bits=0x0F

atmega1284p.build.mcu=atmega1284p
atmega1284p.build.f_cpu=16000000L
atmega1284p.build.board=AVR_SANGUINO
atmega1284p.build.core=arduino:arduino
atmega1284p.build.variant=sanguino

But I still get the same I have the doubt that really the changes are used, when I do the upload I keep pressed the reset button until I see the loading message in the arduino IDE, also try to disconnect a switch because I read somebody was able to update in that way.

This is what I get with setting you send me, Marlin is compiled ok but is unable to write to the board.

Sketch uses 110322 bytes (84%) of program storage space. Maximum is 130048 bytes.
Global variables use 4168 bytes (25%) of dynamic memory, leaving 12216 bytes for local variables. Maximum is 16384 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xf9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xf9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xf9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xf9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xf9
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xe1
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x71
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xb0
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x4c
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xdc
Problem uploading to board. See [www.arduino.cc] for suggestions.

when I saw that the problem is the same I switch back to my W10 installation with the Arduino IDE 1.8.12 but also try in the other installation with 1.8.8 but I get the same
Already change the USB Cable and the FTDI Drivers with the latest version I find 16/08/2017 V 2.12.28.0

I am able to update the original Marlin who came with my printer using an Arduino 1.0.1 but the Marlin version is really old 1.0.0.3 and that is because I'm trying to update to 1.1.9.1

My printer is an Old Geeetech prusa I3pro B with Sanguinololu controler and a discount Reprap display controler

I really appreciate your help Attached you will find a couple of printscreen a picture of my board, the boards.txt file and the configuration.h of the marlin

Also test to write the Marlin to the sanguino with the printed turned on and also turned off, I dont know wich is better both fails.

I'm out of resources I tried a lot but nothing works, do you think if I get an AVR Programmer I will able to write the Marlin???


Thanks in advance I'm really frustrated with this any clue will be gold.


When the times get better and we will be able to travel again if you came to end of the World Argentina where I live At least I owe you a Drink.
Attachments:
open | download - boards.txt (4.5 KB)
open | download - Configuration.h (72.2 KB)
open | download - Arduino IDE.jpg (214.3 KB)
open | download - IMG_4715.jpeg (792.3 KB)
open | download - Directorystructure.jpg (152.3 KB)
Re: Sanguinololu 1.3a, Marlin 1.1.9
August 30, 2020 11:39PM
Thanks everybody Finally I get all this working like a charm reflash the bootloader with an arduino ISP with AVRDUDESS upload the optiboot_atmega1284p.hex and after that update to marlin 1.1.9.2 without any problem with Arduino IDE 1.8.12 we can say the Sanguino still updated lot of work and research but I get it working, I note the printer runs very smooth after this update Im very glad with this also planning to have some improvements now I can control Marlin I feel free to do a lot of thing like add autolevel probe hack Pin A1 to get an extruder fan control, also but I have better think this plan to change the display to an IC2 diplay to free some pins to get more functionality.

Thanks everybody feel free to contact me regards.
Sorry, only registered users may post in this forum.

Click here to login