This part of the site is now the Primary. The original site is still available for reference at - caggius.wordpress.com
Aug 2023 Update
Heads Up! Looks like Atom has now finally been discontinued and MacOS now throws up a very frightening error message when you try to start Atom "“Atom.app” will damage your computer. You should move it to the Bin." If you want to carry on using Atom then you can, but first you have to down level the Atom IDE to version 1.60.0 - Jump to the bottom of this page to find out how.
May 2021 Update
Atom is still working with Marlin 2.0.8.1 release.
Before starting I did update Atom to 1.57.0 and update 4 library packages and platform.io to Core 5.1.1 and Home 3.3.4
If you prefer a Microsoft environment then skip over to my Marlin Windows build with VSCODE page.
Most of the following came from watching a lot of videos on the Edward Braiman YouTube channel.
https://www.youtube.com/channel/UCQgi4B8mn_HYUkIImt30B9g
..and also the BigTreeTech Video (but you really need to watch that one at a quarter speed!)
https://www.youtube.com/watch?v=oaXfXkPYHpw
Install the Atom Editor on your Mac
Download the Zip file from https://atom.io/
In finder double click on the package to unzip the file
Drag the Atom App file to the Applications folder
Start Atom from Launchpad or Finder->Applications.
Depending your security preferences you will have to either accept the “file downloaded from internet” prompt or go into System Preferences -> Security & Privacy -> General Tab and change Allow Apps downloaded from “App Store and identified developers and then approve VSC.
Startup Atom.
Install the platformio-ide in Atom
Instructions are here https://platformio.org/install/ide?install=atom
But basically Preferences -> Install -> Search for platformio-ide package -> Install
This will install the latest version, as of Jan 2021 this is 2.7.2
It will probably also give a pop-up suggesting that you migrate to VSCode rather than Atom but you close and can ignore it.
When the green successful installation prompt appear press the provided Restart button on .
Download Marlin 2.0.x source zip
Instructions are here http://marlinfw.org/docs/basics/install.html
Go to http://marlinfw.org
Click on the “Download” Button.
Select the latest Release Option, at the time of writing (Jan 2021) this is 2.0.7.2
Click on “2.0.x.zip” The download should start and prompt you to choose a save folder. Once the download is complete, double click on the zip file in Finder and the Archive Utility will extract the source to the Marlin-2.0.x folder.
At this point I personally would rename this folder to include the version and download date e.g. M2072-0114
Then I would relocate the folder to the root or the home directory in order to shorten the filename path lengths in the compiler. As long path lengths cause lots of file not found errors !
Restart Atom and load the Marlin Project
Warning! During the following if this is the first time that you have used Atom then the Apple Security code will frequently prompt you to grant Atom access to different parts of the disk and to removable drives - just go ahead and agree then continue to the next step....
Click Open Project in platform io then navigate to your Marlin directory “M2072-0114” and click on the "Open M2072-0114" button. You may need to scroll down in the file selector window to find the button !
Select Open Project and point it at your source folder
The Project's files will now appear in the left hand pane
Validate the Installation.
Try building the Marlin project as downloaded, with the default Mega2560 processor. I would not make any changes yet, as if the project does not compile we will know that the problem is purely with the installation and not our code changes.
On the left side of the Atom window is a vertical toolbar, just click on the tick icon to start the build.
The first build is always the longest as it checks dependencies and then compiles all the files, later builds may only compile a subset of the files. Timings for the initial build vary from 12 seconds on my M1, 3 minutes on my 2012 i7 Macbook and 9 minutes on my daughters Pentium 987.
If everything is OK you should see a something like “==== 1 succeeded in 00:02:25.234 ====” at the bottom of the screen in the build window.
Note: You may also notice the “Problems(4)” counter and if you scroll up through the build window you will find some compiler warnings. This is normal for Marlin and I ignore all of these.
Now check the LPC1768/9 build libraries by rebuilding the base code with just the processor changed. The correct LPC1768/9 processor for your BTT Board.
Open the platformio.ini file in VSCode
In the left hand window make sure that your project directory is expanded. If you can not see the .github entry at the top then click on “>M2072-0114” to expand the file tree.
Now scroll down to the bottom and locate “platformio.ini” and left click on it to open it in an editor window in VSCode.
Search for “default_envs” (approximately line 16 to 21)
Change the line “default_envs = mega2560” to read
for the SKR 1.3 or SK4 1.4 to “default_envs = LPC1768” or
for the SKR 1.4 Turbo to “default_envs = LPC1769”
Save the file (File->Save) or (cmd+S)
Now in the left hand window click on the Marlin Directory to expand it and click on the Configuration.h file to open it in VSCode (as above)
Search for MOTHERBOARD (approximately line 130).
Change the line MOTHERBOARD BOARD_RAMPS_14_EFB” to read
for SKR 1.3 to MOTHERBOARD BOARD_BTT_SKR_V1_3
for SKR 1.4 to MOTHERBOARD BOARD_BTT_SKR_V1_4
for SKR 1.4 Turbo to MOTHERBOARD BOARD_BTT_SKR_V1_4_TURBO
Save the file (File->Save) or (cmd+S)
Now click on the Tick Icon in the left hand vertical toolbar to start another build.
If successful there will be the “1 succeeded” showing in the build window.
Now we can update the Marlin Configuration for our Printer and rebuild .
Go ahead and make the several hundred changes to configuration.h and configuration_adv.h for your own specific design of machine…
Note: While doing this do not add comments to the end of lines in platformio.ini as this will generate compile errors – always add those comments on separate lines.
Click the tick to compile without writing to destination. This bypasses the need to have the board powered up and connected to your computer plus all the connectivity issues. You can then manually copy the compiled output to the SKR boards SDCARD and carry it to the printer.
Note: For the next 3 sections if you are using an SKR 1.4 or Turbo board then you will need to replace LPC1768 with LPC1769 below…
Copy firmware.bin to the SKR Board
There are 3 ways to get the firmware on the SKR.
Unplug the SDCard from the SKR and plug it in your computer then Manual copy the firmware.bin file to the SDCard
Mount the SKR Board and use Finder to copy firmware.bin file to the SKR
Mount the SKR Board and configure platform.io for autocopy
Manual Upload
Copy the .pio/build/LPC1768/firmware.bin file to the SKR’s SDCard replace it and reboot the printer to replace the existing firmware.
Note: As the output folder tree “.pio” starts with a ‘.’ the Mac OS will assume that this is a system directory and hide it from the end user. On a Mac in Finder you can toggle the ability to see hidden directories or files by using the keyboard toggle Cmd+ Shift+ ”.” all at the same time.
Mount the SKR Board and Manual Upload
I have labelled my printers SDCard SKR13 so that when the printer is powered up, and USB connected to my Mac, I get an SKR13 disk icon on my desktop. When I have a good build that I want on the printer I simply drag and drop the firmware.bin file to the SKR13 disk.
There are a couple of things that may catch you out on this approach:
to make this external disk icon appear you need to navigate to Finder -> Preferences -> General -> Show these items on the desktop and select External disks.
If you have configured Marlin to use the SDCARD as the gcode source , i.e. SDCARD_CONNECTION = ONBOARD in configuration_adv.h, then Marlin will, on power up, take ownership of the SDCard and it will become invisible to the Mac until you execute Release Media in the Marlin Menus and then replug the USB cable.
Configure Auto Upload
You can should you wish configure platformIO to copy the firmware.bin file to your USB connected printer by configuring the upload_port parameter in platformio.ini.
For an Arduino Mega this would be the USB serial port that the Mega is attached to, but for a BTT SKR board this is simply the path that the boards SDCard is mounted to when the SKR is connected by USB to your computer.
On Windows this done by adding upload_port = E:/ (where E is the drive letter or mount point for the SDcard) to the [env:LPC1768] section of platformIO.ini typically just after build_flags.
Aug 2023 How to get Atom running again on MacOs
Top_You_4391 posted this work around on Reddit 6 months ago.
For Mac users -
mv ~/.atom ~/atom_bak
rm -fr /Applications/Atom.app
download https://github.com/atom/atom/releases/tag/v1.60.0
Drag download to Applications folder - to install
Open Atom - and then [right-click] => Quit
cp ~/atom_bak/packages/* ~/.atom/packages/
cp ~/atom_bak/config.cson ~/.atom/
cp ~/atom_bak/config.cson ~/.atom/
cp ~/atom_bak/keymap.cson ~/.atom/
cp ~/atom_bak/styles.less ~/.atom/
Go into preferences and DISABLE auto-update!
Atom->Preferences->Core untick Automatically Update
Note: The packages copy threw up errors on me, it probably needs a -R to make it recursive, but I just copied the files using finder instead