Page MenuHomeAleph Objects Inc

Add support for flashing FW to Ultimachine Archim board for Quiver
Open, HighPublic

Description

The Archim board is a 32-bit board based on the Arduino Due. This board uses a different flashing program. In order for the Archim board to be used on Quiver, Cura 2 will need to be able to flash it.

Edit: we should always use development names for in development products because final release names are likely to change before final release.

Event Timeline

marcio created this task.Oct 31 2017, 2:30 PM

@marcio

Is the Archim board required for the TAZ7 vs/ RAMBO?

Steven renamed this task from Add support for flashing FW to Ultimachine Archim board for TAZ 7 to Add support for flashing FW to Ultimachine Archim board for Quiver.Dec 5 2017, 3:43 PM
Steven updated the task description. (Show Details)
Steven added a subscriber: Steven.

@martinbogo we are currently looking at the Archim board for use in the next revision of the TAZ. We're still early in development so this is always subject to change.

Okay, I have switched out the Rambo for an Archim board in the Quiver.

alexei triaged this task as Normal priority.Jan 25 2018, 8:03 AM
alexei changed the edit policy from "Custom Policy" to "Cura LulzBot Edition (Project)".

Related question:

Where is the config.h / advanced config for Marlin for the quiver to build it for Archim?

marcio added a comment.Feb 5 2018, 9:15 AM

@martinbogo: Well, the only firmware I've used with it is a hacked up version of Marlin 2.0 from Ultimachine. There is no current stable FW for the Archim board because Marlin 2.0 hasn't been released yet, so I haven't really put much work into it. I've attached a ZIP file with the code I had used to compile FW several months ago, it's really old, but it is what we are using on our internal testing.

marcio added a comment.EditedFeb 5 2018, 9:42 AM

@martinbogo: The above FW requires TMC2130 drivers. If you are using a retail Archim 1.0, you will need to modify the FW to turn off support for the Trinamic drivers. We haven't tested it in that configuration however. Our only development board is using TMC2130 drivers and this is what the Quiver will likely have.

karrad lowered the priority of this task from Normal to Low.Feb 21 2018, 2:11 PM
karrad added a subscriber: karrad.

This will be required for next release, moving to backlog for now

Attached are the ".elf" and".bin" file I obtain when I compile the Archim 2.0 FW using the Arduino 1.8.3 IDE. Johnny told me this can be flashed to the Archim using the following command line:

~/.arduino15/packages/arduino/tools/bossac/1.7.0/bossac -i -U true -e -w -b -R /
tmp/arduino_build_*/Marlin.ino.bin

I also found out you can generate a ".hex" file by running the following command line:

avr-objcopy -O ihex -R .eeprom Marlin.ino.elf Marlin.ino.hex

But Cura gives the error "Firmware update failed due to a communication error" when trying to upload that ".hex" file to the Archim 2.0.

Elf:


Bin:
Hex:
Source:

The Arduino IDE uses Bossac as well, using the following command line:

/home/aleph/.arduino15/packages/arduino/tools/bossac/1.7.0/bossac -i -d --port=ttyACM0 -U true -e -w -v -b /tmp/arduino_build_576153/Marlin.ino.bin -R

Here is the project page for Bossac:

https://github.com/shumatech/BOSSA

The Archim 2.0 has a atsam3x8e

I have now updated the Makefile for Marlin 2.0 such that I can generate .hex files for Quiver. Still no way to install them, however.

alexei raised the priority of this task from Low to High.Sep 11 2018, 11:11 PM
marcio added a subscriber: alexei.Sep 12 2018, 7:52 AM

@alexei: In order to properly compile, the "arm-none-eabi-*" tools will need to be present in the PATH. This is not the case for our standard LulzBot Debian build. The tool chain I am now using stored on my machine here:

