My Stoopid Stuff
  • Home
  • Projects
  • Blog
  • Lec'tronics
  • Links
  • CNC
  • Quick Recipes
  • 3D Printer Tips
  • Voron 2.4

Problems with Atom + PlatformIO, switching to VSCode

5/24/2019

0 Comments

 
I wanted to update Marlin so I would add a 3D Touch probe to my Delta printer, but was having nothing but problems with Atom + Platform IO.  I uninstalled, reinstalled Atom and Python, cleared the files in the /Users/Username/ and /Users/Username/AppData/Local directories for Atom and Platform IO, but had no luck.  Then I read that platform IO recommends VSCode.  I also read somewhere that VSCode does not have the CLANG requirement which is cool since I was never able to get that to work anyway.

So I went and downloaded VSCode and had some issues, but was able to get it working.  I did not keep good notes on what I did, but some things that helped were:

Installed VSCode
Installed Python 2 and 3
Installed Git

Installed PlatformIO IDE and Autobuild using the instructions here.

I also found that I had some additional problems with the path, some of these were automatically added, but below is what is in my $PATH (I have other stuff but these are what are probably relevant to getting this working):

C:\Users\USERNAME\AppData\Local\Programs\Python\Python37-32\
C:\Users\USERNAME\AppData\Local\Programs\Python\Python37-32\Scripts\
C:\Users\USERNAME\AppData\Local\Programs\Microsoft VS Code\bin
C:\Users\USERNAME\.platformio\python27
C:\Users\USERNAME\.platformio\python27\Scripts

It may also be necessary to disable the antivirus when installing platformIO IDE.  Otherwise it may not be able to download the necessary components.


When running a test to compile Marlin I also had to click the "bell" at the bottom right and agree to allow VSCode to do something it needed to do (summarizing).  I can't recall where I found this mentioned, but it was not something I found.
Picture
Finally, like Atom, I needed to RUN VSCODE AS ADMINISTRATOR.

The platformio.ini file also needs to be updated if using a different board (like the Re-Arm).  That is the same as in a prior post here.  To test however, which is a good idea to make sure vscode will compile at all, no changes should be made to configuration.h, configuration_adv.h or platformio.ini, it should just compile out of the box.

To update platformio.ini for a Re-ARM, in a nutshell, this needs to be done:

change the following in platformio.ini:

env_default = LPC1768

and then add this in the section under "[env:LPC1768]" (does not matter where):

upload_port = /Volumes/REARM


Then the board and other stuff that is relevant needs to be updated in configuration.h (not covering that here since it would take WAAAY too long.


Something else that may help (and I don't recall where I read this), but I moved the Marlin directory to a shorter path (ex E:\firmware\Marlin-bugfix-2.0.x).

Compiling with VSCode is similar to Atom.  It should be possible to do using the "Autobuild" extension by clikcing the "AB Button" and then clicking the "B", however it errors out for me, seems that something is still looking at /buildroot/share/atom?  I'm still working on this, and will update when it is figured out.
Picture
Autobuild fails for me however:
Picture
However, I was able to compile using the "check" at the bottom left though:
Picture
So at least it is compiling without errors now, but I need to get the 3D Touch probe working with the Re-ARM.  I've not tested the firmware.bin that was created but noticed it is a bit smaller (176KB) than my older firmware (200KB)That will be in another post however.  Update 6/12/2019, the firmware.bin works fine, just copied the firmware.bin from the \.pioenvs\LPC1768 (which is under the Marlin directory), onto the SD card, dropped that in the Re-ARM and it boots up no problem.

It's been helpful for me to add a version to the splash screen so I can confirm what config version I am running, something like this under configuration.h (I will probably also add the marlin build version to the splash screen in the future):

#define CONFIGURATION_H_VERSION 20190612-005

#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
#define SHOW_BOOTSCREEN
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE2 "v20190612-5" // will be shown during bootup in line 2

I will make another post when I get the 3D touch working.  I have the config which seems to be compiling OK, but am waiting for a part, and then I need to try and get autobuild working.  Update 6/12/2019 - the Z-probe is working, but needed it's own 5v regulator.
0 Comments



Leave a Reply.

    Picture

    Stoopid Me

    Welcome to my Stoopid corner of teh Internet.  It's mostly gonna be 3D printing stuff, but I also post some recipes, projects, and the occasional rant here as well.  More Stoopid stuff is updated regularly.

    I recently joined the Amazon Associate program, so some of the links on this site are Amazon affiliate links. This means that, at zero cost to you, I will earn an affiliate commission if you click through the link and finalize a purchase.  This will help to support this site, and pay for more Stoopid Stuff.

    Archives

    March 2023
    February 2023
    January 2023
    November 2022
    October 2022
    September 2022
    August 2022
    July 2022
    April 2022
    February 2022
    January 2022
    December 2021
    November 2021
    October 2021
    September 2021
    August 2021
    July 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2020
    March 2020
    February 2020
    January 2020
    December 2019
    November 2019
    October 2019
    September 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    November 2017
    September 2017
    August 2017
    June 2017
    December 2016
    October 2016
    September 2016
    July 2016
    March 2016
    February 2016
    September 2015
    August 2015
    June 2015
    May 2015
    April 2015
    March 2015
    February 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    July 2014
    June 2014
    May 2014
    April 2014
    March 2014
    February 2014
    November 2013
    August 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    January 2013
    December 2012
    November 2012
    October 2012
    September 2012
    August 2012

    Categories

    All

    RSS Feed

      Contact Form (Name is optional)

    Submit
Powered by Create your own unique website with customizable templates.