Platformio instead of Arduino compiler; suitable editors

Code hacking talk

Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Sat-22-Aug

Building marlin for printrboards is about to get seriously easier, i have been working with one of the leads to integrate platformio into Marlin.

Platformio (platform.io) is a cool build system and library manager that manages the building of projects on embedded systems. It automatates installation and build of projects with various profiles, on Marlin we have defined support for 3 cpu's mega2560 for RAMPS boards, mega1280 and the AT90USB1286/1287 for printrboards etc.

Platformio also handles the listing of available connections and uploading of the hex file, via a suitable programmer.

The big plus for printrboard users is that platform uses proper linking rather than the take all source, compile it, and push it into the output. The net result is 10-15% better use of memory as many unnesscary functions wont get linked.

The next step is to break Marlin down into smaller units and build the configuratiin independant secions as a common libray. Which will further improve the link size.

Current printrbit sourced code, is built with an old copy of the aurduino framework, the platformio setup uses a version based on 1.6.x arduino framework, which the current arduino system uses.

Platform is also completly cross platform, in that works on windows, linux and mac, you can even install it on a raspberry pi and cross compile Marlin on there.
  • 1

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Platformio instead of Arduino compiler; suitable editors

Sponsor

Sponsor
 

Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Tue-08-Aug

Mooselake wrote:Have you looked at Jay's firmware update guide in the Wiki?

Kirk


Yes, that is typical of the bewildering array of options, the part about the boot jumpers is fine, but the rest is just a load of bewildering nonsense guarenteed to drive any new user to drink. It not Jays fault, its because there about 10 differnt ways of doing the same job, in fact he has done an incredible job getting all that down, but its just too complicated because it is a mess. its is differnt for each platform, each varient uses a different version of the ardunio framework. There are 3 differnt sources of Marlin mentioned on that one page alone, which are all at different revision levels. Some with custom hacks bolted onto them.

Plstformio is one single method of configuring code from the main marlin repository (original) which is upto date, with all the latest fixes and the method of peforming the tasks is simple and uniform across all platforms, windows, linux and mac.
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Platformio instead of Arduino compiler; suitable editors

Postby KD6HQ » 2015-Aug-Wed-13-Aug

thawkins wrote:
It should be noted that the marlin main repos as described in the last message on that thread have moved on somewhat

The main repo has now been dedicated to releases and stable versions, all development has been moved to a seperat dev repo. We are in the process of removing all dev branches.

The lastest stable version is 1.0.3, with 1.0.5 immenant.

One major project underway at the moment is a complete rewrite of G28+G29, the current implementations hae become unweildy and fragile.

My jonbot finaly came online tonight, and is running a version of 1.0.5 to check out some new stuff.


Unless I've missed something, this is a command line compiler :) - that is fine but I was wondering what you use as an editor?
I've tired note pad and word pad but they do not work very well. With limitations of page width it makes it a little hard to read.
I thought about using Arduino, but it has it's own requirements.

I noticed that you mention version 1.0.3 and 1.0.5. I understand that you are testing 1.0.5 but I can't seem to find 1.0.3. Perhaps I'm not looking at the correct web page : https://github.com/MarlinFirmware/Marlin

thanks
  • 0

Printrbot Simple Makers Kit (1405) modified.
Core XYZ

It's all in the details!
KD6HQ
Layer 300 of 1234
 
Posts: 329
Joined: 2014-Jun-Mon-12-Jun
Reputation: 5

Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Wed-14-Aug

In this thread, viewtopic.php?f=20&t=10144, thawkins mentions some editors that are available which are specifically designed for working with source code: "You dont need the Arduino IDE installed, platformio allows you to use Visual Studio, Eclipse, or dedicated ide's like cLion to maage your code." Visual Studio comes from Microsoft; Eclipse is easy to find, and both are free. I know they both work on Windows; I don't know about other platforms.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Platformio instead of Arduino compiler; suitable editors

Postby frankv » 2015-Aug-Wed-15-Aug

KD6HQ wrote:I've tired note pad and word pad but they do not work very well. With limitations of page width it makes it a little hard to read.
I thought about using Arduino, but it has it's own requirements.


Look at Notepad++ https://notepad-plus-plus.org/ -- I've used this for many years. It includes tabbed editing, syntax highlighting for a number of languages and a bunch of other useful stuff.
  • 0

frankv
First blob a success!
 
Posts: 518
Joined: 2015-Jan-Thu-12-Jan
Reputation: 17

Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Wed-21-Aug

RetireeJay wrote:In this thread, viewtopic.php?f=20&t=10144, thawkins mentions some editors that are available which are specifically designed for working with source code: "You dont need the Arduino IDE installed, platformio allows you to use Visual Studio, Eclipse, or dedicated ide's like cLion to maage your code." Visual Studio comes from Microsoft; Eclipse is easy to find, and both are free. I know they both work on Windows; I don't know about other platforms.


That is correct, with platformio, just change to your project directory and type.

platformio init --ide [idename]

And it will create projectfiles for your specific ide. The list available is quite long and is growing.

http://docs.platformio.org/en/latest/ide.html

I will get some notes out this weekend.
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Platformio instead of Arduino compiler; suitable editors

Postby cacb » 2015-Aug-Thu-10-Aug

Mooselake wrote:I'd second notepad++ for a lightweight editor. While real programers use emacs, I'm a vi fan, but that's pretty hardcore. Visual Studio has a nice C++ editor, but it hauls along a full IDE.

Notepad++ has configuration ("UserDefinedLanguageFiles") files for most any language you can think of (probably even lisp), and if one got missed you can always write your own config. C++ should (been a long time since I installed it...) just be there.

Kirk


I recommend Notepad++ for many things, I have used it for years, but not really for programming. In 3d printing you can use Notepad++ as an external editor to OpenSCAD, it works fine. For an excellent C++ IDE, I recommend Code::Blocks. I use it on Windows, Linux and Raspberry Pi. Code::Blocks is used also for embedded development, perhaps it can be supported by platformio.
  • 0

Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 403
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 16

Platformio instead of Arduino compiler

Postby RetireeJay » 2015-Aug-Sat-13-Aug

I created this thread for Platformio. I moved relevant posts from viewtopic.php?f=21&t=9929 to this thread.

See also viewtopic.php?f=20&t=10144 where thawkins discusses improvements on the way in Marlin.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Sat-13-Aug

So, thawkins, what do I need to download in order to work with platformio?

I'm thinking of trying to do a "virgin" installation on a laptop that just got upgraded to Windows 10 today. Unlike my desktop, the laptop has no Marlin, no Arduino, no Teensy. It does have Eclipse, but that's configured to work with Java (and I have no idea if I need to do a second installation of Eclipse, or whether this one can be configured to work with Arduino code). It also has Repetier and has been used to demonstrate my printer.

As far as I understand it, there are "library" components scattered among the directories for Marlin, Arduino, and Teensy. So do I need to Install Arduino and Teensy as well as Marlin in order to make platformio work? Or does platformio somehow magically find all the missing components from the Web?
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby KD6HQ » 2015-Aug-Sat-15-Aug

I decided this just might confuse the process.....so I deleted it. Don, kd6hq
  • 0

Last edited by KD6HQ on 2015-Aug-Sun-15-Aug, edited 1 time in total.
Printrbot Simple Makers Kit (1405) modified.
Core XYZ

It's all in the details!
KD6HQ
Layer 300 of 1234
 
Posts: 329
Joined: 2014-Jun-Mon-12-Jun
Reputation: 5

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Sat-17-Aug

Is this the version of Eclipse you downloaded?
Eclipse for C download button.PNG
  • 0

You do not have the required permissions to view the files attached to this post.
Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby KD6HQ » 2015-Aug-Sat-18-Aug

Yes, to the best of my belief.
  • 0

Last edited by KD6HQ on 2015-Aug-Sun-15-Aug, edited 1 time in total.
Printrbot Simple Makers Kit (1405) modified.
Core XYZ

It's all in the details!
KD6HQ
Layer 300 of 1234
 
Posts: 329
Joined: 2014-Jun-Mon-12-Jun
Reputation: 5

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Sat-19-Aug

RetireeJay wrote:So, thawkins, what do I need to download in order to work with platformio?

I'm thinking of trying to do a "virgin" installation on a laptop that just got upgraded to Windows 10 today. Unlike my desktop, the laptop has no Marlin, no Arduino, no Teensy. It does have Eclipse, but that's configured to work with Java (and I have no idea if I need to do a second installation of Eclipse, or whether this one can be configured to work with Arduino code). It also has Repetier and has been used to demonstrate my printer.

As far as I understand it, there are "library" components scattered among the directories for Marlin, Arduino, and Teensy. So do I need to Install Arduino and Teensy as well as Marlin in order to make platformio work? Or does platformio somehow magically find all the missing components from the Web?


On windows you need to download and install python support first, as platformio is written in python. Its a painless process as there is a single free .msi file that does it all for you. Linux and mac osx users dont need that step as python is normaly already insalled . EDIT - Be sure to install Python 2.7, as PlatformIO is not compatible with Python 3.4 - RJ
See:

http://docs.platformio.org/en/latest/installation.html EDIT - for Windows, they give you Python script file that will install PlatformIO. I copied the file from the browser window into a Notepad file and then saved it with their suggested name of get-platformio.py. I then opened a Command Prompt window with Administrative privileges (in Windows 10, this is under "All Apps - Windows System"; right-click when starting to get Administrative privileges). I navigated to the directory where the get-platformio.py file was stored and ran it as directed by the installation page linked above. - RJ

You will also need "git" which is a tool for checking out code from github.com, again another single download and install.

Once that is done, you can "clone" the MarlinFirmware/MarlinDev version of Marlin to your machine, change to the PlatformIOAddons folder and issue

"platformio run -e printrboard", it will download all the required compilers and libraries and install them and compile and produce a .hex file.

To upload the hex file, set your upload jumper and use.

"platformio run -e printrboard --target upload"

To create a project file for your ide (for eclipse for exampe)

"platformio init --ide eclipse"

The only additional library needed when compiling for a graphic display, is the U8Glib library, use platformios' built in package manager to locate and install that library.
  • 1

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby KD6HQ » 2015-Aug-Sun-12-Aug

