I'm having trouble getting Marlin 2.0.9.3 wrork on Sanguinololu 1.3a control boa - Page 1
Forum section: electronics / general

author: pcmad
author_rank: Regular Contributor
timestamp: April 01, 2022, 02:25:17 pm
content: I'm having trouble getting Marlin 2.0.9.3 wrork on Sanguinololu 1.3a control boardThe faults include locked up stepper motors no temperature Output End stops not acknowledging And a lot of things are not working the .The only thing that does seem to work OK is the out of filament sensorAfter looking at verbose mode on my arduino ide I get these messages also uploading the firmware via a arduino as ISPSanguinololu control board 1.3a Microcontroller atmel 1284p puJ tag disabled for end stop To workMarlin 1.1.9.1 work perfectlyerror log/home/user/arduino-1.8.19/arduino-builder -dump-prefs -logger=machine -hardware /home/user/arduino-1.8.19/hardware -hardware /home/user/.arduino15/packages -tools /home/user/arduino-1.8.19/tools-builder -tools /home/user/arduino-1.8.19/hardware/tools/avr -tools /home/user/.arduino15/packages -built-in-libraries /home/user/arduino-1.8.19/libraries -libraries /home/user/Arduino/libraries -fqbn=Sanguino:avr:sanguino:cpu=atmega1284p -vid-pid=2341_0001 -ide-version=10819 -build-path /tmp/arduino_build_713268 -warnings=none -build-cache /tmp/arduino_cache_783826 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/home/user/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/home/user/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino14 -prefs=runtime.tools.avr-gcc.path=/home/user/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/home/user/.arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/home/user/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/home/user/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.arduinoOTA.path=/home/user/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/home/user/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /home/user/Desktop/3dprinter/firmware/Marlin-2.0.x/Marlin/Marlin.ino/home/user/arduino-1.8.19/arduino-builder -compile -logger=machine -hardware /home/user/arduino-1.8.19/hardware -hardware /home/user/.arduino15/packages -tools /home/user/arduino-1.8.19/tools-builder -tools /home/user/arduino-1.8.19/hardware/tools/avr -tools /home/user/.arduino15/packages -built-in-libraries /home/user/arduino-1.8.19/libraries -libraries /home/user/Arduino/libraries -fqbn=Sanguino:avr:sanguino:cpu=atmega1284p -vid-pid=2341_0001 -ide-version=10819 -build-path /tmp/arduino_build_713268 -warnings=none -build-cache /tmp/arduino_cache_783826 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/home/user/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/home/user/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino14 -prefs=runtime.tools.avr-gcc.path=/home/user/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/home/user/.arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/home/user/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/home/user/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.arduinoOTA.path=/home/user/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/home/user/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /home/user/Desktop/3dprinter/firmware/Marlin-2.0.x/Marlin/Marlin.inoUsing board 'sanguino' from platform in folder: /home/user/.arduino15/packages/Sanguino/hardware/avr/1.0.3Using core 'arduino' from platform in folder: /home/user/.arduino15/packages/arduino/hardware/avr/1.8.5Detecting libraries used.../home/user/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega1284p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_SANGUINO -DARDUINO_ARCH_AVR -I/home/user/.arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/home/user/.arduino15/packages/Sanguino/hardware/avr/1.0.3/variants/sanguino /tmp/arduino_build_713268/sketch/Marlin.ino.cpp -o /dev/null/home/user/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega1284p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_SANGUINO -DARDUINO_ARCH_AVR -I/home/user/.arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/home/user/.arduino15/packages/Sanguino/hardware/avr/1.0.3/variants/sanguino /tmp/arduino_build_713268/sketch/src/MarlinCore.cpp -o /dev/nullError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/MarlinCore.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/core/utility.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/feature/pause.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/feature/runout.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/gcode/calibrate/G28.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/gcode/config/M301.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/gcode/config/M302.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/gcode/control/M80_M81.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/gcode/eeprom/M500-M504.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/gcode/feature/pause/M600.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/gcode/feature/runout/M412.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/gcode/host/M115.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/gcode/motion/G2_G3.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/gcode/queue.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/gcode/temp/M104_M109.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/gcode/temp/M105.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/gcode/temp/M106_M107.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/gcode/temp/M140_M190.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/gcode/temp/M155.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/gcode/temp/M303.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/module/endstops.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/module/motion.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/module/planner.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/module/settings.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/module/temperature.cppError while detecting libraries included by /tmp/arduino_build_713268/sketch/src/module/tool_change.cppGenerating function prototypes.../home/user/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega1284p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_SANGUINO -DARDUINO_ARCH_AVR -I/home/user/.arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/home/user/.arduino15/packages/Sanguino/hardware/avr/1.0.3/variants/sanguino /tmp/arduino_build_713268/sketch/Marlin.ino.cpp -o /tmp/arduino_build_713268/preproc/ctags_target_for_gcc_minus_e.cpp/home/user/arduino-1.8.19/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/arduino_build_713268/preproc/ctags_target_for_gcc_minus_e.cppCompiling sketch...Compiling libraries...Compiling core...Archiving built core (caching) in: /tmp/arduino_cache_783826/core/core_Sanguino_avr_sanguino_cpu_atmega1284p_69e06db4cea1daafc0a763812e40c218.aLinking everything together...Sketch uses 63574 bytes (48%) of program storage space. Maximum is 130048 bytes.Global variables use 2636 bytes (16%) of dynamic memory, leaving 13748 bytes for local variables. Maximum is 16384 bytes./home/user/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/home/user/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega1284p -cstk500v1 -P/dev/ttyACM0 -b19200 -Uflash:w:/tmp/arduino_build_713268/Marlin.ino.hex:iavrdude: Version 6.3-20190619Copyright (c) 2000-2005 Brian Dean,http://www.bdmicro.com/Copyright (c) 2007-2014 Joerg WunschSystem wide configuration file is "/home/user/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"User configuration file is "/home/user/.avrduderc"User configuration file does not exist or is not a regular file, skippingUsing Port : /dev/ttyACM0Using Programmer : stk500v1Overriding Baud Rate : 19200AVR Part : ATmega1284PChip Erase delay : 55000 usPAGEL : PD7BS2 : PA0RESET disposition : dedicatedRETRY pulse : SCKserial program mode : yesparallel program mode : yesTimeout : 200StabDelay : 100CmdexeDelay : 25SyncLoops : 32ByteDelay : 0PollIndex : 3PollValue : 0x53Memory Detail :Block Poll Page PolledMemory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------eeprom 65 10 128 0 no 4096 8 0 9000 9000 0xff 0xffflash 65 10 256 0 yes 131072 256 512 4500 4500 0xff 0xfflock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00Programmer Type : STK500Description : Atmel STK500 Version 1.x firmwareHardware Version: 2Firmware Version: 1.18Topcard : UnknownVtarget : 0.0 VVaref : 0.0 VOscillator : OffSCK period : 0.1 usavrdude: AVR device initialized and ready to accept instructionsReading | ################################################## | 100% 0.02savrdude: Device signature = 0x1e9705 (probably m1284p)avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performedTo disable this feature, specify the -D option.avrdude: erasing chipavrdude: reading input file "/tmp/arduino_build_713268/Marlin.ino.hex"avrdude: writing flash (63574 bytes):Writing | ################################################## | 100% 60.17savrdude: 63574 bytes of flash writtenavrdude: verifying flash memory against /tmp/arduino_build_713268/Marlin.ino.hex:avrdude: load data flash data from input file /tmp/arduino_build_713268/Marlin.ino.hex:avrdude: input file /tmp/arduino_build_713268/Marlin.ino.hex contains 63574 bytesavrdude: reading on-chip flash data:Reading | ################################################## | 100% 35.70savrdude: verifying ...avrdude: 63574 bytes of flash verifiedavrdude done. Thank you.

