MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
15.95k stars 19.08k forks source link

The Marlin 2.0 32-bit thread #7076

Closed thinkyhead closed 4 years ago

thinkyhead commented 6 years ago
Board MCU State To-Do
8-Bit AVR boards, RAMPS, etc. Arduino AVR 💚good
Due, RAMPS FD (v2.A!), etc. SAM3X8E 💚good
Duet Wifi + X5 SAM3X8E ❓unknown E3D Toolchanger on hand
Duet 2 Maestro SAM3X8E ⚠️beta
Archim 1.0 SAM3X8E ❓unknown Only US$170!
Archim 2.0 SAM3X8E 💚beta needs confirmation
Grand Central ATSAMD51 🛑tbd (RAMPS_FD shield should work)
Re-ARM LPC1768 💚beta
MKS-SBASE LPC1768 💚beta
Smoothieboard LPC1769 💚beta
Azteeg X5 GT LPC1769 💚beta
Cohesion3D Remix LPC1769 💚beta
Selena Compact LPC1768 💚beta
Malyan M200 STM32F103C8 💚beta EMERGENCY_PARSER,NEOPIXEL_LED, etc.
Borg STM32F765ZGT6 ⚠️beta EMERGENCY_PARSER,NEOPIXEL_LED, etc.
Chitu3D V3.9 STM32F103ZET6 🛑alpha EMERGENCY_PARSER,NEOPIXEL_LED, LCD, SDCard, MAX6675, etc.
Teensy 3.5 MK64FX ⚠️beta (need shields)
Teensy 3.6 MK66FX ⚠️beta (need shields)
Espressif 32 Wifi ESP32 ⚠️beta (mostly working?)
STEVAL-3DP001V1 STM32F401VE 🛑alpha (need boards)

This thread is for discussion of 32-bit issues needing work and coordination of the 2.0 release.

teemuatlut commented 6 years ago

Good to hear.

bruce356 commented 6 years ago

Hi, I have dual X carriage printers with RADDS / Due + RADDS LCD Display with SD card. What LCD option do I select in Marlin2 Thanks - bruce

klcjr89 commented 6 years ago

Is Marlin 2.0 compatible or intended to be compatible with the Azteeg x5 mini? (LPC1769) https://www.matterhackers.com/store/printer-accessories/azteeg-x5-mini-32bit-all-in-one-controller-v1.1

Roxy-3D commented 6 years ago

Is Marlin 2.0 compatible or intended to be compatible with the Azteeq x5 mini? (LPC1769)

Right now, the bulk of the 32-bit activity is on the Panucatt Re-ARM board. That uses a LPC-1768 which is very similar to the LPC-1769. The way the code is being done, the current work should move over to that board with a minimum of effort. If pins are assigned differently, they would just get moved around in a mapping table. And the LPC-1769 is faster so some timer speeds would shift.

Incidentally, Panucatt supplied us with enough Re-ARM boards to get critical mass on the development side. It kind of feels like they want the X5 (and the X5 mini) to support Marlin so that will probably happen as soon as the Re-ARM board is solid. And it might even be possible to make the required changes without connecting an X5 up to a printer. But that remains to be seen...

mperdue commented 6 years ago

I'm very happy to hear this. The X5 is the board I want to use. I may have to drop Roy an email to get things rolling on purchasing a couple of them.

Roxy-3D commented 6 years ago

If you want to order a single X5 board and get it connected up to a printer... People in this thread should be able to tell you what to edit on the Re-ARM code to make it work with the X5: https://github.com/MarlinFirmware/Marlin/pull/7390

mperdue commented 6 years ago

Sounds like a good plan. I'll see about getting one on order shortly. I might have to grab some spare parts and put together a functional 3D printer setup for testing.

Roxy-3D commented 6 years ago

And probably... At least from my perspective... I think it is likely the Re-ARM HAL goes away and we have a single LPC-1768(9) HAL. Probably, the changes to the Re-ARM code is very minor to make it work on the X5 board. BUT... That remains to be seen.

p3p commented 6 years ago

In theory the firmware will run as is on an LPC1769 they are binary compatible, but the pins will more than likely be completely wrong.

I did take into account that there would be multiple boards running on the LPC17xx HAL (mostly), there are a few things that will need written for the X5 but are already split out in a way that should make it pretty simple. An internal pin-mapping file will be needed (pinmap_re_arm.h), and the Marlin pin-mapping (pins_RAMPS_RE_ARM.h), the linker script should be fine as should the startup assembly but the System init function will need to detect it's running on an LPC1769 and set the clock appropriately for full support.

