Atom is no longer supported by PlatformIO. While it may partly work, you should switch to Visual Studio Code for future installs.
Before reading this article, you should have already read Installing Marlin with PlatformIO.
If you do not have it installed, you can follow guide at How to setup Mac for Python Step 2: Once you have it installed, you need to type in two commands in mac terminal and it will work. Below are the two commands and the confirmation on how it looks at command online. Brew tap caskroom/cask brew cask install atom. Then after moving Atom to the applications folder the symlinks were broken and the Install Shell Command option was not able to notice it. What I had to do was to remove the symlinks and then select the Install Shell Commands from the Atom menu. There was no need to restart the console as the atom command worked immediately after selecting the.
There are two ways of using PlatformIO with Atom.
That’s it! Now that you’ve flashed Marlin to your board, enjoy silky smooth printing!
Auto-build requires only two or three mouse clicks to build and upload Marlin. This method invokes PlatformIO directly, using Atom’s process-palette plugin and a custom script to choose the right settings according to your MOTHERBOARD setting.
A sample customization process is described below to demonstrate how this method can be used by Marlin / PlatformIO neophytes.
Install Atom
Download Atom and run the installer (Windows) or install (macOS and Linux).
Windows: Click File then click Settings
The Core Settings window comes up.
Clicking on + Install brings up the + Install Packages window.
Click ‘Install’ in the process-palette box
The Install icon’s background changes to indicate that it is working.
When finished this pops up:
Install the PlatformIO plugin
Repeat the previous step but type platformio into the search box, press ENTER on the keyboard and then click ‘Install’ in the platformio-ide box when it appears.
PlatformIO takes multiple minutes to install.
If asked to install a package click on YES/Install.
Eventually it asks to restart Atom. Click the Restart button
This section explains how to upload a minimally-configured Marlin to your board.
This will verify that the Build and Upload process works after you’ve completed the Setup described above.
This step is optional, but we recommend doing the minimal build because configuration errors can mask toolchain problems.
At this point you may already have the project editor running. If not, go ahead and launch Atom.
The “PlatformIO Home” page should appear. If not, click on the Home icon located in the top-left corner.
Click the “Open Project” button under “Quick Access.”
In the file dialog, navigate to the MarlinFirmware folder you created earlier, click it, and click the “Open” button.
Select the device in area A
Navigate to the MarlinFirmware folder using area B.
Click the MarlinFirmware folder.
This folder MUST contain the Marlin folder and the platformio.ini file.
Click the Open “MarlinFirmware” button.
This closes the Open Platformio Project window.
The project folder and its contents should appear in the Project Navigator on the left side.
The Auto Build option and PlatformIO tasks/build menu will allow you to select your build environment, and it will make the selected environment the default for building until the next program restart. But you can set your environment in platformio.ini for a faster build or to make command-line pio build easier.
Open the platformio.ini file.
Scroll down or use the Find command to locate the env_default setting.
Change the value to the appropriate env value for your board. (e.g., megaatmeg2560 or LPC1768).
All available build environment names are listed at the top of platformio.ini.
For a minimal build you just need to set the MOTHERBOARD value appropriate to your printer’s control board. Marlin defines all available board names in boards.h.
Open the boards.h file (located in the Marlin/src/core folder).
Scroll down or use the Find command to locate the entry for your board. (e.g., BOARD_AZTEEG_X5_GT)
Open your Configuration.h file (located in the Marlin folder).
Click on the “Auto Build” menu at the right end of the Atom menu bar to bring up the dialog.
You may be asked to grant VS permission to modify terminal.
A submenu will pop up. Click “PIO Build”.
You may be asked to grant VSCode permission to modify Terminal. Mailraider pro 3 6960.
If further info is needed a popup will appear listing the available options. Select the correct option and click “CONFIRM”.
This window may appear behind the current window.
The build window will open and Marlin will be compiled. This may take several minutes to complete.
This is the start of the build process:
This is the end of a successful build.
This is the end of an error build.
Do NOT proceed to the next step unless SUCCESS is seen near the bottom of the build window. If ERROR is seen then trouble shooting is required.
Repeat the steps in Build but, in step 2, click on “PIO Upload” instead of “PIO Build”
Do NOT proceed to the next step unless SUCCESS is seen near the bottom of the build window. If ERROR is seen then trouble shooting is required.
That’s it! You’ve successfully flashed Marlin to your board. Happy printing!
You should now be able to communicate with Marlin and send commands using your favorite host software such as Simplify3D, OctoPrint, Pronterface or Repetier Host.
For the first test build you should have used the default Configuration.h and Configuration_adv.h files. Now it’s time to test your own configurations.
If one exists for your board, we strongly suggest rebuilding your configs using one of the example configs located in the Marlin/src/config/examples folder as a starting-point. This is done by copying (replacing) the example file(s) into the upper folder that has Configuration.h and Configuration_adv.h in it.
You can use your favorite editor to modify the files.
See Auto Build Run Time Problems if any of the following happen:
The Auto Build menu items exactly duplicates their PlatformIO counterparts. See the PlatformIO documentation if you need further information.
PIO Upload (traceback) : This has no direct counterpart in PlatformIO. Details below.
PIO Build : Compiles and builds the project. An upload image will be created if there are no errors.
PIO Clean : Removes all files created by previous compilations and re-initializes the project state.
PIO Upload : Same as PIO Build but will attempt to upload the image if one was created. The upload will be done via the Upload port specified in the platformio.ini file.
Since the Upload Port is usually unspecified, depending on the board selected, PIO will either use the first serial port found or it will save the binary image file on the SD card in the board’s SD slot.
PIO Upload (traceback) : Same as PIO Upload but includes debug info within the image.
This option creates a special image useful when debugging certain types of firmware problems. It is only available on ARM based boards. Not all ARM CPUs/environments have implemented this.
PIO Upload using Programmer : Same as PIO Upload but will use the programmer specified in the platformio.ini file.
PIO Test : See PlatformIO documentation on how to use the Test feature
PIO Debug : See PlatformIO documentation on how to use the Debug feature
Best apple keyboard ever. PIO Remote : See PlatformIO documentation on how to use the Remote feature
SD cards over 32G in size must be partitioned so that the first partition is 32G or less. Marlin will only use the first partition.
The folders described below are hidden in the File Explorer / Finder unless you change your OS (Windows, macOS, Linux) settings to reveal them. They may be visible within your project editor (e.g., Atom, Visual Studio Code, etc.) depending on your workspace settings.
This folder, located in the top level project folder (i.e., MarlinFirmware), contains the image created by the build and upload functions.
This folder contains all the libraries downloaded as part of the compile/build process. If it is not present it will be recreated according to platformio.ini, using the specified (or latest) library versions.
It should be deleted every time Marlin is downloaded from github.
It must be deleted when switching between Marlin 1.1 and 2.0.
The pins_YOUR_BOARD.h file is the only other file besides Configuration.h and Configuration_adv.h that is expected to be modified by the user, but only in rare cases.
The pins files only need to be modified if you’re addeing hardware that isn’t already supported. Some common scenarios include:
Use caution! In some cases these modifications can damage your electronics!
If you’re not comfortable modifying the pins file Post a New Issue and ask for help.
SERIAL_PORT for these boards MUST be set to -1. See Installing Marlin on Re-ARM for a detailed description of setting up this type of board.
These boards do not use a serial port to upload a new image. Instead the new image is placed on the card’s on-board SD card and the power is cycled. During power-up the bootloader looks for a file named firmware.bin. If this file is found the new image is copied to FLASH and the file is renamed to FIRMWARE.CUR. If there was a previous FIRMWARE.CUR it will be replaced.
Connecting the card to your computer by USB will mount the SD card on your desktop as a USB virtual disk which you can read and write like any other volume.
Naming the (first) volume on the SD card REARM is recommended. That way a new (or re-formatted) SD card can be automatically targeted by the upload process.
If the virtual disk isn’t available then the upload will fail. Just repeat the upload once the virtual disk appears.
Marlin contains a utility that will search the disks on the computer and copy firmware.bin from .pioenvs to the USB virtual disk. The utility assumes the first disk that has FIRMWARE.CUR on it is the correct target. If FIRMWARE.CUR isn’t found then it sets the target to the first disk named REARM.
If the utility fails then the upload will fail and the user will need to manually copy firmware.bin from .pioenvs to the correct disk.
There’s no automated upgrade path to convert configurations from 1.1 to 2.0 at this time. It requires manually copying your altered settings from the 1.1 Configuration.h and Configuration_adv.h files to their 2.0 counterparts.
A good side-by-side file compare utility can be invaluable. Many text editors (Atom, Sublime Text, etc.) have a built-in compare feature. And Notepad++ can be extended with a Compare plugin.
This procedure may be complicated by options that have been renamed, added, relocated, or removed. A good first step is to copy over your settings verbatim, then try building Marlin. During the build you’ll be alerted to any options that need to be renamed or changed. Make the flagged changes and keep rebuilding until it succeeds without error.
As before, start with the example configuration for your board if one is available in 2.0.
The PlatformIO environment needed for a motherboard is in the comments for the board in the pins.h file. In Marlin 2.0 it’s located in a subdirectory Marlin/src/pins/pins.h.
Example:
The configuration.h file says #define MOTHERBOARD BOARD_RAMPS_14_EFB
Search the pins.h file for RAMPS_14_EFB until you come to the following:
Emulateur super nintendo mac. The first part of the comment lists the CPU(s) used in the board.
The env:xxxx section(s) are the PlatformIO environment(s) that are used for this board.
In this case megaatmega2560 is the one used 99.9% of the time.
Click on the PIO xxxx in the extreme bottom left.
This brings up the task list. Scroll through it and then click on the desired task and environment combo. In this case a PIO Upload using the megaatmega2560 environment is highlighted. If desired, the blue box can be used to search the list rather than scrolling through it.
This brings up the build window. This window contains the same info as the Auto Build build window. The default is for this window to automatically close if the build is a success.
Working with the build window is limited.
Almost all AT90USB boards use three protocols for uploads:
The pins.h file shows the factory default for each AT90USB board.
The Arduino IDE can build and upload all the 8 bit boards but support for AT90USB boards can be complicated.
The Teensy20++ can be uploaded if the Teensy board manager is loaded.
The other AT90USB boards can be compiled/built via the Teensy board manager but can’t be directly uploaded.
Auto Build builds all the AT90USB based boards. It can upload all the boards if the factory bootloader is on the board.
Some clone builders put different bootloaders on their boards. Advanced users can modify the pins.h file to use the correct environment. The currently available environments are:
The Auto Build build window has features that make it much easier to troubleshoot errors and warnings than the build window provided by PlatformIO.
The window can be resized and moved as is convenient.
There is a scroll bar.
Keyboard shortcuts CTRL A, CTRL Z, CTRL X, CTRL C AND CTRL V work.
A right click context menu that contains some of the usual editing command plus some specialized commands.
Copy - standard functionality
Paste - standard functionality
Cut - standard functionality. Note that it has been moved from it’s usual position.
Select All - standard functionality
Clear All - standard functionality
Save As - Save the entire buffer to a file.
Repeat Build - Repeat this build/clean/upload task. Lots of times the Auto Build window is on top so this saves a few mouse clicks. This assumes that the board has NOT been changed in Configuration.h
The new build messages are appended to the bottom of the buffer/window.
Scroll Errors (CTRL-shift-e) - First invocation takes the window to the first occurrence of ERROR in the buffer/window. After that each invocation scrolls to the next ERROR. Wraps around to the start of buffer/window.
Open File at Cursor - Click on a line that has a filename in it and then invoke this command. It will try to resolve the file path and open it in one of the preferred editors at the line and column number. If none are currently running then it opens the file with the system default application.