PlatformIO Community

Where's the rest of platformIO?

So i just downloaded VScode to edit marlin firmware and then installed PlatformIO with the C+ extentions. well When i goto the PIO code screen to set my environment, it stops at line 274. and this isnt a one time thing. I tried everything i know to fix it. I started a new user on my computer just in case there was scraps left over from a previous install of this software. Still no dice. I tried my other laptop which had never been used for VScode or pio before. as well as my wifes computer. each with the same results. what gives?? never had an issue with it in the past. I really need some help on this as I have a freshly built custom 3d printer with a brand new Bigtreetech mother board and tft display. If anyone knows how to fix this issue, please respond as soon as you can.
Screenshot 2021-08-26 205543

Marlin’s platformio.ini has 273 line, VSCode adds an extra empty line.

The view is correct. What’s the exact problem here?

Note that Marlin has recently refactored the .ini file into multiple smaller ones listed at Marlin/ini at bugfix-2.0.x · MarlinFirmware/Marlin · GitHub.

1 Like

When I last used pio, it had a full list of environments including the big tree tech boards. Now it’s not there and I cannot set the environment for my bigtreetech pro 1_1

As @maxgerhardt mentions above, the ini file was refactored a while back. It baffled me too when I first needed to look something up – and I don’t have a 3d printer!

Cheers,
Norm.

Ok so how do I use the new ini files for pio? It won’t run without the proper environment installed. I’m really at my wits end with all this. Does anyone follow the old addage if it ain’t broke don’t fricken fix it?

What’s the error message? There’s no reason why this shouldn’t run after the refactor. The Marlin people would have surely noticed.

First, it was “broken” - the single file was far too big for all known 3d printers. Your mileage, obvioulsy, may vary.

Next, I assume, always a bad idea, that you mean “how do I set up my environment so that I can compile the firmware for my “bigtreetech pro 1_1” printer”? If so, I wrote myself some notes when I came across the newly refactored Marlin layout which assumes that I have downloaded the zip files for Marlin and the separate config stuff:

  • Extract Configurations file.
  • Extract Marlin file.
  • Find correct 3d Printer in Configurations/config/examples/whatever and copy all the files in its directory into Marlin/Marlin, replacing the two files that already exist.
  • Given the correct default_envs for the printer, edit platformio.ini and make sure that setting is defined. The settings are found in the files in the ini directory, and are based on the processor type. STM32F103 etc is in stm32f1.ini, for example.
  • Then just build in the normal manner, VSCode or pio run.

For your printer you mention the Bigtree pro 1.1. Looking at Marlin 2.0.8.2, the latest I have on my laptop, I only see BigtreeTech pro 1.2 for the Creality CR10-S, so we’ll run with that.

  • Copy all files in the directory Configurations/config/examples/Creality/CR10-S/ into Marlin/marlin overwriting the two existing files.
  • Edit platformio.ini and change default_envs to BIGTREE_SKR_PRO.
  • Save platformio.ini
  • Build.
Processing BIGTREE_SKR_PRO (platform: ststm32@~12.1; board: marlin_BigTree_SKR_Pro; framework: arduino)
...
...
RAM:   [=         ]   7.8% (used 15240 bytes from 196608 bytes)
Flash: [==        ]  18.5% (used 193756 bytes from 1048576 bytes)
Building .pio/build/BIGTREE_SKR_PRO/firmware.bin
...
...
Environment      Status    Duration
---------------  --------  ------------
BIGTREE_SKR_PRO  SUCCESS   00:04:30.511

I got the details of the default environment from the PDF file at https://www.diyelectronics.co.za/store/index.php?controller=attachment&id_attachment=593 – I have no idea if it is corect, as I said, I don;t have a 3D printer.

HTH

Cheers,
Norm.