thinkyhead commented 6 years ago

You said in the first post that the aim for 1.1.5 was to fix all obvious bugs.. well dual X carriage has been broken since 1.1.1

You can find more recent threads where it was debugged and eventually fixed. If it has become broken again (a regression) then please post a new issue detailing the exact problem(s) seen.

teemuatlut commented 6 years ago

You can find more recent threads where it was debugged and eventually fixed.

He's the one who fixed it =)

thinkyhead commented 6 years ago

I accidentally overwrote the bugfix-2.0.x branch a little while ago.

If the last commit was https://github.com/MarlinFirmware/Marlin/commit/c587d27 then no worries… everything is already restored.

If there's some other commit I missed, let me know.

mperdue commented 6 years ago

I should have the X5 GT next week. This will be interesting.

mperdue commented 6 years ago

I hadn't thought about this before now but will the Arduino IDE be enough to work with the X5 or do I need to get a different setup going?

Roxy-3D commented 6 years ago

I hadn't thought about this before now but will the Arduino IDE be enough to work with the X5 or do I need to get a different setup going?

You need to bring up the PlatformIO-IDE which runs inside of Atom. That will take you a few days. It is very slow to install. And it isn't intuitive to use. You will want to pull down the bugfix-2.0.0 branch and compile that for Re-Arm when you have PlatformIO-IDE installed.

Then you can start making the tweaks to shift from Re-ARM to the X5-GT.

bruce356 commented 6 years ago

@thinkyhead Does Marlin2 support the RADDS LCD Display with SD card controller, if so which option do I select as I do not see it listed, under "// CONTROLLER TYPE: Standard". I know I am not a developer here, but would like to test the new marlin with RADDS and X2 on my machine. I am assuming the X2 problem has been rectified. https://github.com/MarlinFirmware/Marlin/issues/7291

Bob-the-Kuhn commented 6 years ago

@mperdue - You'll need to create a new pins_YOUR_BOARD.h file. I expect that 99% of the pin mapping can be done there. The remainder will require changes to the file pinmap_re_arm.h in the directory Marlin\src\HAL\HAL_LPC1768\pinmap_re_arm.h. You'll also need to modify boards.h and pins.h to add your board to the list of acceptable boards.

The timers won't need to be touched.

Installing PlatformIO is tedious but not hard. In Atom go to the FILE -> SETTINGS -> Install and search for PlatformIO.. You'll want to install platformio-ide, build-platformio and platformio-ide-terminal. platformio-ide takes a while to install and many (4?) restarts of Atom. Wouldn't hurt to do a couple extra restarts of Atom after it stops requesting restarts.

