Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] [2.0.x] Ultimachine Archim (SAM3X8E) work-in-progress #7776

Closed
thinkyhead opened this issue Sep 27, 2017 · 28 comments
Closed

[FR] [2.0.x] Ultimachine Archim (SAM3X8E) work-in-progress #7776

thinkyhead opened this issue Sep 27, 2017 · 28 comments
Labels
T: Feature Request Features requested by users.

Comments

@thinkyhead
Copy link
Member

I've received a request to include formal support for this board.

This is a 32-bit RAMBo board. https://ultimachine.com/products/archim-1-0a

Pins definitions can be found at https://github.com/ultimachine/Marlin4Due/tree/Archim/Marlin

@thinkyhead thinkyhead added T: Feature Request Features requested by users. C: Boards/Pins T: HAL & APIs Topic related to the HAL and internal APIs. labels Sep 27, 2017
@teemuatlut
Copy link
Member

Is this a formal request from UltiMachine with possible sponsoring of a test board or is the developer required to purchase one on his own to get started?

@RalphSch
Copy link
Contributor

Just an other type of Due hardware, isn't it? If so it should work right out of the box with the given pin definitions .... if the Due code gets usable. Right at the moment there are still some issues preventing it from being used on a productive printer.

@bobc
Copy link

bobc commented Sep 28, 2017 via email

@tonokip
Copy link
Contributor

tonokip commented Sep 30, 2017

UltiMachine would like to provide+sponsor test boards to Marlin developers. We can also provide samples of a new variant with tmc2130 drivers. If you are interested then send an email request with a link to this discussion to info@ultimachine.com

@teemuatlut
Copy link
Member

You've said the magic word "Trinamic" right there. Email sent. Hopefully I'll hear something back from you guys.

@jhitesma
Copy link
Contributor

jhitesma commented Nov 2, 2017

I recently came into possession of an archim board (Won a contest @Allted ran on the MPCNC forums) so with one on hand to play with I started looking into this. I'm going off of @teemuatlut's #8190 and the pin defs on the ultimachine wiki along with the marlin4due port.

I haven't got it to compile yet so I haven't done a PR, but my branch is here: https://github.com/jhitesma/Marlin-Folger/tree/jth-archim If anyone wanted to take a peek and warn me of any major mistakes I'm making or give me any tips.

@teemuatlut
Copy link
Member

What would your PR be about exactly?
The PR I have standing should provide a working setup along with pin definitions and anything else that's required. It was tested and used for printing at UltiMachine themselves.
There were some problems with recent changes to the Due HAL that broke compiling but at least some of those were already fixed.

@jhitesma
Copy link
Contributor

jhitesma commented Nov 2, 2017

For the archim1.0a - basically just another pins file (and line in pins.h to reference it) and example config files since the pins are different than the archim2.0.

So the big thing is just the different pins defs, and the different config files since it doesn't have those sexy trinamic's ;)

The other other changes are already in your PR - so I'd wait for that to merge first. It wouldn't be that hard to add to your PR but that would make your PR less atomic so I was hesitant to suggest it.

@jhitesma
Copy link
Contributor

jhitesma commented Nov 3, 2017

(I found the info about installing @teemuatlut's tmc2130 arduino library and was able to solve some of the issues I was experiencing. Just missed that the last few dozen times I read the Config files somehow)

I see that #8190 merged...but when I tried to build it it complains about the tmc2130 driver files not being present. (solved as noted above.)

I rebased my work on archim1.0 this morning and found a few other things that have me scratching my head.

  1. the define for SDSS in pins_ARCHIM2.h is inside the LCD ifdef's...but looking at other marlin2.0 pins files it appears this is now required even when LCD's aren't enabled. In my code I got errors with it in the LCD section even if I configured an LCD. Moving it to a miscellaneous section above the LCD section like I saw done in other pins files solved that.

2) There are no current control pins defined on archim2. I'm guessing this is because it's going to be handled through SPI on the TMC2130's but don't see any code to address that. So it appears that as currently merged there's no way to control the current on archim2. (See note above

On archim1.0 I looked at the marlin4due port and brought over the pin definitions for current control - but they broke compilation. Looking at the code it appears current Marlin2.0 only supports 3 channels of current control, a combined XY channel, Z, and a single extruder. Marlin4Due was using 5 channels (X,Y,X,E0,E1). I'm looking into modifying 2.0 to support this - but the way current control is handled has changed substantially and I'm still trying to figure out the best way to approach that. I was able to build for archim1.0a with current control disabled - but I'm not about to try it on a board without that!

BTW - if there's a better place to discuss this please let me know. (I can be reached through my same username on gmail if someone wanted to discuss anything in email) I could open a PR with my work so far but I assume it's prefered that it be more or less complete before I do that so I haven't yet.

@teemuatlut
Copy link
Member

I think here is fine.

The TMC2130 current control is handled by the library and Marlin makes use of that. The digipot or pwm current controls are seperate from anything Trinamic and you may need to expand their functionality.

@fiveangle
Copy link
Contributor

