<p>Marlin has a feature that can <a href="https://marlinfw.org/docs/features/autostart.html" rel="nofollow noreferrer">execute a G-code file from an SD card when printer is turned on</a>; this is called Autostart.</p>
<blockquote>
<p><code>Autostart</code> is available on printers with an SD card reader. If <code>auto0.g</code> exists on the card, the printer will recognize and execute it on bootup. Thereafter, if there are files with incrementing numbers, e.g. <code>auto1.g</code>, they will be done in incrementing order.</p>
</blockquote>
<p>Name your file <code>auto0.g</code> and it runs when the printer is powered up.  <code>auto0.g</code> should execute first then <code>auto1.g</code> then <code>auto2.g</code> etc.  Mine will only execute <code>auto1.g</code> and not the others. Any thoughts what happens here?</p>

CC BY-SA 4.0
2020-09-03T06:02:00.933Z
Hi Sea Wa, welcome to 3DPrinting.SE! Do the skipped files contain valid G-code? Are the files properly ended Unix/Windows line breaking? Files or SD-card corrupt?
0scar
CC BY-SA 4.0
2020-09-04T14:48:45.157Z
Thank you for you response. Could you please explain what the proper ending Unix/Window line breaking is.
Sea Wa
CC BY-SA 4.0
2020-09-04T14:50:29.190Z
would it be practical to test each auto file individually prior to creating the cascade?
fred_dot_u
CC BY-SA 4.0
2020-09-04T14:54:17.467Z
I tried auto0.g alone and it executed. I am using Marlin 2.0.6 0n a BTT SKR 1.4 Turbo with TMC 2209 drivers. One my Ender 3 Pro with auto0.g, auto1.g and auto2.g on SD card, it will execute auto0.g but not the others.
Sea Wa
CC BY-SA 4.0
2020-09-04T14:57:37.423Z
what if you rename auto1.g to auto0.g and run it alone? If there's a problem with the code, it would appear. Each successive auto file could be tested this way.
fred_dot_u
CC BY-SA 4.0
2020-09-04T15:03:08.960Z
Thanks, tried that. Each file runs when named auto0.g and is the only file on the SD card. I tried a number of combinations all with the same results.
Sea Wa
CC BY-SA 4.0
2020-09-04T20:11:00.290Z
Thanks, tried that already.  Each independent file will execute when named to auto0.g.
Sea Wa
<marlin><firmware>
Marlin Firmware - Autostart only runs `auto1.g` but not `auto0.g`
Sea Wa
# Marlin Firmware - Autostart only runs `auto1.g` but not `auto0.g`

(Asked by: username_0 on 2020-09-03)

Marlin has a feature that can [execute a G-code file from an SD card when printer is turned on](https://marlinfw.org/docs/features/autostart.html); this is called Autostart.

> `Autostart` is available on printers with an SD card reader. If `auto0.g` exists on the card, the printer will recognize and execute it on bootup. Thereafter, if there are files with incrementing numbers, e.g. `auto1.g`, they will be done in incrementing order.

Name your file `auto0.g` and it runs when the printer is powered up. `auto0.g` should execute first then `auto1.g` then `auto2.g` etc. Mine will only execute `auto1.g` and not the others. Any thoughts what happens here?

**Tags:** marlin, firmware
> **Comments:**
> **username_1**: Hi Sea Wa, welcome to 3DPrinting.SE! Do the skipped files contain valid G-code? Are the files properly ended Unix/Windows line breaking? Files or SD-card corrupt?  
> **username_0**: Thank you for you response. Could you please explain what the proper ending Unix/Window line breaking is.  
> **username_2**: would it be practical to test each auto file individually prior to creating the cascade?  
> **username_0**: I tried auto0.g alone and it executed. I am using Marlin 2.0.6 0n a BTT SKR 1.4 Turbo with TMC 2209 drivers. One my Ender 3 Pro with auto0.g, auto1.g and auto2.g on SD card, it will execute auto0.g but not the others.  
> **username_2**: what if you rename auto1.g to auto0.g and run it alone? If there's a problem with the code, it would appear. Each successive auto file could be tested this way.  
> **username_0**: Thanks, tried that. Each file runs when named auto0.g and is the only file on the SD card. I tried a number of combinations all with the same results.  
> **username_0**: Thanks, tried that already.  Each independent file will execute when named to auto0.g.  

---

## 0 answers