Once the PlatformIO home/welcome page is displayed Click on the +New Project button. Select Other under Chose the directory and then enter the directory ABOVE Marlin. Click -- choose a board -- and scroll down to the Platform NXPLPC area and click on NXP mbed LPC1768. Click the Process button. Hopefully no errors will pop up. In the extreme lower left corner of the Atom window there should be something with PIO Build in it. Click on that. In the window that pops up enter Re-ARM in the search window. Click on PIO Build (Re-ARM). That'll open up a window where it will show the compiler output.
If you have some compiler errors the window will stay open. Make your corrections and then, to re-run the compiler, click the lightning bolt button on the upper right of the window. Once it says SUCCESS the executable will be the file firmware.bin in the directory .pioenvs\Re-ARM. Copy that to an SD card and insert in into the SD card reader on the motherboard. After cycling power (reset won't do it) the new code will be loaded and run.

Tannoo commented 6 years ago

Reset does work for me.

mperdue commented 6 years ago

Unfortunately, when I hit Process I get Uncaught ReferenceError: assignHooks is not defined

It's the story of my life...

mperdue commented 6 years ago

Oh, and the steps are a bit different on a Mac but you certainly got me pointed in the right direction.

p3p commented 6 years ago

Once the PlatformIO home/welcome page is displayed Click on the +New Project button. Select Other under Chose the directory and then enter the directory ABOVE Marlin. Click -- choose a board -- and scroll down to the Platform NXPLPC area and click on NXP mbed LPC1768. Click the Process button. Hopefully no errors will pop up.

That seems an odd way of opening the project, it should just require clicking Open Project then selecting the directory with platformio.ini in.

Bob-the-Kuhn commented 6 years ago

Sometimes uninstalling then reinstalling platformIO fixes that, sometimes it doesn't.

Did the project folder/directory open? If not got to File -> Add Project Folder and open it.

Try clicking on the PIO Build and see if you can search for the Re-ARM board. If you find it then you probably do a build.

On the left side of the PlatformIO home/welcome screen is a Boards button. Click on that and then search for 1768. Click on the NXP mbed LPC1768 entry. That may also get things linked up.

@Roxy - I can't find the thread that details all our trials & tribulations with platformIO. Can you point us to it?

Roxy edit >>>---> I think this is the start of where I started using PlatformIO and of course.... I had a ton of questions: https://github.com/MarlinFirmware/Marlin/pull/7028#issuecomment-315617978

mperdue commented 6 years ago

I found that just opening the project as suggested by @p3p worked OK and I was able to build it. Now I just need to figure out where the .bin file gets put on the Mac...

Roxy edit >>>---> On Windows, it ends up off the main directory of the code:
../whatever/.pioenvs/Re-ARM If you can find anything similar that probably will be it... Alternatively... search from the main directory downward for any .bin or .elf file. That is probably where it will be hiding. One thought is Apple stuff is really Unix. So if .pioenvs is where it is stored, the . makes it a hidden directory. It might be hiding on you.

Bob-the-Kuhn commented 6 years ago

@bruce356 - while Marlin 2.0 doesn't have the RADDS display in it you might be able to find one that works. Any controller that uses LCD_PINS_D7 is a candidate.

I'm pretty sure that eventually it'll be supported but that could be a long way down the road.

The MK4duo fork does support it. They have an online configuration tool that lists it as one of the LCD display options.

mperdue commented 6 years ago

I'm thinking that PlatformIO hasn't received a lot of awards for being intuitive...

Anyway, I think I have managed to get it to build with Re-Arm so I guess that's a step in the right direction. Maybe I'll have it figured out by the time the board gets here.

Roxy-3D commented 6 years ago

I'm thinking that PlatformIO hasn't received a lot of awards for being intuitive...

Once you learn how to open a branch and build it.... The rest of PlatformIO can be ignored. And supposedly, if you ignore the PlatformIO-IDE and just use the PlatformIO makefile stuff... It is perfectly normal.

bruce356 commented 6 years ago

@Bob-the-Kuhn, thanks for the reply, I tried MK4duo some 6 moths ago and with dual-X carriage it just did not work for me, at that time no one was particularly interested in trying to make X2 work and italian translate was not all that good either.

The configuration tool (similar to Repetier) was at the time helpful but not as clear to me as Repetier config tool to configure for X2. Perhaps its time to revisit MK4duo. Regards - bruce

mperdue commented 6 years ago

FWIW, my X5 GT has a shipping tracking number now so I should be seeing something soon. I guess I need to put together a testbed. :-)

victorpv commented 6 years ago

I've been since yesterday thru the pain of setting up platformio, and I'm getting an error afterI solve another. Now it's complaining on this:

Marlin\src/HAL/HAL_LPC1768/pinmapping.h:29:12: error: missing binary operator
before token "("

Has anyone seen this error before? I get a few more after that, but I think all of them are caused by that failure. This is the line that fails btw:

#if ENABLED(IS_REARM)

I'm definitely not enjoying platformio and about to try compiling it with Eclipse. Btw this is what I did successfully so far: I installed VSCode, then installed Platformio as an Extension to it. Downloaded the latest 2.0 branch. Save it all to a folder I called Re-arm. Opened it with VSCode, then set the Re-Arm version as default in platformio.ini (env_default = Re-ARM) Changed the board in configuration.h to (line 121):

define MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB

And hit ctrl+alt+b to try to build. During the process I had to download multiple frameworks and what not, some more than once because platformio failed to install them and then started downloading them again, and eventually was happy to start compiling, but spews the error above.

Roxy-3D commented 6 years ago

I'm definitely not enjoying platformio and about to try compiling it with Eclipse.

Supposedly PlatformIO is good unless you try to use the IDE version of it. Should we give just the vanilla PlatformIO with the makefile's a try?

p3p commented 6 years ago

@victorpv Sorry you're having issues, I haven't used the VSCode IDE with PlatformIO I only test Re-ARM PlatformIO builds with Atom, make sure your testing with the latest bugfix-2.0.x though as there is no "stable" version of 2.0.x atm and the first thing I did after thinkyhead merged 2.0.x was fix compilation errors.

klcjr89 commented 6 years ago

I'm going to be buying the LPC1769 based Azteeg x5 mini soon.