thawkins wrote:
See:

http://docs.platformio.org/en/latest/installation.html

You will also need "git" which is a tool for checking out code from github.com, again another single download and install.

Once that is done, you can "clone" the MarlinFirmware/MarlinDev version of Marlin to your machine, change to the PlatformIOAddons folder and issue

"platformio run -e printrboard", it will download all the required compilers and libraries and install them and compile and produce a .hex file.

To upload the hex file, set your upload jumper and use.

"platformio run -e printrboard --target upload"

To create a project file for your ide (for eclipse for exampe)

"platformio init --ide eclipse"

The only additional library needed when compiling for a graphic display, is the U8Glib library, use platformios' built in package manager to locate and install that library.



I decided to go back thru the instructions because of the "PlatformIOAddons" folder mentioned. I cannot find it on my system so would you mind saying where it should be incase I just missed it? Or is this an indication that I missed a command somewhere?

The "git" which you are talking about is that "git-platformio.py" that is executed in python get-platformio.py command? I could not find a simple "git" script on GitHub?

thanks
  • 0

Printrbot Simple Makers Kit (1405) modified.
Core XYZ

It's all in the details!
KD6HQ
Layer 300 of 1234
 
Posts: 329
Joined: 2014-Jun-Mon-12-Jun
Reputation: 5

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Sun-13-Aug

thawkins wrote:You will also need "git" which is a tool for checking out code from github.com, again another single download and install.

Once that is done, you can "clone" the MarlinFirmware/MarlinDev version of Marlin to your machine, change to the PlatformIOAddons folder and issue

"platformio run -e printrboard", it will download all the required compilers and libraries and install them and compile and produce a .hex file.


OK, I found "git" on github.com, and I think I understand how to install it.
When I "clone" a version of Marlin software, I understand that it creates a local "repository" equal to the (current) version of Marlin that I selected. But now I have several questions:

(1) Is this clone going to get updated automatically if the GitHub version gets changed, or will the clone stay static on my copy of the repository (I hope)?

(2) When I make changes to my local copy of the source code, I hope that these will NOT be pushed back upstream to the GitHub repository; in other words, once I download the repository, it's mine to work on by myself.

(3) How do I use Git to manage my files? In other words, if I want to make a change to Configuration.h, do I "sign it out" using Git and then "sign it back in" somehow? I didn't see documentation about this on GitHub.org. But from Wikipedia, I understand that Git has metadata about every file, and it can enable you to backtrack to any earlier version. Is there a tutorial somewhere about using Git?

(4) By "change to the PlatformIOAddons folder" do you mean change the working directory in the CMD window? How will PlatformIO know where to find the Marlin source code (and the Git metadata if needed)?

(5) Did you leave out the step of editing the source code between cloning Marlin and running PlatformIO?

(6) I take it that PlatformIO, when told to compile for the Printrboard, knows where on the Web to find the necessary library files that otherwise would be part of downloading the Arduino IDE and the Teensy add-ons. Is this true?

Sorry for all these newbie questions. The last time I seriously worked with command-line computer interfaces was probably around 1990, when Windows 3.1 came out.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Sun-15-Aug

Answers inline

RetireeJay wrote:
thawkins wrote:You will also need "git" which is a tool for checking out code from github.com, again another single download and install.

Once that is done, you can "clone" the MarlinFirmware/MarlinDev version of Marlin to your machine, change to the PlatformIOAddons folder and issue

"platformio run -e printrboard", it will download all the required compilers and libraries and install them and compile and produce a .hex file.


OK, I found "git" on github.com, and I think I understand how to install it.
When I "clone" a version of Marlin software, I understand that it creates a local "repository" equal to the (current) version of Marlin that I selected. But now I have several questions:

(1) Is this clone going to get updated automatically if the GitHub version gets changed, or will the clone stay static on my copy of the repository (I hope)?

It stays static unless you execute a "pull"

(2) When I make changes to my local copy of the source code, I hope that these will NOT be pushed back upstream to the GitHub repository; in other words, once I download the repository, it's mine to work on by myself.

Nope, you have to be a contributor to be able to do that, even then the only way it can be done is to create a "fork" of the repo on github, clone that to your local machine, make your change, then "commit" and "push" back up to your fork, then create a "pull request" to the marlin project to have them pull your change in from your fork.

(3) How do I use Git to manage my files? In other words, if I want to make a change to Configuration.h, do I "sign it out" using Git and then "sign it back in" somehow? I didn't see documentation about this on GitHub.org. But from Wikipedia, I understand that Git has metadata about every file, and it can enable you to backtrack to any earlier version. Is there a tutorial somewhere about using Git?

Git is just being used as a means to make a snapshot of the github repo, aside from that just treat it as a folder with files in it.

(4) By "change to the PlatformIOAddons folder" do you mean change the working directory in the CMD window? How will PlatformIO know where to find the Marlin source code (and the Git metadata if needed)?

Inside the root of the repos you pull down from github, there is a Folder inside there called "PlatformIOAddons", you just change into that folder, the system knows where the Marlin source is relative to that folder, There is a file in there called platformio.ini which has all the configurations in it, you can see it sets the source path.

(5) Did you leave out the step of editing the source code between cloning Marlin and running PlatformIO?

Yes I kinda assumed that was a given, you have to edit Configuration.h to match your setup.


(6) I take it that PlatformIO, when told to compile for the Printrboard, knows where on the Web to find the necessary library files that otherwise would be part of downloading the Arduino IDE and the Teensy add-ons. Is this true?

Yes, it will pull it all down the first time and install it locally.

Sorry for all these newbie questions. The last time I seriously worked with command-line computer interfaces was probably around 1990, when Windows 3.1 came out.

I have not done this yet, as I don't use Eclipse, but I'm trying it out tomorrow, but once you create the ide project file and open it in eclipse it has targets for building the hex and uploading built in. Once that is done, and you have been through the cycle once on the cmdline, you wont need to access it like that again as you will be able to do it via the Eclipse IDE.


  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Sun-16-Aug

I, too, got stuck where KD6HQ did, not finding the PlatformIOAddons folder.
Just for reference, here is where PlatformIO ended up on my computer: C:\Python27\Lib\site-packages\platformio
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby KD6HQ » 2015-Aug-Sun-18-Aug

RJ

Where did you find "git" on github.com? When I did a search I found about 600+ and have no idea which one it is.
  • 0

Printrbot Simple Makers Kit (1405) modified.
Core XYZ

It's all in the details!
KD6HQ
Layer 300 of 1234
 
Posts: 329
Joined: 2014-Jun-Mon-12-Jun
Reputation: 5

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Sun-19-Aug

KD6HQ wrote:RJ

Where did you find "git" on github.com? When I did a search I found about 600+ and have no idea which one it is.


The front page, https://github.com/ has a big button to "set up Git."

But based on thawkins response
thawkins wrote:Git is just being used as a means to make a snapshot of the github repo, aside from that just treat it as a folder with files in it.


I wonder if it's really necessary to even use Git. You can find a Marlin build on Github at https://github.com/Printrbot/Marlin/releases and just "Download Zip" - which is a lot easier than installing Git and using it to clone the online version. However, I think that you would have to use a version of Marlin that's been set up for PlatformIO - and I doubt that many (if any) of the official Printrbot builds are set up that way.

The Marlin that thawkins referenced, https://github.com/MarlinFirmware/MarlinDev does have PlatformIOAddons included in the list of components. I used Download Zip instead of Git to retrieve it. We'll have to see later if that does the job.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Sun-21-Aug

RetireeJay wrote:I, too, got stuck where KD6HQ did, not finding the PlatformIOAddons folder.
Just for reference, here is where PlatformIO ended up on my computer: C:\Python27\Lib\site-packages\platformio


You need to be using the version of marlin at github.com/Marlinfirmware/Marlindev which is the latest version with baked in platformio support.

Alternativly you can just copy the 3 files from that one into a folder called PlatformIOAddons on your own copy.
  • 1

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby KD6HQ » 2015-Aug-Mon-17-Aug

1. Are the files at "github.com/Marlinfirmware/Marlindev" released files?

I ask because I set up a repository then did the desktop clone command.
Switched to platformioAddons and ran platformio run -e printrboard and received
a Error 2 message.

2. What should the relationship be between Eclipse and the Repository be? Should they both be in the same directory or can they be separate?
  • 0

You do not have the required permissions to view the files attached to this post.
Printrbot Simple Makers Kit (1405) modified.
Core XYZ

It's all in the details!
KD6HQ
Layer 300 of 1234
 
Posts: 329
Joined: 2014-Jun-Mon-12-Jun
Reputation: 5

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Mon-18-Aug

KD6HQ wrote:1. Are the files at "github.com/Marlinfirmware/Marlindev" released files?

I ask because I set up a repository then did the desktop clone command.
Switched to platformioAddons and ran platformio run -e printrboard and received
a Error 2 message.

2. What should the relationship be between Eclipse and the Repository be? Should they both be in the same directory or can they be separate?


They are still being worked on, the platformio stuff is new.

try changing your PlatformIOAddons/platformio.ini file for the attached one.
  • 0

You do not have the required permissions to view the files attached to this post.
Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby KD6HQ » 2015-Aug-Mon-20-Aug

Thank you that did help. It compiles with several warnings (yellow) text, but at least there are no error messages. Time for more reading.
  • 0

Printrbot Simple Makers Kit (1405) modified.
Core XYZ

It's all in the details!
KD6HQ
Layer 300 of 1234
 
Posts: 329
Joined: 2014-Jun-Mon-12-Jun
Reputation: 5

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Mon-23-Aug

KD6HQ wrote:Thank you that did help. It compiles with several warnings (yellow) text, but at least there are no error messages. Time for more reading.


I would not worry about the warnings, they also happen on the arduino IDE too, you just don't get to see them.

you can tell the linking stage is different as you don't get all the GUFF about the debug symbol format being wrong.
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Tue-07-Aug