/home/aleph/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/*

It appears to be part of the Arduino IDE.

It is now possible to update Quiver FW from the command line using a ".bin" file generated from the Makefile. The shell script and executable to do the FW install is here:

/home/aleph/shared-j/Documents/R&D/marlin/marlin-quiver-firmware

It looks like bossac does not support .hex files, but if Cura is made to support them we could use .hex instead of .bin for consistency with the other printers.

@marcio,
I'm following this https://reprap.org/wiki/Archim_v1.0 for flashing

Hold the erase button and press the reset button. The board will now boot into the Bossa bootloader.

From bossa bootloader I can then flash with

bin/bossac -i -d --port=ttyACM0 -U true -e -w -v -b -R Marlin_Quiver_TAZ7_Quiver_DualExtruder_bugfix-2.0.x.1_5727a786a.bin

After this new USB device comes up for a while:

Oct 15 14:17:02 kernel: usb 1-5: new full-speed USB device number 14 using xhci_hcd
Oct 15 14:17:02 kernel: usb 1-5: not running at top speed; connect to a high speed hub
Oct 15 14:17:02 kernel: usb 1-5: New USB device found, idVendor=03eb, idProduct=2424
Oct 15 14:17:02 kernel: usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 15 14:17:02 kernel: usb 1-5: Product: LulzBot Quiver
Oct 15 14:17:02 kernel: usb 1-5: Manufacturer: marlinfw.org
Oct 15 14:17:02 kernel: usb 1-5: SerialNumber: 123985739853
Oct 15 14:17:02 kernel: cdc_acm 1-5:1.0: ttyACM0: USB ACM device

But then something is happening and it falls back to Archim:

Oct 15 14:17:36 kernel: usb 1-5: reset full-speed USB device number 14 using xhci_hcd
Oct 15 14:17:36 kernel: usb 1-5: device firmware changed
Oct 15 14:17:36 kernel: cdc_acm 1-5:1.0: ttyACM0: USB ACM device
Oct 15 14:17:36 kernel: usb 1-5: USB disconnect, device number 14
Oct 15 14:17:36 kernel: usb 1-5: new full-speed USB device number 15 using xhci_hcd
Oct 15 14:17:37 kernel: usb 1-5: New USB device found, idVendor=27b1, idProduct=0001
Oct 15 14:17:37 kernel: usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 15 14:17:37 kernel: usb 1-5: Product: Archim
Oct 15 14:17:37 kernel: usb 1-5: Manufacturer: UltiMachine
Oct 15 14:17:37 kernel: cdc_acm 1-5:1.0: ttyACM0: USB ACM device

After which I can't communicate with the board. Probably this is happening because I have nothing, except for power (logic middle PS) and USB connected?
What am I doing wrong?

@alexei: It's possible it's just failing because of lack of thermistors. This will cause Marlin to halt. It appears to me that you may have flashed successfully, you just don't really have a good way to see it since you just have a board. I can compile some FW for you without MIN_TEMP errors.

@marcio ,
Yes, Marlin build that just works without anything connected to the board except for power and USB would be extremely helpful.
Because with current FW it's impossible to flash from CuraLE, since it can't even connect via ttyACM0.

@alexei: Try this one. I set the MIN_TEMP to 0C, so hopefully it won't trigger

@marcio ,
Yes, this worked!
I needed to push reset button, but after doing so I was able to M115:

> [14:53:26] M115
< [14:53:26] FIRMWARE_NAME:Marlin FIRMWARE_VERSION:bugfix-2.0.x.1.1
EXTRUDER_TYPE:AerostruderDual
SOURCE_CODE_URL:https://code.alephobjects.com/diffusion/MARLIN
PROTOCOL_VERSION:1.0 MACHINE_TYPE:LulzBot Quiver EXTRUDER_COUNT:2
UUID:a952577d-8722-483a-999d-acdc9e772b7b
< [14:53:26] Cap:SERIAL_XON_XOFF:0
< [14:53:26] Cap:EEPROM:1
< [14:53:26] Cap:VOLUMETRIC:0
< [14:53:26] Cap:AUTOREPORT_TEMP:1
< [14:53:26] Cap:PROGRESS:0
< [14:53:26] Cap:PRINT_JOB:1
< [14:53:26] Cap:AUTOLEVEL:1
< [14:53:26] Cap:Z_PROBE:1
< [14:53:26] Cap:LEVELING_DATA:1
< [14:53:26] Cap:BUILD_PERCENT:0
< [14:53:26] Cap:SOFTWARE_POWER:0
< [14:53:26] Cap:TOGGLE_LIGHTS:0
< [14:53:26] Cap:CASE_LIGHT_BRIGHTNESS:0
< [14:53:26] Cap:EMERGENCY_PARSER:1
< [14:53:26] Cap:AUTOREPORT_SD_STATUS:0
< [14:53:26] Cap:THERMAL_PROTECTION:1
< [14:53:26] Cap:PAREN_COMMENTS:0
< [14:53:26] Cap:MOTION_MODES:0

I have another question though: Is it possible to reload into bossa bootloader without pushing any buttons on the board?

@marcio , Just tested it with bossac from master branch and -a switch doesn't work on Archim board :(

I have another question though: Is it possible to reload into bossa bootloader without pushing any buttons on the board?

In general, if the FW is not running (i.e. crashed), you must hit the erase button. I have not found a way around this. On TAZ 7, we added a recessed button to allow the user to erase the board, as this seems necessary on the Due style board.

@alexei: And after the flash, you must power cycle the printer (since you can't push the reset button)

alexei added a comment.EditedOct 15 2018, 2:43 PM

@marcio,

This is what works for me and not requiring the reset afterwards:

stty -F /dev/ttyACM0 1200; sleep 2; bin/bossac -i --port=ttyACM0 -U true -u -e -w -v -b -R Marlin_Quiver_TAZ7_Quiver_DualExtruder_bugfix-2.0.x.1_00fd7439b.bin

bossac is built from arduino branch (master doesn't work for me) https://github.com/shumatech/BOSSA/tree/arduino

A bit of explanation about magic 1200 baudrate: https://playground.arduino.cc/Bootloader/DueBootloaderExplained

@marcio , Output of the above command, just for reference here.

Atmel SMART device 0x285e0a60 found
Device       : ATSAM3X8
Chip ID      : 285e0a60
Version      : v1.1 Dec 15 2010 19:25:04
Address      : 524288
Pages        : 2048
Page Size    : 256 bytes
Total Size   : 512KB
Planes       : 2
Lock Regions : 32
Locked       : 12
Security     : false
Boot Flash   : false
Unlock all regions
Erase flash
done in 0.012 seconds

Write 287108 bytes to flash (1122 pages)
[==============================] 100% (1122/1122 pages)
done in 7.735 seconds

Verify 287108 bytes of flash
[==============================] 100% (1122/1122 pages)
Verify successful
done in 5.715 seconds
Set boot flash true
CPU reset.
alexei claimed this task.Oct 16 2018, 9:28 AM