author: Mechatrommer
author_rank: Super Contributor
timestamp: April 01, 2022, 03:43:04 pm
content: have you edited Configuration.h? can you post here?

author: MarkF
author_rank: Super Contributor
timestamp: April 01, 2022, 05:07:19 pm
content: I don't think you can build the Marlin 2.#.#.# releases with the Arduino IDE because of memory issues.You need to switch to VS Code to build it.Some instructions on setting up VS Code:https://marlinfw.org/docs/basics/install_platformio_vscode.htmland

author: pcmad
author_rank: Regular Contributor
timestamp: April 01, 2022, 09:59:10 pm
content: Quote from: Mechatrommer on April 01, 2022, 03:43:04 pmconfig files herehttp://pcmad.modulewebdevelopment.com/3d/Marlin2-config.zip

author: thm_w
author_rank: Super Contributor
timestamp: April 01, 2022, 10:12:59 pm
content: The pins file you included was pins_SANGUINOLOLU_11.hThe config you selected was BOARD_SANGUINOLOLU_12and the board you actually have is v1.3https://marlinfw.org/docs/hardware/boards.htmlThe right pins file would be pins_sanguinololu_12.h, I assume thats what is being used and you just included the wrong one by accident.1.2 and 1.3 hardware use the same pinouts according to here:https://reprap.org/wiki/Sanguinololu#Modifying_Older_Boards_.28from_Version_1.1_and_1.2_to_Version_1.3a.29

