Welcome! Log In Create A New Profile

Advanced

Marlin to Sav MK1

Posted by kapperi 
Marlin to Sav MK1
January 29, 2018 03:58AM
Hello,

I´m trying to flash my Sav MK1 card with new Marlin. Problem is that when I try to compile anything with IDE I just get that "Arduino.h" is missing... This happens even with bareminium sketch!

Is it possible to flash it thru Teensy 2++ card and use the avrdude to flash it to card?

I was trying to use klipper, but there was some problems with usbdata witch I couldnt solve so I have to change back to "Sound of rattling" Marlin...

Edited 2 time(s). Last edit at 01/29/2018 04:00AM by kapperi.
Re: Marlin to Sav MK1
January 29, 2018 04:39AM
Its failing at the compile step, there is no image to flash to anything yet.


Did you install the Teensyduino ?

Did you install the SAV MKI files?

Did you select SAV MKI as the board type?

Did you set motherboard = "BOARD_SAV_MKI" in your configuration.h?

where exactly are you getting this new marlin from?
Re: Marlin to Sav MK1
January 29, 2018 04:48AM
Quote
Dust
Its failing at the compile step, there is no image to flash to anything yet.


Did you install the Teensyduino ?

Did you install the SAV MKI files?

Did you select SAV MKI as the board type?

Did you set motherboard = "BOARD_SAV_MKI" in your configuration.h?

where exactly are you getting this new marlin from?

I installed Teensduino and the SAV MK1 File, and if I choose Sav MK1 board it gives me that error...

I think its related to Arduino IDE version.

Yes I have made the configuration changes for sav mk1 and oled display.

I tried the newest marlin from here

Whats the easiest way to get this going? If I understand correctly using old Arduino IDE means I have to use some old Marlin Fw too?
Re: Marlin to Sav MK1
January 30, 2018 02:37AM
Trying to replicate...

So far I have a new arduino ide and installed Teensyduino and set motherboard = "BOARD_SAV_MKI" in your configuration.h

Then I choose a board of teensy++ 2.0 as this is the same AT90USB1286 cpu as the Sav MK1

It compiled fine.

So It looking like there is something wrong with the SAV MKI files
Ill play with those next
Re: Marlin to Sav MK1
January 30, 2018 03:22AM
The supplied boards.txt file is not for the current ardunio at all...

replace the boards.txt file in [arduinofolder]\hardware\teensy\avr with this:

menu.usb=USB Type
menu.speed=CPU Speed
menu.keys=Keyboard Layout

usbtsav.name=[usbtinyisp]SAV-MkI
usbtsav.upload.using=usbtinyisp
usbtsav.upload.maximum_size=131072
usbtsav.build.mcu=at90usb1286
usbtsav.build.fcpu=16000000L
usbtsav.build.core=teensy
usbtsav.build.usbtype=USB_SERIAL
usbtsav.build.keylayout=US_ENGLISH
usbtsav.build.warn_data_percentage=94
usbtsav.build.toolchain=avr/bin/
usbtsav.build.command.gcc=avr-gcc
usbtsav.build.command.g++=avr-g++
usbtsav.build.command.ar=avr-ar
usbtsav.build.command.objcopy=avr-objcopy
usbtsav.build.command.objdump=avr-objdump
usbtsav.build.command.size=avr-size
usbtsav.build.flags.common=-g -Wall -ffunction-sections -fdata-sections
usbtsav.build.flags.dep=-MMD
usbtsav.build.flags.optimize=-Os
usbtsav.build.flags.cpu=-mmcu=at90usb1286
usbtsav.build.flags.defs=-DTEENSYDUINO=141 -DARDUINO_ARCH_AVR
usbtsav.build.flags.cpp=-fno-exceptions -felide-constructors -std=gnu++11
usbtsav.build.flags.c=
usbtsav.build.flags.S=-x assembler-with-cpp
usbtsav.build.flags.ld=-Wl,--gc-sections,--relax
usbtsav.build.flags.ldspecs=
usbtsav.build.flags.libs=-lm
usbtsav.build.serial_number=true