A Warning can be for something as simple as "you declared this variable, but you never used it." These can be very helpful for code developers ("Oh, I forgot..."). But Marlin is configurable for a galaxy of different boards and printers so it's not surprising that some snippets of code might be floating around that are not at all harmful but not relevant to your particular build.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Tue-14-Aug

OK, I did a bit more work today, with some interesting findings:

1) It is absolutely NOT necessary to use Git to download the files from GitHub. Downloading the Zip file works just fine. That is how I downloaded Marlinfirmware/Marlindev.

2) The correct version of PlatformIO.ini is the one that thawkins shared above (shows as 10 August on my screen). I got the same error that KD6HQ did when I tried to use the one from GitHub.

3) When I ran PlatformIO run -e printrboard the first time, it noticed that I was missing components from "teensy" so it asked if I wanted to install them. I answered yes, and it took about 10 minutes to accomplish that task. However, that was a one-time exercise; subsequent attempts to compile did not need to retrieve "teensy."

4) The compilation was apparently a success when in the directory Marlinfirmware/Marlindev. However, I have no idea where it put the hex file! It looks like it was named "printrboard.hex" instead of "Marlin.hex" - but no matter.

5) Then I copied the PlatformIOAddons directory into an un-modified copy of the Marlin Unified source code (which is basically what I am running on my printer, with a few small tweaks). However, when I ran "PlatformIO run -e printrboard" there, I got errors and it did not finish successfully.
PlatformIO result with Directory Structure 1.PNG


In fact, I then noticed that maybe I had copied the Addons folder into the wrong place, one level too far down in the tree.
MarlinDirectoryStructure1.PNG


So I moved it back up to be equivalent to the position in "Marlinfirmware/Marlindev" - but in that position it generated even more errors faster!
MarlinDirectoryStructure2.PNG