Archim uses a customized Due core (see
https://github.com/ultimachine/Archim/wiki) which needs to be installed as
a new board in Arduino IDE. I looked, but I do not see PlatformIO support
for Archim, so it would need to be added to PlatformIO to build with that.

Is anyone working on this aspect or is there any work-around to support compiling in PlatformIO ? Without that part, the board cannot be included for regression testing since TravisCI for 2.0.x branch currently uses PlatformIO (see #8798)

@jhitesma
Copy link
Contributor

I started to look into that last month but have been crazy busy with life stuff and didn't have any time to even try. But there is info on adding a custom board here:
http://docs.platformio.org/en/stable/platforms/creating_board.html

@teemuatlut
Copy link
Member

@tonokip Care to weigh in on this? It's possible that just for compile test purposes all it needs is the compile time definition for ARDUINO_SAM_ARCHIM.

@thinkyhead thinkyhead changed the title [FR] [2.0.x] Ultimachine Archim (SAM3X8E) support [2.0.x] Ultimachine Archim (SAM3X8E) work-in-progress Dec 17, 2017
@marcio-ao
Copy link
Contributor

Just to chime in on this thread, we are working on a printer release using the Archim 2. So we would be willing to provide assistance. This thread hasn't been updated since December, so curious as to what the status currently is.

@teemuatlut
Copy link
Member

I'm using the board on a CoreXY build.
The drivers seem to work without a problem and all the TMC related commands are alright. The DUE core seems to work fine as well.
The problems I have with the printer are not related to the motherboard.

There hasn't been updates because everything should be alright.

@marcio-ao
Copy link
Contributor

That's good to hear. Are there any timelines for an initial Marlin 2.0 release? What are the major issues holding it back? Is it still bleeding edge, or just slightly-give-you-a-bruise edge?

@teemuatlut
Copy link
Member

@thinkyhead can probably give you a better answer.

But what I know is that v1.1.9 should be the next release and is intended to be the last one in v1.1.x series. Supposedly there are some issues that Scott would like to fix first so it's possible that the plan will change. The bugfix-2.0.x branch should be on par with 1.1.x as far as AVR is concerned and I believe that is the primary goal. From there we can again focus on one branch only and better test the 32bit platforms. My hope actually is that the developers would already be running the v2 branch on their machines and I have not seen issues on my main machine which is running a standard ATMega.
I do not expect the 32bit HALs to have feature parity with AVR when v2 is released but if the main features work, and I believe they do, that should be a very good starting point for wider adoption.

@thinkyhead
Copy link
Member Author

The initial 2.0 release will be done when there's a critical mass of boards and features at least at beta status. Some features won't be available for some platforms until we have 32-bit support for their top-level APIs (e.g., Neopixel). Keep an eye on #7076 for which boards are beta and which are far from completion.

@marcio-ao
Copy link
Contributor

marcio-ao commented Apr 24, 2018

@thinkyhead : Should the Archim 2.0 be added to the list? This is the board I am working with for our printers.

@thinkyhead
Copy link
Member Author

If I didn't mention it elsewhere, the board is now on the list.

@jhitesma
Copy link
Contributor

jhitesma commented May 3, 2018

Might want to update the list to clarify Archim vs. Archim 2.0 support. I know there's been a lot of work on archim 2.0 but I haven't seen anything on the original Archim yet.

1.0 is almost the same but instead of tmc2130 drivers it has drv8825's and last time I tried to get mine going ran into an issue with setting current (though it looks like Marlin2.0 may have changed that enough since I last checked that it will no longer be a roadblock...previously there was only a way to set a single x/y current not separate x/y as archim needed)

Hopefully next week I'll have some time to see if I can make progress on my 1.0 board again.

@thinkyhead
Copy link
Member Author

@jhitesma — Well, do keep us posted on things that need to be fixed. We'd like to get as many common boards supported as possible.

@Allted
Copy link
Contributor

Allted commented Nov 12, 2018

I think this is ready to go #12404

I tried and tested everything I could think of. Usb works now, LCD works, step rates and driver current all check out.

@tonokip, thanks for doing all the heavy lifting!

@aznoohwee
Copy link

I'm doing a little investigative work trying to get this board up and running on @Allted 's MPCNC branch. The build from the Arduino GUI is giving a different output then the platformio build see my branch.

My initial review of the code seems to indicate that the fastIO pin defs for this board differ from the UltiMachine add-on configuration available in the UI. It seems that the Arduino GUI uses the board configuration from UltiMachine and produces a working build whereas the fastIO defs used by platformIO generate an incorrect output.

@boelle boelle removed the T: HAL & APIs Topic related to the HAL and internal APIs. label Jul 21, 2019
@boelle boelle changed the title [2.0.x] Ultimachine Archim (SAM3X8E) work-in-progress [FR] [2.0.x] Ultimachine Archim (SAM3X8E) work-in-progress Aug 22, 2019
@smgoldade
Copy link

smgoldade commented Mar 4, 2020

So attempting to build this in a fresh VSCode copy of the main 2.0.x branch for Archim 1.0, I used ENV:DUE as labelled. However, it would appear there is no definition of ARDUINO_SAM_ARCHIM when building via platformIO and therefore some pins are left undefined for fastio.h and the build fails.

Is this intended behavior? Am I supposed to modify the environment to include this define? I notice a few other options that switch based on hardware variant archim in the makefile, and I'm wondering if those also need to be created.

It also appears there is a redefine for STEP_TIME_NUM and HAL_STEP_TIMER_ISR that happens for the board, and I assume this is intended.

@colinoflynn
Copy link

The platformIO pin problem is I think also the cause of bug #19215 and #18816, although the build now succeeds (but has silent errors, the best kind of errors). The variant.cpp file is needed at least to get pins working, but I assume there is more here...

@sjasonsmith
Copy link
Contributor

Based on recent changes from a couple users I believe Archim boards are currently working. I'm closing this feature request. Please reply with details if you feel this was incorrect.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T: Feature Request Features requested by users.
Projects
None yet
Development

No branches or pull requests