cdcsavD.name=[BootloaderCDC]SAV-MkI_RevD
cdcsavD.upload.protocol=avr109
cdcsavD.upload.maximum_size=122048
cdcsavD.build.mcu=at90usb1286
cdcsavD.build.fcpu=16000000L
cdcsavD.build.core=teensy
cdcsavD.upload.speed=115200
cdcsavD.build.usbtype=USB_SERIAL
cdcsavD.build.keylayout=US_ENGLISH
cdcsavD.build.warn_data_percentage=94
cdcsavD.build.toolchain=avr/bin/
cdcsavD.build.command.gcc=avr-gcc
cdcsavD.build.command.g++=avr-g++
cdcsavD.build.command.ar=avr-ar
cdcsavD.build.command.objcopy=avr-objcopy
cdcsavD.build.command.objdump=avr-objdump
cdcsavD.build.command.size=avr-size
cdcsavD.build.flags.common=-g -Wall -ffunction-sections -fdata-sections
cdcsavD.build.flags.dep=-MMD
cdcsavD.build.flags.optimize=-Os
cdcsavD.build.flags.cpu=-mmcu=at90usb1286
cdcsavD.build.flags.defs=-DTEENSYDUINO=141 -DARDUINO_ARCH_AVR
cdcsavD.build.flags.cpp=-fno-exceptions -felide-constructors -std=gnu++11
cdcsavD.build.flags.c=
cdcsavD.build.flags.S=-x assembler-with-cpp
cdcsavD.build.flags.ld=-Wl,--gc-sections,--relax
cdcsavD.build.flags.ldspecs=
cdcsavD.build.flags.libs=-lm
cdcsavD.build.serial_number=true




cdcsav.name=[BootloaderCDC]SAV-MkI_RevD.1
cdcsav.upload.protocol=avr109
cdcsav.upload.maximum_size=125952
cdcsav.build.mcu=at90usb1286
cdcsav.build.fcpu=16000000L
cdcsav.build.core=teensy
cdcsav.upload.speed=115200
cdcsav.build.usbtype=USB_SERIAL
cdcsav.build.keylayout=US_ENGLISH
cdcsav.build.warn_data_percentage=94
cdcsav.build.toolchain=avr/bin/
cdcsav.build.command.gcc=avr-gcc
cdcsav.build.command.g++=avr-g++
cdcsav.build.command.ar=avr-ar
cdcsav.build.command.objcopy=avr-objcopy
cdcsav.build.command.objdump=avr-objdump
cdcsav.build.command.size=avr-size
cdcsav.build.flags.common=-g -Wall -ffunction-sections -fdata-sections
cdcsav.build.flags.dep=-MMD
cdcsav.build.flags.optimize=-Os
cdcsav.build.flags.cpu=-mmcu=at90usb1286
cdcsav.build.flags.defs=-DTEENSYDUINO=141 -DARDUINO_ARCH_AVR
cdcsav.build.flags.cpp=-fno-exceptions -felide-constructors -std=gnu++11
cdcsav.build.flags.c=
cdcsav.build.flags.S=-x assembler-with-cpp
cdcsav.build.flags.ld=-Wl,--gc-sections,--relax
cdcsav.build.flags.ldspecs=
cdcsav.build.flags.libs=-lm
cdcsav.build.serial_number=true

NB I cant test this, I don't have one of these boards, so cant test the upload part at all. But this will at least compile

Edited 1 time(s). Last edit at 01/30/2018 03:23AM by Dust.
Re: Marlin to Sav MK1
January 30, 2018 07:30AM
Thank you very much! Im going test this as soon possible...
Re: Marlin to Sav MK1
February 05, 2018 04:03AM
Aaaand now it's just a lousy brick...

Compile works beautifully but the flashing did not...
Re: Marlin to Sav MK1
February 05, 2018 05:14AM
Did you grab a log?

What method did you use?
usbtinyisp or BootloaderCDC?

Bricking is un recoverable... but I doubt it actually been bricked... it may not be doing anything useful... but thats not the same thing.
Re: Marlin to Sav MK1
February 05, 2018 05:22AM
I used BootloaderCDC, through shell with avrdude avr109 protocol.

I wonder how it is possible to brick bootloader with that kind of programming method?

I have Avrisp2 and I think that I can flash new bootloader if needed...

Now it doesnt do anything when I connect usb cable to pc or raspberry, so flashing thru bootloader is impossible
Re: Marlin to Sav MK1
February 06, 2018 11:55AM
And the avrisp mk2 does the job...

I think that it was just a mistake to try flash that with windows pc and avrdude. No problems with raspberry...

Thanks @Dust, now its working great.
Re: Marlin to Sav MK1
February 08, 2018 11:17AM
Actually there is some warnings, these aren´t affecting anything? Are they?

Warning: Board arduino:avr:usbtsav doesn't define a 'build.board' preference. Auto-set to: AVR_USBTSAV
Warning: Board arduino:avr:cdcsav doesn't define a 'build.board' preference. Auto-set to: AVR_CDCSAV
Warning: Board arduino:avr:cdcsavD doesn't define a 'build.board' preference. Auto-set to: AVR_CDCSAVD
Warning: Board teensy:avr:cdcsavD doesn't define a 'build.board' preference. Auto-set to: AVR_CDCSAVD
Warning: Board teensy:avr:usbtsav doesn't define a 'build.board' preference. Auto-set to: AVR_USBTSAV
Warning: Board teensy:avr:cdcsav doesn't define a 'build.board' preference. Auto-set to: AVR_CDCSAV
Sorry, only registered users may post in this forum.

Click here to login