I use a mac, so what all would I need as far as a programmer to help contribute to the 32 bit development? I have alot of experience writing iOS software; not much with low level ARM stuff. Willing to help and learn though! :)

Do I even need a programmer if it simply writes the firmware to the microSD card to insert into the Azteeg?

Roxy-3D commented 6 years ago

I believe an SD-Card is sufficient. But that is just a guess based on how the other LPC-1768 based boards work.

klcjr89 commented 6 years ago

I'm hoping I won't need to use a virtualbox to run the development software. I am switching from belts to leadscrews so I'm going to need 32 bits and there's no better time than the present.

mperdue commented 6 years ago

@klcjr89 I'm waiting on the delivery of an Azteeg X5 GT and I also use a Mac. I suspect we'll be chatting from time to time.

Tannoo commented 6 years ago

Try this for the toolchain: http://docs.platformio.org/en/latest/installation.html

klcjr89 commented 6 years ago

@mperdue did you not get the X5 mini? Any reason why not if so if I may ask? :)

mperdue commented 6 years ago

I went with the GT because he has an experimental board that adds additional motor drivers.

AmiSMB commented 6 years ago

I have read this thread and quite excited as I have had my Re-Arm for ages but not used it and I now am building a P3Steel V4 and want to use the Re-Arm on this. I have installed platformio IDE in Atom and have built the project fine with the help of the great documentation you have put on here. Thanks for all of your hard efforts on this and I hope that I may be able to contribute soon.

victorpv commented 6 years ago

@p3p I'll give it a shot in Atom, but I though platformio IDE uses the platformio core to build no matter if you use one editor or the other, but who knows. I will also definitely try to create an Eclipse project and compile with Eclipse first. If that works, then I can just ignore platformio.

Roxy-3D commented 6 years ago

but I though platformio IDE uses the platformio core to build no matter if you use one editor or the other, but who knows.

I've been compiling using PlatformIO-IDE. But I have not edited anything inside of PlatformIO (or Atom). I've just been running my text editor on the side and when I say to build, it figures out which files changed and how to handle it....

victorpv commented 6 years ago

The only thing I actually edited was the board selected in configuration.h, and the default env in platformio.ini (otherwise it would try to start building for a mega2560) :( I downloaded the latest version of the 2.0 32bit branch right before trying to compile it. I may just remove it all and start from scratch again. I got a few errors when platformio was trying to download gcc, perhaps something else failed...

Roxy-3D commented 6 years ago

I may just remove it all and start from scratch again. I got a few errors when platformio was trying to download gcc, perhaps something else failed...

I have had to re-install PlatformIO-IDE twice. I maybe mistaken, but it seems like sometimes it gets sick when an auto-magic update doesn't proceed smoothly. One time Jason quit working after the update. I don't remember what the other part was that got sick a different time.

If there is a way to turn off updates in PlatformIO-IDE, I haven't found it. But once I have a working installation of it, I would prefer not to get any of those updates forced on me. They seem to do more harm than good.

p3p commented 6 years ago

@victorpv are you sure it was the bugfix-2.0.x branch? The compile issue you posted was fixed soon after 2.0.x was created.

Tannoo commented 6 years ago

In setting window, click the Core tab, then remove the check for Automatically Update.

This applies to Atom updates.

I haven't had any issues with updates. It is annoying, though, to have to restart Atom after each one.

victorpv commented 6 years ago

I'm pretty sure it was this one (only a version from Saturday): https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.0.x

That's the one right? But I'll download it again later just in case when I can retry. I remember I checked to make sure that was the branch with the latest commits (compared to the 32bit bugfix and bugfix-new branches)

Tannoo commented 6 years ago

I'm pretty sure it was this one (only a version from Saturday): https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.0.x

That's the branch I'm using.

Tannoo commented 6 years ago

@Roxy-3D, have the UBL storage slots reduced to 8 instead of 10 across the board, or just for the re-arm?

Roxy-3D commented 6 years ago

In setting window, click the Core tab, then remove the check for Automatically Update. This applies to Atom updates.

Thanks! I've got the automatic updates turned off now. Hopefully it quits screwing itself up now.

p3p commented 6 years ago

Re-ARM is artificially limited for no real reason other than I matched (I thought) the EEPROM size for the Persistent Store implementation, in theory you could set it to the filesize limit of the SDCard Filesystem, .. may take a while to save with 4GB of (emulated)EEPROM (how many slots is that ;) ), I didn't look into where else the value was used so I used a safe default.

/src/HAL/HAL_LPC1768/arduino.h #define E2END 4096 //EEPROM end address