I do like the idea of working this way, but I have no idea how to fix the problems. (I'd really like to be able to stick with the "Unified" firmware, not getting messed up with probing and all that stuff.)

By the way, I've installed Notepad Plus Plus and I really like it. When you use Eclipse, you are entering a high-powered system that keeps track of file locations and names with internal metadata, so if you ever move anything or change a file name, Eclipse gets broken (unless you do it from within Eclipse). But with Notepad++, you are simply navigating in an ordinary file system. One thing I really like about Notepad++ is that you can search for a particular string wherever it might appear in the current directory or subdirectory. This is fantastic for tracking down references in the huge array of files that comprise Marlin. As far as I know, Arduino doesn't have that capability, and I haven't found it in Eclipse either!
  • 0

You do not have the required permissions to view the files attached to this post.
Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Wed-15-Aug

Still struggling here...
I installed PlatformIO on my Win-7 desktop.

I downloaded the Marlinfirmware/Marlindev version, and replaced the "PlatformIO.ini" file with the one supplied by thawkins. This version of Marlin does compile successfully with PlatformIO.

So then I tried PlatformIO out on another build: the Marlin Rev F firmware. Again, I got errors when trying to compile with PlatformIO. But it compiled successfully with the Arduino IDE.

So then I tried out compiling Marlinfirmware/Marlindev with the Arduino IDE. It compiled successfully, but only when I told it that the target board was an AT MEGA 2560 or AT MEGA 2180, not the teensylu/Printrboard. I noticed that the Configuration.h file was set up for RAMPS, so I tried to change it to Printrboard, but I could not find a declaration for the motherboard that would make Arduino happy with the Printrboard selection of target board. OTOH, PlatformIO accepted my change of motherboard and several other tweaks in Configuration.h (like not reversing the Y axis, and enabling bed heat).

So I'm stuck between the two compilers: Arduino IDE will compile the version of Marlin that I've used before (Unified) and PlatformIO will compile the Marlinfirmware/Marlindev version. But neither compiler will compile the other version. :( And I'm afraid it might take me a lot of effort to find every single parameter in the Marlinfirmware/Marlindev version that needs to be adjusted to make it work just like the modified Unified version I run now.

EDIT: WooHoo. I finally got both PlatformIO AND Arduino to compile the same source code of Marlinfirmware/Marlindev, with the Printrboard selected as the target board, and with several other minor tweaks in Configuration.h. Here is the comparison: PlatformIO generated 52986 bytes of code; Arduino generated 57066 bytes, so PlatformIO saved 4080 bytes, or 7% of the Arduino size.

Here's what the Printrboard declaration needs to look like:
Code: Select all
#ifndef MOTHERBOARD
//  #define MOTHERBOARD BOARD_RAMPS_13_EFB
  #define MOTHERBOARD BOARD_PRINTRBOARD    //   81   // Printrboard (AT90USB1286)
#endif


BTW, I am LOVING Notepad++! :D :geek:

I'd still like to convince PlatformIO to work with my older versions though...
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Wed-17-Aug

Still trying to get PlatformIO to work on older code... this time on my old reliable Unified. Just to give PlatformIO every chance, I copied the ArduinoAddons folder from Marlinfirmware/Marlindev into the Unified Marlin folder. But PlatformIO gives me this error, followed by several other errors:

Code: Select all
#error Unknown MOTHERBOARD value in configuration.h.


But here is the code in configuration.h:
Code: Select all
#ifndef MOTHERBOARD
#define MOTHERBOARD 81
#endif


And here is the code in pins.h which looks for the Motherboard definition 81:
Code: Select all
#if MOTHERBOARD == 8 || MOTHERBOARD == 81
#define KNOWN_BOARD 1
#define AT90USB 1286  // Disable MarlinSerial etc.


And here is the code in pins.h which seems to be causing the error (verbatim quote of the error thrown by PlatformIO)
Code: Select all
#ifndef KNOWN_BOARD
#error Unknown MOTHERBOARD value in configuration.h
#endif


If I understand the test in pins.h, it says if the value of MOTHERBOARD is either 8 or 81, then define KNOWN_BOARD to have a value of 1
Then the later test says if KNOWN_BOARD is not defined then create the error. So what's wrong? It compiles with Arduino.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby KD6HQ » 2015-Aug-Wed-19-Aug

RetireeJay wrote:

Code: Select all
#ifndef MOTHERBOARD
//  #define MOTHERBOARD BOARD_RAMPS_13_EFB
  #define MOTHERBOARD BOARD_PRINTRBOARD    //   81   // Printrboard (AT90USB1286)
#endif


RJ

What board do you have selected in Arduino board pull down menu?
Teensy++2.0 (AT90USB1286) is not listed in mine.
  • 0

Printrbot Simple Makers Kit (1405) modified.
Core XYZ

It's all in the details!
KD6HQ
Layer 300 of 1234
 
Posts: 329
Joined: 2014-Jun-Mon-12-Jun
Reputation: 5

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Wed-20-Aug

KD6HQ wrote:What board do you have selected in Arduino board pull down menu?


[usbtinyisp]Teensylu/Printrboard
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby KD6HQ » 2015-Aug-Wed-21-Aug

Interesting - it's not listed on mine, did you have to use the board manager to download it?
  • 0

Printrbot Simple Makers Kit (1405) modified.
Core XYZ

It's all in the details!
KD6HQ
Layer 300 of 1234
 
Posts: 329
Joined: 2014-Jun-Mon-12-Jun
Reputation: 5

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Thu-07-Aug

RetireeJay wrote:Still trying to get PlatformIO to work on older code... this time on my old reliable Unified. Just to give PlatformIO every chance, I copied the ArduinoAddons folder from Marlinfirmware/Marlindev into the Unified Marlin folder. But PlatformIO gives me this error, followed by several other errors:

Code: Select all
#error Unknown MOTHERBOARD value in configuration.h.


But here is the code in configuration.h:
Code: Select all
#ifndef MOTHERBOARD
#define MOTHERBOARD 81
#endif


And here is the code in pins.h which looks for the Motherboard definition 81:
Code: Select all
#if MOTHERBOARD == 8 || MOTHERBOARD == 81
#define KNOWN_BOARD 1
#define AT90USB 1286  // Disable MarlinSerial etc.


And here is the code in pins.h which seems to be causing the error (verbatim quote of the error thrown by PlatformIO)
Code: Select all
#ifndef KNOWN_BOARD
#error Unknown MOTHERBOARD value in configuration.h
#endif


If I understand the test in pins.h, it says if the value of MOTHERBOARD is either 8 or 81, then define KNOWN_BOARD to have a value of 1
Then the later test says if KNOWN_BOARD is not defined then create the error. So what's wrong? It compiles with Arduino.


Platformio extensions have only been tested on modern Marlin, the versions you guys are trying to use contain fosilised code from 2 years ago. The config file has changed significantly since that time. You are better starting with a clean copy of Marlindev and using the -e printrboard target.

Trying to merge ancient and modern Marlin is not viable. New configure.h and the old versions are quite different.

Note that the version you folks are trying to use have known significant faults in it. The autoleveling is one.
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby Mooselake » 2015-Aug-Thu-12-Aug

thawkins wrote:Note that the version you folks are trying to use have known significant faults in it. The autoleveling is one.

Can't resist this one - probing is best left to <ducks> aliens.

Seriously, autoleveling is a kludge (the idea, not the code) that allows you to skip the important step of making sure your bed is the same distance from the extruder head all over it's surface. I know we're becoming a small voice in a hurricane saying this, but it's really an aid to less precise and cheaper (by eliminating an adjustment mechanism) manufacturing and not and advancement in printing technology. A flawed aid at that, look at the number of problems with the probes and their wiring.

This is not to denigrate the effort that's been put into developing the autoleveling code and making it work properly, the developers deserve a round or two of applause for their efforts for a non-trivial project.

Kirk
  • 0

Modified KickStarter Classic Plus 7/2012
KS Thingybot Delta Pro 10/31/16
User avatar
Mooselake
My next printer is...
 
Posts: 3509
Joined: 2011-Dec-Tue-23-Dec
Location: Moose Swamp, Upper Michigan, USA
Reputation: 170

Re: Platformio instead of Arduino compiler; suitable editors

Postby cacb » 2015-Aug-Thu-12-Aug

Mooselake wrote:Seriously, autoleveling is a kludge (the idea, not the code) that allows you to skip the important step of making sure your bed is the same distance from the extruder head all over it's surface.


You have to look at the whole picture. If you remove the Z probe you have to have a way of manually adjusting the bed. On some printers, mine included (simple metal), that option does not exist. I have actually tried adjusting it manually anyway, but it is a major fiddle without real benefits observed. And on my printer the Z probe works just fine every time I print.
  • 0

Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 403
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 16

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Thu-17-Aug

thawkins wrote:To upload the hex file, set your upload jumper and use.

"platformio run -e printrboard --target upload"


How will PlatformIO know which port to use? Don't we have to tell it somehow, either in the .ini file or in the command line?
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Fri-06-Aug

RetireeJay wrote:
thawkins wrote:To upload the hex file, set your upload jumper and use.

"platformio run -e printrboard --target upload"


How will PlatformIO know which port to use? Don't we have to tell it somehow, either in the .ini file or in the command line?


Try

platformio serialports list

It knows about the usb signatures of all the known boards, so it scans for them .
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby KD6HQ » 2015-Aug-Fri-08-Aug

I've been primarily working with a RAMPS setup using platformio.

I've noticed that a lot of information scrolls by during the compile.
Is this information saved in a temporary file somewhere that I could go back and look at it?
  • 0

Printrbot Simple Makers Kit (1405) modified.
Core XYZ

It's all in the details!
KD6HQ
Layer 300 of 1234
 
Posts: 329
Joined: 2014-Jun-Mon-12-Jun
Reputation: 5

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Fri-11-Aug

KD6HQ wrote:I've been primarily working with a RAMPS setup using platformio.

I've noticed that a lot of information scrolls by during the compile.
Is this information saved in a temporary file somewhere that I could go back and look at it?


Just run

platformio run -e mega2560 >savefile.txt

It will store the output into a text file.

Its just warnings, the platformio compiler setup is a little more strict than the arduino compiler.
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Fri-11-Aug

My Printrboard is Rev D. But for the newer Printrbot owners, does PlatformIO know about the Rev F Printrboard? It uses some "pins" differently (and has digital trimpots).
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby KD6HQ » 2015-Aug-Fri-14-Aug

thawkins wrote:
platformio run -e mega2560 >savefile.txt


It is true that several were warnings, but that is not what I was interested in.
It looked like some of the information was duplicated in that some of the lines of text looked the same. Upon examination I see that in some cases there are very slight changes in the text.

Thanks for the tip on >savetest.txt I missed that one when I looked at the options list - I will go back and look at it again to see what else I missed.
  • 0

Printrbot Simple Makers Kit (1405) modified.
Core XYZ

It's all in the details!
KD6HQ
Layer 300 of 1234
 
Posts: 329
Joined: 2014-Jun-Mon-12-Jun
Reputation: 5

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Fri-17-Aug

KD6HQ wrote:
thawkins wrote:
platformio run -e mega2560 >savefile.txt


It is true that several were warnings, but that is not what I was interested in.
It looked like some of the information was duplicated in that some of the lines of text looked the same. Upon examination I see that in some cases there are very slight changes in the text.

Thanks for the tip on >savetest.txt I missed that one when I looked at the options list - I will go back and look at it again to see what else I missed.


The > command is not really anything to do with platformio, all OS's support redirecting console output to a file

Every command has 2 ouputs, stdout and stderr, the first is for normal text and the latter is for error message texts.

> x.txt - create file x.txt and put stdout txt into it.
2> x.txt - create file x.txt and only put stderr texts in it.
>> x.txt - append stdout text to file x.txt
2>> x.txt - append stderr text to file x.txt

I belive this works on mac, linux and windows.
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Fri-17-Aug

OK, I'm on my Win-7 desktop, connected by USB cable to my Printrbot Plus with a Rev D card.

Starting with MarlinFirmware/MarlinDev, I've gone through Configuration.h with a fine-tooth comb and made several changes that were needed for my particular setup. PlatformIO compiles the package with no errors.

But when I issue PlatformIO run -e printrboard -- target upload, the message in the command window says SUCCESS, but in fact the program does NOT get uploaded! A "Teensy" window pops up saying to press the programming button - which I had done beforehand, of course. The Teensy window doesn't seem to have any button for me to click to finish the process.
PlatformIO-TeensyWindow.PNG


Just for kicks, I used FLIP to upload a couple of different versions of hex files I had sitting around, and it did work correctly. I've got different text in the M115 messages, so that's how I know. But the M115 message stayed the same after trying to program from PlatformIO. Also, all the EEPROM values stayed unchanged (and I would have expected the new firmware to use EEPROM differently, and thus start out with "factory default" values.)

So... what gives?

(BTW, I'm not finding it "easier" to remember all the different command line options, compared to a GUI environment. I have to go back searching through this thread to find the command I need.)
  • 0

You do not have the required permissions to view the files attached to this post.
Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby KD6HQ » 2015-Aug-Fri-21-Aug

For what it's worth.... I used notepad to make up a list of commands, options and what they did. It's not that many but I don't have to look them up anymore......
  • 0

Printrbot Simple Makers Kit (1405) modified.
Core XYZ

It's all in the details!
KD6HQ
Layer 300 of 1234
 
Posts: 329
Joined: 2014-Jun-Mon-12-Jun
Reputation: 5

Re: Platformio instead of Arduino compiler; suitable editors

Postby KD6HQ » 2015-Aug-Fri-21-Aug

RetireeJay wrote:Just for kicks, I used FLIP to upload a couple of different versions of hex files I had sitting around, and it did work correctly. I've got different text in the M115 messages, so that's how I know. But the M115 message stayed the same after trying to program from PlatformIO. Also, all the EEPROM values stayed unchanged (and I would have expected the new firmware to use EEPROM differently, and thus start out with "factory default" values.)


Did you try setting the jumper before you started the upload..... not sure but it may be worth a try....just a thought as I have not done anything with mine yet... I also have a rev D board.....
  • 0

Printrbot Simple Makers Kit (1405) modified.
Core XYZ

It's all in the details!
KD6HQ
Layer 300 of 1234
 
Posts: 329
Joined: 2014-Jun-Mon-12-Jun
Reputation: 5

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Fri-21-Aug

Yeah, KD6HQ, that's the way to do it. And yes, of course I was in programming mode when I tried. I have even outfitted my Plus with a switch to make it easy for me to go back and forth between modes without having to upend the printer (the "reset" switch is accessible to my finger through the hole in the chassis for the SD card).

thawkins, do I dare try to use FLIP to upload "firmware.hex"? Is there any chance that doing so would mess up my bootloader? If it's safe to use FLIP, then at least I could check out the functioning of the code. The new Marlinfirmware/Marlindev hex file is about half the size of the Unified hex file!
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Fri-22-Aug

KD6HQ wrote:For what it's worth.... I used notepad to make up a list of commands, options and what they did. It's not that many but I don't have to look them up anymore......


platformio --help

platformio [command] --help

http://docs.platformio.org/en/latest/index.html
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Sat-20-Aug

Why can't I use PlatformIO to program my Rev D Printrboard? What's missing?

When I have my printer in normal "run" mode, there is a COM port that's shown in Device manager:
"USB Serial (Communication Class, Abstract Control Model) (COM30)" (I have no idea why it's COM30, but it's been that way since I first installed the Teensy serial driver.) Naturally, Repetier uses this port to communicate with the board.

But when I go into Program mode (jumper + reset switch), the above serial COM port goes away. In fact, I can't find ANY port in Device Manager, either COM port or USB port, that appears only when I'm connected in Program mode. PlatformIO serialports list doesn't show any likely candidate, just several COM ports that seem to be tied up with Bluetooth, and COM1 which is clearly NOT associated with the Printrboard.

Nevertheless, FLIP has no problem connecting to the Printrboard when it's in Programming mode. (And FLIP can't see the board when it's in Run mode). So the board is there, but how to connect to it??? Why does the Teensy window seem to indicate success when it did not succeed?
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Sun-10-Aug

RetireeJay wrote:Why can't I use PlatformIO to program my Rev D Printrboard? What's missing?

When I have my printer in normal "run" mode, there is a COM port that's shown in Device manager:
"USB Serial (Communication Class, Abstract Control Model) (COM30)" (I have no idea why it's COM30, but it's been that way since I first installed the Teensy serial driver.) Naturally, Repetier uses this port to communicate with the board.

But when I go into Program mode (jumper + reset switch), the above serial COM port goes away. In fact, I can't find ANY port in Device Manager, either COM port or USB port, that appears only when I'm connected in Program mode. PlatformIO serialports list doesn't show any likely candidate, just several COM ports that seem to be tied up with Bluetooth, and COM1 which is clearly NOT associated with the Printrboard.

Nevertheless, FLIP has no problem connecting to the Printrboard when it's in Programming mode. (And FLIP can't see the board when it's in Run mode). So the board is there, but how to connect to it??? Why does the Teensy window seem to indicate success when it did not succeed?


I have not used the teensy interface on windows, i will try and get it to work on linux first, and then try it out on windows when i manage to get my windows laptop fixed. Platformio just downloads and installs the latest toolset from teensy.

I have an old printrboard kicking around in my junk pile, i will get a psu hooked up to it and a thermistor, and see if i can get it to talk to me.

I have been mainly using with RAMPS.
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Sun-17-Aug

RetireeJay wrote:FLIP has no problem connecting to the Printrboard when it's in Programming mode. (And FLIP can't see the board when it's in Run mode). So the board is there, but how to connect to it???


I just did a little more snooping, and found out that when the Printrboard is in Programming Mode, I have an entry in Device Manager:
Printrboard Device When In Programming Mode.PNG


So that may be a clue on how to set up the correct protocol for PlatformIO to talk to the board. I'm sure this is how FLIP talks to the board. But this does not show up in the PlatformIO Serialports command.

To recap from a previous post plus this one: In Run mode, the Printrboard shows up as a COM port, but in Programming mode, it shows up directly as an Atmel AT90USB128.

The PlatformIO documentation doesn't list Printrboard specifically, but it leads me into the Teensy documentation for Teensy++ 2.0. And following that thread, Teensy says that they have a bootloader called "HalfKay" - is that another name for the DFU bootloader? Or is DFU something different?

The PlatformIO documentation about upload protocols seems to be non-existent.
  • 0

You do not have the required permissions to view the files attached to this post.
Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Sun-20-Aug

RetireeJay wrote:
RetireeJay wrote:FLIP has no problem connecting to the Printrboard when it's in Programming mode. (And FLIP can't see the board when it's in Run mode). So the board is there, but how to connect to it???


I just did a little more snooping, and found out that when the Printrboard is in Programming Mode, I have an entry in Device Manager:
Printrboard Device When In Programming Mode.PNG


So that may be a clue on how to set up the correct protocol for PlatformIO to talk to the board. I'm sure this is how FLIP talks to the board. But this does not show up in the PlatformIO Serialports command.

To recap from a previous post plus this one: In Run mode, the Printrboard shows up as a COM port, but in Programming mode, it shows up directly as an Atmel AT90USB128.

The PlatformIO documentation doesn't list Printrboard specifically, but it leads me into the Teensy documentation for Teensy++ 2.0. And following that thread, Teensy says that they have a bootloader called "HalfKay" - is that another name for the DFU bootloader? Or is DFU something different?

The PlatformIO documentation about upload protocols seems to be non-existent.


There is a --upload-port [port name] you could try. Also -vvv will turn on detailed logging.

Ie

platformio run -e printrboard --target upload --upload-port com3 -vvv
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Mon-07-Aug

I tried
platformio run -e printrboard --target upload --upload-port AT90USB128 -vvv

But still no luck: the firmware didn't change.

So I used FLIP to upload "firmware.hex" to the Printrboard, giving it the latest version of Marlin.
I immediately discovered that the motor directions for X, Y, and Z all need to be inverted to be consistent with the previous software and existing wiring. E.g.
Code: Select all
#define INVERT_X_DIR true
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true


Re-compiled and re-uploaded.

The heated bed and the Hot End temperature controls seem to work OK.

The Extruder direction is correct, and I can run a print!

By the way, there are 19 places where I either changed Configuration.ini or else I looked closely and decided that the existing code matched what I wanted (but others might want to make changes).

Code: Select all
/*  Modified by JCS 12 Aug 15. Line numbers are approximate, as
newly added lines may bump the original line numbers
  1) Define motherboard as Printrboard, not RAMPS. Line 89
  2) Define TEMP_SENSOR_BED as #1. Line 168
  3) Reduce TEMP_RESIDENCY_TIME time from 10 sec to 5 sec. Line 175
  4) EDIT:  X, Y, AND Z DIR all need to be reversed.  Line 388
  5) Change DEFAULT_AXIS_STEPS_PER_UNIT for Z from 4000 to 565 (Unique to RJ's board, using 4X microstepping). Line 588
  6) Change DEFAULT_AXIS_STEPS_PER_UNIT for E from 500 to 530.73. Line 588
  7) Change Extruder maximum feedrate to 31.4. Line 589
  8) Change DEFAULT_MAX_ACCELERATION for X and Y to 4000.  Line 590
  9) Change DEFAULT_RETRACT_ACCELERATION to 4000. Line 593
  10) Change DEFAULT_TRAVEL_ACCELERATION to 4000. Line 594
  11) Change STRING_CONFIG_H_AUTHOR to "JCS - Printrboard with Z mod". Line 67
  12) Note that I'm using a modified ThermistorTables.h with extended
      range for type 1 and type 5 thermistors.  In Configuration.h, Line 168
  13) Note that if a metal Hot End is in use, HEATER_0_MAXTEMP can be 325.  Line 196
  14) Changed DEFAULT_Kp, Ki, Kd to values for my Ubis with a fan blowing on it. Line 234 - 236
  15) Noted with approval that Z motor won't be turned off.  Line 384
  16) Noted with approval that Extruder direction is "geared" Line 402
  17) Noted with approval that X, Y, and Z home to Min.  Line 413
  18) Noted with approval that hard lmits to X, Y, Z are 200mm.  Line 427
  19) Noted with approval that auto bed leveling is not enabled.  Line 473
*/


I LOVE editing with Notepad plus plus. It's SO much better than the Arduino IDE!
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Aug-Mon-10-Aug

Well, make that 20 places in Configuration.h that need to be edited.

Apparently the Marlinfirmware/Marlindev program doesn't support EEPROM modification of the X, Y, and Z maximum dimensions (the M211 command introduced by Printrbot) so you have to hard-code the maximum dimensions into the source code. This is somewhere in the vicinity of line 428, depending on how many comment lines you added at the top of the file.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Mon-18-Aug

RetireeJay wrote:Well, make that 20 places in Configuration.h that need to be edited.

Apparently the Marlinfirmware/Marlindev program doesn't support EEPROM modification of the X, Y, and Z maximum dimensions (the M211 command introduced by Printrbot) so you have to hard-code the maximum dimensions into the source code. This is somewhere in the vicinity of line 428, depending on how many comment lines you added at the top of the file.


Yes, m211 was a printrbot extension, its not in mainstream. I keep meaning to submit a patch to add it. I belive m212 is also missing, at least that however has an alternative m code. Its changes like this that are causing the fragmentation of the Marlin landscape, and im hoping that now there is more active development going on, it will result in all the fragments being reconciled.

The version that the printrbot firmware is based on is very old and has a bunch of problems, particularly on autoleveleling, but it has other issues too.
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby PxT » 2015-Aug-Tue-15-Aug

thawkins wrote:Yes, m211 was a printrbot extension, its not in mainstream. I keep meaning to submit a patch to add it.


It was submitted as a PR but never completed: https://github.com/MarlinFirmware/Marlin/pull/406

It looks like M211 has subsequently been implemented as a different function: https://github.com/MarlinFirmware/Marlin/pull/1814
  • 0

User avatar
PxT
Print complete...
 
Posts: 1340
Joined: 2011-Dec-Mon-16-Dec
Location: Sacramento, CA
Reputation: 97

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Tue-00-Aug

PxT wrote:
thawkins wrote:Yes, m211 was a printrbot extension, its not in mainstream. I keep meaning to submit a patch to add it.


It was submitted as a PR but never completed: https://github.com/MarlinFirmware/Marlin/pull/406

It looks like M211 has subsequently been implemented as a different function: https://github.com/MarlinFirmware/Marlin/pull/1814


I will try and get that re-implemented on another M code, and get a current PR in, it would be nice to reconcile the printrbot and upstream Marlin again.

Note: I finally got my Jonbot up an running with the latest cutting edge 1.0.5 using platformio and RAMPS with a full graphics card, full sized sdcard.

  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby KD6HQ » 2015-Aug-Sat-02-Aug

I'm considering upgrading to Windows 10. As far as platformio goes any reason I should not?
  • 0

Printrbot Simple Makers Kit (1405) modified.
Core XYZ

It's all in the details!
KD6HQ
Layer 300 of 1234
 
Posts: 329
Joined: 2014-Jun-Mon-12-Jun
Reputation: 5

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Aug-Sat-06-Aug

KD6HQ wrote:I'm considering upgrading to Windows 10. As far as platformio goes any reason I should not?


It will be down to if the python install works, which it should, and if the teensyduino drivers will load, the rest has relativly low requirements from the os its running on.
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby Mooselake » 2015-Aug-Sat-09-Aug

KD6HQ wrote:I'm considering upgrading to Windows 10. As far as platformio goes any reason I should not?

I've done Arduino IDE builds under the Windows 10 preview on a laptop, and that machine was running the release version without any issues, as is the desktop I'm typing this on. The next to last preview build (10525) broke wireless Internet (but not LAN) connectivity on the laptop, so you probably want to avoid the recent Insider builds for that version. WD SmartWare has issues with network authentication under W10, but it's WD's bug and pretty obscure.

Other than the above normal every day stuff has been working fine. I doubt that platformio uses any obscure WinDoze features so it's likely you won't have any problems. W10 starts up and shuts down a lot quicker than W7 on my older hardware desktop (the laptop came with W8.1 and was pretty zippy to start with).

Going to W10 isn't a big risk (no risk other than time if you do a full image backup first), since you can uninstall it for the first 30 days or so. Just be careful if you talk to yourself, since Cortana might answer you. If she does you're not really going (any more) crazy.

Kirk
  • 0

Modified KickStarter Classic Plus 7/2012
KS Thingybot Delta Pro 10/31/16
User avatar
Mooselake
My next printer is...
 
Posts: 3509
Joined: 2011-Dec-Tue-23-Dec
Location: Moose Swamp, Upper Michigan, USA
Reputation: 170

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Sep-Sat-09-Sep

One more problem with the Marlinfirmware/Marlindev build (at least the one that I downloaded on 12 August): sometimes the thermal protection algorithm is too sensitive, and it kicks out an error when there really was no problem. This happens on startup, when the hot end is temperature is rising. Apparently my hot end doesn't heat up fast enough to meet their criterion.

When it kicks out, it's ugly: Repetier Host totally freezes, and the only way to recover is to both shut down Repetier Host (by force if necessary) and to totally reboot the Printrbot.

So I went into Configuration_Adv.h and tripled all the "windows" to relax the criteria.
Code: Select all
/**
 * Thermal Protection parameters
 */
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
  #define THERMAL_PROTECTION_PERIOD 120        // Seconds (originally 40)
  #define THERMAL_PROTECTION_HYSTERESIS 12     // Degrees Celsius (originally 4)

  /**
   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
   * but only if the current temperature is far enough below the target for a reliable test.
   */
  #define WATCH_TEMP_PERIOD 48                // Seconds (originally 16)
  #define WATCH_TEMP_INCREASE 12               // Degrees Celsius (originally 4)
#endif


So far, so good: one startup without failing.

By the way, @thawkins, is there any hope of PlatformIO getting comfortable with talking to a Printrboard through a Windows OS?
And should I try to post the above info about the temperature limits on Github to alert the developers? How would I do that?
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Sep-Sat-12-Sep

RetireeJay wrote:One more problem with the Marlinfirmware/Marlindev build (at least the one that I downloaded on 12 August): sometimes the thermal protection algorithm is too sensitive, and it kicks out an error when there really was no problem. This happens on startup, when the hot end is temperature is rising. Apparently my hot end doesn't heat up fast enough to meet their criterion.

When it kicks out, it's ugly: Repetier Host totally freezes, and the only way to recover is to both shut down Repetier Host (by force if necessary) and to totally reboot the Printrbot.

So I went into Configuration_Adv.h and tripled all the "windows" to relax the criteria.
Code: Select all
/**
 * Thermal Protection parameters
 */
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
  #define THERMAL_PROTECTION_PERIOD 120        // Seconds (originally 40)
  #define THERMAL_PROTECTION_HYSTERESIS 12     // Degrees Celsius (originally 4)

  /**
   * Whenever an M104 or M109 increases the target temperature the firmware will wait for the
   * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
   * but only if the current temperature is far enough below the target for a reliable test.
   */
  #define WATCH_TEMP_PERIOD 48                // Seconds (originally 16)
  #define WATCH_TEMP_INCREASE 12               // Degrees Celsius (originally 4)
#endif


So far, so good: one startup without failing.

By the way, @thawkins, is there any hope of PlatformIO getting comfortable with talking to a Printrboard through a Windows OS?
And should I try to post the above info about the temperature limits on Github to alert the developers? How would I do that?


Re windows, im still trying to get windows up to test this, but the hd on my only windows machine died.

Reporting an issue on github, go to the marlindev page, on the rhs of the page here is a colum of icons, one if them is the issues tab, you can post a ticket on there.
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Sep-Tue-10-Sep

Thanks, @thawkins. I did post about the thermal shutdown issue on Github, and someone explained that the parameters in the Configuration_Adv.h file set up a slope, in degrees per second (or seconds per degree). So when I tripled both numbers, I actually left the slope the same. Now I've increased the time window while leaving the delta-T the same and it fixed my problem. So it wasn't really a true "bug" in the firmware, just a problem with semi-opaque documentation that I couldn't interpret properly.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby mechanizedmedic » 2015-Sep-Wed-13-Sep

I'm having issues uploading using any of the platformio options above on Debian. Is there a way to make platformio use dfu-programmer instead of teensy?
  • 0

"Metal shavings are my glitter"
blog.mechanizedmedic.org
User avatar
mechanizedmedic
Waiting for printbed temp...
 
Posts: 145
Joined: 2014-Mar-Tue-16-Mar
Location: Tigard, Oregon USA
Reputation: 6

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Nov-Fri-22-Nov

@thawkins,
I downloaded, compiled, and installed the then current version of Marlin several months ago now, and it's been working fine for me. But just out of curiosity, are there mechanisms on Github for me to:
1) Check when a revised version has come out; and
2) More importantly - see what changed since the prior version (hopefully in language I can understand)?

-RJ
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Nov-Mon-18-Nov

Can anyone answer my question?

I assume, actually, that Github does have this functionality, but how do I use it?

I find Github to be EXTREMELY opaque. For example, I'm almost NEVER successful in Searching for something that I know is there. I have to use a link provided by someone else to find anything useful.

And yes, they do have a Help site, but it's also opaque. There are zillions of thing you can do with Git and I don't understand any of them. I've gone to the particular page of the Marlin software I'm using, but that page does not show me an easy-to-find history of what's been done to the program and why.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Nov-Mon-22-Nov

RetireeJay wrote:Can anyone answer my question?

I assume, actually, that Github does have this functionality, but how do I use it?

I find Github to be EXTREMELY opaque. For example, I'm almost NEVER successful in Searching for something that I know is there. I have to use a link provided by someone else to find anything useful.

And yes, they do have a Help site, but it's also opaque. There are zillions of thing you can do with Git and I don't understand any of them. I've gone to the particular page of the Marlin software I'm using, but that page does not show me an easy-to-find history of what's been done to the program and why.


On the home page of the marlin software github repo at the top is a thing that says something "3460 commits", if you clicl on that you will get the changelog of the repository. It will list all the changes that have been made. The commit log is very fine grained, but you can see what was changed, and often what issues where referenced (ie fixed). Git shows

Git is definatly a software developers tool, it can be a little opaque, but its increadibly powerfull.

Generaly when a release is made the repository is "tagged" with the release number, you can see a list of tags by poping down the "branches" dropdown which is below the commits link.

This is a kind of usefull guide.

http://akrabat.com/the-beginners-guide- ... b-project/
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Dec-Tue-11-Dec

thawkins wrote:On the home page of the marlin software github repo at the top is a thing that says something "3460 commits", if you clicl on that you will get the changelog of the repository. It will list all the changes that have been made. The commit log is very fine grained, but you can see what was changed, and often what issues where referenced (ie fixed)


When I look at the list of changes that have been made, what I see is mainly a catalog of "Merge Pull Request #xxx from user zzz" - and trying to dive into these only takes me to the actual C++ code, with what's been changed highlighted in color. I didn't see any explanations in plain English about what these changes are intended to accomplish. Were they bug fixes? New features? Applicable to Cartesian printers or Deltas? Relevant only to the use of LCD displays? etc. etc. In other words, if I have only a Cartesian printer (PB+) with one extruder, no LCD and I never use the SD card - how will I know when I should download a new version of the source code?

I did notice that there is a catalog of "Issues" - both Open ones and Closed ones. These are written in English. But you said that the commit log "often" says what issues were referenced. I can't see that. I can, however, by looking in the "Issues" tab see that some of the Closed "Issues" do have numerical references. Is this what you meant? For example, Issue "Marlin Main_cpp missing bracket" has #248 associated with it.

Are ALL changes to source code based on Issues, or are some changes just simply appearing, without documentation of their intent and applicability?
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Dec-Wed-02-Dec

RetireeJay wrote:
thawkins wrote:On the home page of the marlin software github repo at the top is a thing that says something "3460 commits", if you clicl on that you will get the changelog of the repository. It will list all the changes that have been made. The commit log is very fine grained, but you can see what was changed, and often what issues where referenced (ie fixed)


When I look at the list of changes that have been made, what I see is mainly a catalog of "Merge Pull Request #xxx from user zzz" - and trying to dive into these only takes me to the actual C++ code, with what's been changed highlighted in color. I didn't see any explanations in plain English about what these changes are intended to accomplish. Were they bug fixes? New features? Applicable to Cartesian printers or Deltas? Relevant only to the use of LCD displays? etc. etc. In other words, if I have only a Cartesian printer (PB+) with one extruder, no LCD and I never use the SD card - how will I know when I should download a new version of the source code?

I did notice that there is a catalog of "Issues" - both Open ones and Closed ones. These are written in English. But you said that the commit log "often" says what issues were referenced. I can't see that. I can, however, by looking in the "Issues" tab see that some of the Closed "Issues" do have numerical references. Is this what you meant? For example, Issue "Marlin Main_cpp missing bracket" has #248 associated with it.

Are ALL changes to source code based on Issues, or are some changes just simply appearing, without documentation of their intent and applicability?


No, not all changes are driven off issues, there are several sources of change

1. new features - put forward by developers, usually because they have an itch to scratch on their own printer. Things like the filament sensor etc, z sledges came in via this route.
2. Refactoring, a bunch of the devs decide something is getting too complex to maintain, so they will do some refactoring (rewriting) of the code to eliminate some restriction etc. There is a major refactoring going on right now on the MarlinDev Repo.

I guess you are looking for a "changelog" which is something I will raise with the devs.
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Dec-Wed-02-Dec

RetireeJay wrote:
thawkins wrote:On the home page of the marlin software github repo at the top is a thing that says something "3460 commits", if you clicl on that you will get the changelog of the repository. It will list all the changes that have been made. The commit log is very fine grained, but you can see what was changed, and often what issues where referenced (ie fixed)


When I look at the list of changes that have been made, what I see is mainly a catalog of "Merge Pull Request #xxx from user zzz" - and trying to dive into these only takes me to the actual C++ code, with what's been changed highlighted in color. I didn't see any explanations in plain English about what these changes are intended to accomplish. Were they bug fixes? New features? Applicable to Cartesian printers or Deltas? Relevant only to the use of LCD displays? etc. etc. In other words, if I have only a Cartesian printer (PB+) with one extruder, no LCD and I never use the SD card - how will I know when I should download a new version of the source code?

I did notice that there is a catalog of "Issues" - both Open ones and Closed ones. These are written in English. But you said that the commit log "often" says what issues were referenced. I can't see that. I can, however, by looking in the "Issues" tab see that some of the Closed "Issues" do have numerical references. Is this what you meant? For example, Issue "Marlin Main_cpp missing bracket" has #248 associated with it.

Are ALL changes to source code based on Issues, or are some changes just simply appearing, without documentation of their intent and applicability?


No, not all changes are driven off issues, there are several sources of change

1. new features - put forward by developers, usually because they have an itch to scratch on their own printer. Things like the filament sensor etc, z sledges came in via this route.
2. Refactoring, a bunch of the devs decide something is getting too complex to maintain, so they will do some refactoring (rewriting) of the code to eliminate some restriction etc. There is a major refactoring going on right now on the MarlinDev Repo.

I guess you are looking for a "changelog" which is something I will raise with the devs.

I have opened a request with them to add a changelog, we will see what comes up.

https://github.com/MarlinFirmware/MarlinDev/issues/295
  • 1

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Dec-Thu-19-Dec

  • 1

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Dec-Thu-19-Dec

  • 1

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Dec-Mon-17-Dec

@thawkins - help!

For some reason, using the recent mainstream Marlin, settings that I save in EEPROM are not being really saved. I didn't notice that earlier because when I built the version that I've been using for the last few months, I set all the factory defaults to good values. But now I'm doing some things that require changes and they are not "sticking." I can make a change, use M500 to supposedly save it to EEPROM, and then use M501 to check: the change is NOT being stored!

This is true both for the MarlinDev version you originally pointed me to, and also to the Marlin Release version in your last post in this thread.

Do you have any idea what I'm doing wrong?
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2015-Dec-Tue-03-Dec

RetireeJay wrote:@thawkins - help!

For some reason, using the recent mainstream Marlin, settings that I save in EEPROM are not being really saved. I didn't notice that earlier because when I built the version that I've been using for the last few months, I set all the factory defaults to good values. But now I'm doing some things that require changes and they are not "sticking." I can make a change, use M500 to supposedly save it to EEPROM, and then use M501 to check: the change is NOT being stored!

This is true both for the MarlinDev version you originally pointed me to, and also to the Marlin Release version in your last post in this thread.

Do you have any idea what I'm doing wrong?


I have not built a version for some months now, so im not sure what is happening in your case, bu tbe best thung to do is to submit an issue report on tne marlinfirmware/marlin issue tracker, if you dont get an answer in a few days i will see if i can pull focus to your issue.

I was planing to finish a rebuild over tbe xmas break, which includes rebuilding with latest marlin, but my better half has plans and i may not get the chance.
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2015-Dec-Tue-09-Dec

I think I found the problem, in Configuration.h. Apparently by default the EEPROM settings are not enabled.
Code: Select all
// EEPROM
// The microcontroller can store settings in the EEPROM, e.g. max velocity...
// M500 - stores parameters in EEPROM
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
// M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
//define this to enable EEPROM support
//#define EEPROM_SETTINGS


(I have a print going right now, but I'll post back if changing this does NOT solve the problem.)

EDIT: Yup, changing that last line to
Code: Select all
#define EEPROM_SETTINGS

fixed the problem. It seems like EEPROM is such a fundamental feature of Marlin, I can't understand why it's disabled by default in the source code. It's not a memory space problem, because I didn't have to disable anything else to enable EEPROM and put the program into the Printrboard.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2016-Jan-Mon-08-Jan

thawkins wrote:
KD6HQ wrote:1. Are the files at "github.com/Marlinfirmware/Marlindev" released files?

I ask because I set up a repository then did the desktop clone command.
Switched to platformioAddons and ran platformio run -e printrboard and received
a Error 2 message.

2. What should the relationship be between Eclipse and the Repository be? Should they both be in the same directory or can they be separate?


They are still being worked on, the platformio stuff is new.

try changing your PlatformIOAddons/platformio.ini file for the attached one.


@thawkins, are they ever going to get this fixed? I recently downloaded the source for Marlin from the main repository (not the "dev" one) and I still had to install your fix for PlatformIO.ini. What about the rest of the world that's not aware of this particular thread on this particular board?
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2016-Feb-Fri-10-Feb

While I'm waiting for delivery of a replacement (Rev F) board for my dead (Rev D) board, I've been playing around with the capabilities and limits of PlatformIO.

Contrary to previous posts, it IS possible to compile source code from Printrbot. The trick is to understand the way that PlatformIO defines the Motherboard. This is done inside PlatformIO.conf.

When you issue the command line platformio run -e printrboard you are actually providing the PlatformIO program with an "environment" parameter, namely "printrboard"

Inside the original PlatformIO.conf, you will find a block of code like this:
Code: Select all
[env:printrboard]
platform = teensy
framework = arduino
board = teensy20pp
#extra_script = ./generate_version_header_for_marlin
#build_flags = -D USE_AUTOMATIC_VERSIONING -I $BUILDSRC_DIR -D MOTHERBOARD=BOARD_PRINTRBOARD
build_flags = -I $BUILDSRC_DIR -D MOTHERBOARD=BOARD_PRINTRBOARD
# Bug in arduino framework does not allow boards running at 20Mhz
#board_f_cpu = 20000000L


So when PlatformIO starts to execute, it scans PlatformIO.conf until it finds the block of code whose "env" parameter matches the parameter that was given to it on the command line, in this case, "printrboard". It then uses parameters in that block to further define how to do the compilation (lines starting with # are comments).

Here's the important lesson I've learned: the simplest and best way to identify the motherboard is by number. Printrboards Rev A - E are given the number 81; Printrboards in the Rev F family are given the number 84. So what I've done is modified the PlatformIO.conf as follows:
Code: Select all
[env:printrboard]
platform = teensy
framework = arduino
board = teensy20pp
#extra_script = ./generate_version_header_for_marlin
#build_flags = -D USE_AUTOMATIC_VERSIONING -I $BUILDSRC_DIR -D MOTHERBOARD=81
build_flags = -I $BUILDSRC_DIR -D MOTHERBOARD=81
# Bug in arduino framework does not allow boards running at 20Mhz
#board_f_cpu = 20000000L

[env:printrboardRevF]
platform = teensy
framework = arduino
board = teensy20pp
#extra_script = ./generate_version_header_for_marlin
#build_flags = -D USE_AUTOMATIC_VERSIONING -I $BUILDSRC_DIR -D MOTHERBOARD=84
build_flags = -I $BUILDSRC_DIR -D MOTHERBOARD=84
# Bug in arduino framework does not allow boards running at 20Mhz
#board_f_cpu = 20000000L


I have a copy of my modified PlatformIO.conf inside the "PlatformIOAddons" directory, and I copy that directory into each different version of Marlin that I want to compile.
PlatformIODirectoryStructure.PNG

Now, I can call PlatformIO with the command line
platformio run -e printrboard to compile source code designed for a Rev D board, or
platformio run -e printrboardRevF to compile source code designed for a Rev F board.

This approach actually works for the "Unified" code as well as for more recent Printrbot releases, and also for the "Mainstream Marlin" releases.
  • 0

You do not have the required permissions to view the files attached to this post.
Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2016-Feb-Fri-19-Feb

The platformiO team have released their own IDE based on the excellent "atom" editor. It comes as a single download and install for most platforms with both the IDE and the platformiO runtimes as one integrated setup. Making it a true drop in replacement for the arduino IDE, whilst providing a vastly better user experience and capabilities set.

http://platformio.org/#!/platformio-ide
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby rdlaner » 2016-Feb-Sun-23-Feb

Hey everybody, this thread has been really helpful in getting platformio up and running for me. I just got marlin compiling without any errors using Sublime Text as my IDE. It actually went pretty smoothly.

Here's what I'm running:
Mac 10.11
Sublime Text 3
Printrboard Rev F
ATX power supply

The problem I am having is when I actually try to load the compiled hex file to the printrboard via platformio. Whenever I try to upload I get this far in the process, but can progress no further:

[Sun Feb 21 20:37:07 2016] Processing printrboard (platform: teensy, board: teensy20pp, framework: arduino, build_flags: -I $BUILDSRC_DIR -D MOTHERBOARD=BOARD_TEENSY2)
--------------------------------------------------------------------------------
"/Users/dustinlane/.platformio/packages/tool-teensy/teensy_loader_cli" -mmcu=at90usb1286 -w -s -v .pioenvs/printrboard/firmware.hex
Teensy Loader, Command Line, Version 2.0
Read ".pioenvs/printrboard/firmware.hex": 51904 bytes, 39.9% usage
Soft reboot is not implemented for OSX
Waiting for Teensy device...
(hint: press the reset button)

I've pressed the only button on the printrboard many times, but have never been able to progress any further than this. I tried following the instructions on how to load firmware to no avail. I did read that the rev F's boot loader jumper is the reverse of the older boards, so I did try setting the jumper, pressing the reset button, removing the jumper and then trying to upload the firmware (as well as the opposite), but to no avail.

Any thoughts or suggestions that may help me out?
Thanks!!
  • 0

rdlaner
Waiting to connect to printer...
 
Posts: 9
Joined: 2016-Feb-Sun-18-Feb
Reputation: 0

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2016-Feb-Mon-07-Feb

Well, whoever told you that the Rev F jumper is opposite of Rev D was wrong. They changed the jumper logic around Rev B, I think. Very, very few people have ever seen anything except Rev D and Rev F - and their logic for the bootloader jumper is the same.

Jumper off = run the firmware.
Jumper on at power-up = run the firmware (Power-up is not the same as "reset"!!!)
Jumper on + press of "reset" button = go into bootloader mode until either power-down or press of "reset" button while jumper is off

Now, as for loading the firmware into the board is concerned, I too found that PlatformIO did not work for me for that function. I'm on a Windows computer, so I use FLIP. I understand that there is some other way to do it using Mac computers. This is documented in the Printrbottalk Wiki (the red, beige and white button next to the "Search..." text box in the upper right of this screen).
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby rdlaner » 2016-Feb-Mon-18-Feb

Thanks for the response. So I was able to successfully load the firmware to the printrboard. I ended up using "dfu-programmer", which I suspect is what is used behind the Firmware Update App for Mac described in the wiki you pointed me to. It would be nice to have platformio's upload tool to actually work sometime, though.

I also found that I could only get Marlin 1.0.2+ to work on my printrboard. After loading the firmware I would connect with Pronterface and verify I could connect and send commands. Pronterface connected easily to a board programmed with Marlin 1.0.2+, but it would never connect to a board with 1.1RC3 or 1.1RCBugFix.

Have you been able to successfully program and use Marlin 1.1 with a printrboard?
  • 0

rdlaner
Waiting to connect to printer...
 
Posts: 9
Joined: 2016-Feb-Sun-18-Feb
Reputation: 0

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2016-Feb-Mon-19-Feb

When I migrated from a Rev D board to a Rev F board, I switched from using "Mainstream Marlin" to using Printrbot's version of Marlin specifically designed for the Rev F board - which means it includes commands for the digipots, for example. There are a couple of posts I made about this: viewtopic.php?f=21&t=10715 and viewtopic.php?f=22&t=10716

I'm not sure how well Mainstream Marlin supports the Rev F board; I didn't examine that question in detail. On my Rev D board, I could use Mainstream Marlin or the Printrbot "Unified" version, compiled with PlatformIO.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2016-Feb-Tue-07-Feb

RetireeJay wrote:When I migrated from a Rev D board to a Rev F board, I switched from using "Mainstream Marlin" to using Printrbot's version of Marlin specifically designed for the Rev F board - which means it includes commands for the digipots, for example. There are a couple of posts I made about this: viewtopic.php?f=21&t=10715 and viewtopic.php?f=22&t=10716

I'm not sure how well Mainstream Marlin supports the Rev F board; I didn't examine that question in detail. On my Rev D board, I could use Mainstream Marlin or the Printrbot "Unified" version, compiled with PlatformIO.


The mainstream should support digipots, it's an option on marlin compile. As far as I know structurally that may be the only change.
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2016-Feb-Tue-08-Feb

The Rev F board uses a different pin for the Y axis "endstop" (in addition to having the digipots). There are other pin changes too, involving the Expansion connectors. See the attachment.

I sure wish I could figure out how to track down some of those other pin assignments.
  • 0

You do not have the required permissions to view the files attached to this post.
Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby rdlaner » 2016-Feb-Wed-17-Feb

Thanks for the info, guys.

thawkins, you mentioned that mainstream Marlin should support digipots with a compile option. Could you specify which option? I'm currently compiling with platformio.

I've been able to successfully compile Marlin 1.1 with platformio and upload it via dfu-programmer. However, afterwards whenever I try to connect via Pronterface or Cura, I can never get it to connect. Do you suspect this is an issue with using platformio? I can try compiling with the Arduino IDE.
I also found this fork of Marlin that appears to have incorporated the Rev F specific changes to mainstream Marlin (I would post the url, but I'm too new of a user):
/StephS/Marlin at github
Again, I could compile and upload it fine, but still was unable to connect with either Pronteface or Cura. I'm curious if you guys have any better luck.
  • 0

rdlaner
Waiting to connect to printer...
 
Posts: 9
Joined: 2016-Feb-Sun-18-Feb
Reputation: 0

Re: Platformio instead of Arduino compiler; suitable editors

Postby thawkins » 2016-Feb-Wed-18-Feb

rdlaner wrote:Thanks for the info, guys.

thawkins, you mentioned that mainstream Marlin should support digipots with a compile option. Could you specify which option? I'm currently compiling with platformio.

I've been able to successfully compile Marlin 1.1 with platformio and upload it via dfu-programmer. However, afterwards whenever I try to connect via Pronterface or Cura, I can never get it to connect. Do you suspect this is an issue with using platformio? I can try compiling with the Arduino IDE.
I also found this fork of Marlin that appears to have incorporated the Rev F specific changes to mainstream Marlin (I would post the url, but I'm too new of a user):
/StephS/Marlin at github
Again, I could compile and upload it fine, but still was unable to connect with either Pronteface or Cura. I'm curious if you guys have any better luck.


RE connections, you have to compile with the teensy 2.0 board definitions set, otherwise it compiles the wrong usb support.

The processor on the printrboard had a built in usb interface where as most other solutions use an ftdi chip connected to the processor via the RD/TX lines.

Re digipots

You should enable ENABLE_DIGIPOTS_I2C in Configuration_adv.h

However I'm not sure if the I2c channel mapping is correct for the printrboard, I don't use printrboard anymore.
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2016-Feb-Wed-19-Feb

Go into your PlatformIOAddons directory and replace PlatformIO.ini with the file I've attached here. Then use this for your command line:
Code: Select all
platformio run -e printrboardRevF

I think this should work with almost any source code either from mainstream Marlin or from Printrbot's github collection.
  • 0

You do not have the required permissions to view the files attached to this post.
Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby rdlaner » 2016-Feb-Wed-19-Feb

thawkins wrote:
RE connections, you have to compile with the teensy 2.0 board definitions set, otherwise it compiles the wrong usb support.

The processor on the printrboard had a built in usb interface where as most other solutions use an ftdi chip connected to the processor via the RD/TX lines.


I thought I had made the necessary changes to compile with the teensy 2.0 board definitions. Here are the two changes I made to get it to compile, let me know if I am missing something. To clarify, these two updates were made on the the Marlin "RC" branch.

Configuration.h

// The following define selects which electronics board you have.
// Please choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_TEENSY2
#endif

fastio.h

#define AT90USBxx_TEENSYPP_ASSIGNMENTS // Use Teensy++ 2.0 assignments
#ifndef AT90USBxx_TEENSYPP_ASSIGNMENTS // Use traditional Marlin pin assignments
  • 0

rdlaner
Waiting to connect to printer...
 
Posts: 9
Joined: 2016-Feb-Sun-18-Feb
Reputation: 0

Re: Platformio instead of Arduino compiler; suitable editors

Postby rdlaner » 2016-Feb-Wed-19-Feb

RetireeJay wrote:Go into your PlatformIOAddons directory and replace PlatformIO.ini with the file I've attached here. Then use this for your command line:
Code: Select all
platformio run -e printrboardRevF

I think this should work with almost any source code either from mainstream Marlin or from Printrbot's github collection.


Thanks RetireeJay. I tried your .ini file, but I had to add "-D AT90USBxx_TEENSYPP_ASSIGNMENTS" to get it to compile. Either way, with that one change your .ini file is pretty much the same as mine:

[env:printrboard]
platform = teensy
framework = arduino
board = teensy20pp
build_flags = -I $BUILDSRC_DIR -D MOTHERBOARD=84 -D AT90USBxx_TEENSYPP_ASSIGNMENTS
# Bug in arduino framework does not allow boards running at 20Mhz
#board_f_cpu = 20000000L

I'm wondering if I am just missing a configuration change somewhere?
  • 0

rdlaner
Waiting to connect to printer...
 
Posts: 9
Joined: 2016-Feb-Sun-18-Feb
Reputation: 0

Re: Platformio instead of Arduino compiler; suitable editors

Postby rdlaner » 2016-Feb-Wed-19-Feb

Also, just a quick FYI. With my current .ini configuration I can compile, load and run any code from the Printrbot github just fine. I can even connect afterwards with Pronterface and it connects immediately. I'm currently running the RevF-Version-5. The problem only arises when I try to use any mainstream Marlin 1.1 code.
  • 0

rdlaner
Waiting to connect to printer...
 
Posts: 9
Joined: 2016-Feb-Sun-18-Feb
Reputation: 0

Re: Platformio instead of Arduino compiler; suitable editors

Postby rdlaner » 2016-Aug-Wed-23-Aug

Just wanted to check in again. I noticed that the latest release candidate of Marlin (RC7) has Platformio support removed. Has anyone else encountered this or have good workarounds?
  • 0

rdlaner
Waiting to connect to printer...
 
Posts: 9
Joined: 2016-Feb-Sun-18-Feb
Reputation: 0

Re: Platformio instead of Arduino compiler; suitable editors

Postby RetireeJay » 2016-Aug-Thu-07-Aug

I'm not certain of this, but I think it all has to do with the definition of the motherboard. I've compiled Printrbot versions and older versions of Marlin (e.g. "Unified") successfully for the Printrboard, and the key was to find a common way for both Marlin and PlatformIO to refer to the board - for example by number instead of name. IIRC, the Rev D was either 80 or 81, and Rev F is 84. So when mainstream Marlin "dropped support for PlatformIO" maybe that just means that they added a new motherboard that is unknown to PlatformIO. But I think if you compiled the latest version for the Printrboard you'd probably be OK. I haven't done it, so no guarantees. Give it a try and let us know. :)
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4798
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Platformio instead of Arduino compiler; suitable editors

Postby rdlaner » 2016-Aug-Thu-22-Aug

Ok, so here's what I found out. The current RC release (RC7), no longer has the PlatformioAddons directory and consequently on longer has a platformio.ini file. I did find, however, that the most current RCBugfix branch has added the platformio.ini file back to the repo.

So, once I had the .ini file back in, I was able to compile and build just fine as before. The nice thing is that the latest RC release has explicit support for the RevF board now:
#define BOARD_PRINTRBOARD_REVF 811 // Printrboard Revision F (AT90USB1286)

So instead of setting the MOTHERBOARD value to 84, it needs to be set to either BOARD_PRINTRBOARD_REVF or 811
  • 0

rdlaner
Waiting to connect to printer...
 
Posts: 9
Joined: 2016-Feb-Sun-18-Feb
Reputation: 0

Re: Platformio instead of Arduino compiler; suitable editors

Postby KD6HQ » 2016-Sep-Fri-11-Sep

Hello All

I've been gone for a little over a year and am just stating to feel a little comfortable again with my printer. I see that progress has been made in the area of compilation software in the form of a program called Atom. Although I'm just getting started with Atom, it appears to automate the build and upload functions of PlatformIO. More steep learning curves.

I still have the Printrbot makers kit and a RAMPS 1.4 / Arduino 2560 board based printer that has never been finished.

Have there been any major advances in board design and if so what are you using now?
  • 0

Printrbot Simple Makers Kit (1405) modified.
Core XYZ

It's all in the details!
KD6HQ
Layer 300 of 1234
 
Posts: 329
Joined: 2014-Jun-Mon-12-Jun
Reputation: 5

Re: Platformio instead of Arduino compiler; suitable editors

Postby KD6HQ » 2016-Nov-Sat-17-Nov

Anyone know how up upload the "U8glib" library to Atom?
I have not been able to figure out how to use the Library Manger to add it.
  • 0

Printrbot Simple Makers Kit (1405) modified.
Core XYZ

It's all in the details!
KD6HQ
Layer 300 of 1234
 
Posts: 329
Joined: 2014-Jun-Mon-12-Jun
Reputation: 5

Re: Platformio instead of Arduino compiler; suitable editors

Postby cline.matt1 » 2017-May-Fri-15-May

Hey guys,
I have been trying to get the latest Marlin 1.1 to compile so I can try to upload to my RevF5 board.
The problem I am running into is that it always throws an error about either customizedSerial or bluetoothSerial depending on if I enable bluetooth or not.
Do you guys have any suggestions?

I am using Atom and PlatformIO
I also get the same error if I try to compile the RevF5 source code from the printrbot branch with no changes at all.
  • 0

cline.matt1
Waiting to connect to printer...
 
Posts: 2
Joined: 2016-Jun-Sat-11-Jun
Reputation: 0

Re: Platformio instead of Arduino compiler; suitable editors

Postby cline.matt1 » 2017-May-Fri-21-May

Github figured out that adding in Marlinserial.h to serial.h made it compile. and and then I needed to change the board choice in PlatformIO to be 811 instead of 81 or 84 to get it to compile with the correct pin call outs
  • 0

cline.matt1
Waiting to connect to printer...
 
Posts: 2
Joined: 2016-Jun-Sat-11-Jun
Reputation: 0


Return to Hack talk

Who is online

Users browsing this forum: No registered users and 1 guest