author: MarkF
author_rank: Super Contributor
timestamp: April 01, 2022, 11:21:21 pm
content: You select your board in the configuration.h file and the pins definition file is selected automatically.Actually, thepins_SANGUINOLOLU_12.hincludes thepins_SANGUINOLOLU_11.hfile.Code:#ifndef BOARD_NAME#define BOARD_NAME "Sanguinololu 1.2"#endif#define SANGUINOLOLU_V_1_2#include "pins_SANGUINOLOLU_11.h"I assume the OP knows how to setup theConfiguration.handConfiguration_adv.hfiles since Marlin 1.1.9.1 runs okay. If not, I would suggest starting with the appropriate example config files for the printer.F.Y.I. Marlin 2.0 uses more memory than the similarly configured 1.9.1.1 version. I heavily modified Marlin 1.1.9.1 for my CR-10 Mini. So, I haven't updated to Marlin 2.0. The ATmega1284P has very limited program memory and some options may need to be given up to run Marlin 2.0.

author: thm_w
author_rank: Super Contributor
timestamp: April 02, 2022, 12:17:58 am
content: Quote from: MarkF on April 01, 2022, 11:21:21 pmYou would think but look at the config fileCode:* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.**/#define TEMP_SENSOR_0 999 // was 1#define TEMP_SENSOR_1 0#define TEMP_SENSOR_2 0#define TEMP_SENSOR_3 0#define TEMP_SENSOR_4 0#define TEMP_SENSOR_5 0#define TEMP_SENSOR_6 0#define TEMP_SENSOR_7 0#define TEMP_SENSOR_BED 998 // was 1OP set them to the hardcoded values for some reason?Was that just for testing?

author: Mechatrommer
author_rank: Super Contributor
timestamp: April 02, 2022, 02:13:09 am
content: Quote from: thm_w on April 01, 2022, 10:12:59 pmi checked the pins_SANGUINOLOLU_12.h, it will redirect to pins_SANGUINOLOLU_11.h anyway (with SANGUINOLOLU_V_1_2 defined) now the OP's only job is to make sure the pin assignment in pins_SANGUINOLOLU_11.h is correct with care attention to SANGUINOLOLU_V_1_2 keyword... Marlin is a big files, i will always make a comment with my tag name whenever i edit the value or add some codes, so later i can quickly search which part is mine skipping the rest of the default codes and values. its kind of my own version control, to make me easier for future update and only port files with my tag name to latest Marlin version. i suggest the same to OP and give us the tag name so we can quickly review. i'm currently using Marlin-2.0.7.2 here...fwiw...Quote from: MarkF on April 01, 2022, 11:21:21 pmi did the same on Marlin 1 that made me lazy to upgrade for the long time... but when checking the latest Marlin 2, i noticed some features that i was really needing/dreaming all the while such as resume on power outage, chamber temperature control etc... so i think its a worthy effort to ram the barrier... installed the platform.io + vs code barrier and redo the hardwork.. keeping notes on every step of it so i can review later... my next gen 3d printer, HW wise is 90+ % complete, FW wise is complete (at least runable on the new HW) the bad thing is i was tired doing it FW+HW so i currently put it on hold while i'm doing other stuffs.. my other 3 machines will surely benefit from this Marlin2 upgrade hardwork later... fwiw..

author: pcmad
author_rank: Regular Contributor
timestamp: April 02, 2022, 03:16:23 am
content: Quote from: thm_w on April 02, 2022, 12:17:58 amyes for testing as temp was not reading due to marlin not working correctly

author: pcmad
author_rank: Regular Contributor
timestamp: April 02, 2022, 03:25:34 am
content: Quote from: MarkF on April 01, 2022, 05:07:19 pmdoes vs allow upload via arduino as ISP as i could not get the boot loader to work if not it looks like and can take the bin file that vs made and use avrdude to upload via arduino as ISP

author: pcmad
author_rank: Regular Contributor
timestamp: April 02, 2022, 03:32:18 am
content: Quote from: MarkF on April 01, 2022, 11:21:21 pmwhat would you say the ram / load useage difference would be in the 2 versions Marlin 2.0 vs Marlin 1.1.9.1

author: MarkF
author_rank: Super Contributor
timestamp: April 02, 2022, 01:24:31 pm
content: (It has been several months since I've looked at Marlin.......)I have installed VS Code and setup Marlin 2.0.9.3 for my CR-10 Mini with the original Creality v1.1.3 board. Using the example configuration files unmodified, I was able to build Marlin 2.0 with compiler optimization. However, I was not able to get it to compile without optimization. (i.e. The example config is right up at the limit of program space for the ATmega1284P.)If you're looking to add a bunch of features to the example config, you will probably need to upgrade the motherboard.I never tried to upload the binary to my printer. I did make some effort to identify where I would need to make changes to incorporate my custom status display. However, it was just more work than I wanted to do.

author: pcmad
author_rank: Regular Contributor
timestamp: April 08, 2022, 01:36:19 am
content: just to give you an update i got Marlin 2.0.9.3 on a Sanguinololu 1.3a board with a controller atmel 1284p-pu compiled by VS studio uploaded by an Arduino as an ISP using AVRDUDE also if your using a 20mhz crystal make sure in VS you set the clock speed else you will have issues connecting and running the printer