I need HELP! FOR A CODING NOOB

I ONLY WANTED THE NEW MARLIN SOFTWARE FOR BOARD V427 WITH BLTOUCH,
so i went ahead installed vscode then marlin auto build added my folder click build after i added the correct config files for ender 3 and what happens it throws a bunch of error codes nothing works platform IDE fails to instal etc etc so no build .
WHY IS IT SO HARD TO JUST COMPILE THE SOFTWARE FOR PEOPLE AND JUST POST IT TO DOWNLOAD BUT NO INSTEAD PEOPLE GET FRUSTRATED TRYING TO COMPILE THIS HEAP OF SHIT WHICH DOESNT WORK (SORRY FOR MY LANGUAGE BUT IM SERIOUSLY FED UP) SO PLEASE SOMEBODY MAKE IT WORK SERIOUSLY!!!

I need HELP!

Steps for getting help:

  1. Read previous posts on the topic of being unable to compie for Marlin: Can not compile all of a sudden - #8 by drdrache
  2. Post exact error messages instead of throws a bunch of error codes
  3. Write descriptive titles which capture the exact type of error you’re having
  4. Keep calm
1 Like

When working with a new system, try compiling the unchanged version of Marlin first – to be sure the installation works, before changing the configuration for your particular printer.

Stupid question, you did install the PlatformIO IDE extension for VSCode? I’m not certain the Marlin Auto does this for you. Check your installed extensions in VSCode to be sure.

Cheers,
Norm.

My theory is that the Marlin Auto plugin relies on being able to execute pio commands in the normal shell and assumes these commands are available, but Do not propagate PlatformIO CLI to a default VSCode's terminal · platformio/platformio-vscode-ide@f11dd30 · GitHub and Do not patch the global environment PATH with PlatformIO // Resolve #… · platformio/platformio-vscode-ide@c019aa6 · GitHub killed that functionality. If it works on lower extension versions (2.1.0), and the error message is the term ‘platformio’ is not recognized, that’s a pretty strong indication.

as soon you install autobuild marlin it also instals platformIO IDE automaticaly ,and as far i understand auto build marlin depends on it as wel,meaning you can’t uninstal it because then it says auto build marlin depends on it

Ok, I did that thing, and checked on Github. The Marlin Auto Build page says:

  • Get PlatformIO

When installing “Auto Build Marlin” you’ll also be prompted to install the PlatformIO extension. This is required for “Auto Build Marlin” to function.*

So it looks like it’s supposed to install and use the IDE commands. However, it spawns a terminal and runs terminal_command(opname, platformio ${args} -e ${env}); which for a build gives:

terminal_command('build', `platformio run -e whatever`);

So, I suspect that there is probably a need to get VSCode to “install” the commandline parameters first?

Caveat: The above code is javascript, I don’t do javascript.

Cheers,
Norm.

i guess so yes but like i said im not an expert on that all i know it fails to instal platform IO core and then platformIO IDE won’t instal either together with that traceback error and name or term is not know aka platformIO it just stops

VSCode: 1.50.1
PIO IDE: v2.1.3
System: Windows_NT, 10.0.19041, x64

%23 Exception

Error: Traceback (most recent call last):
File "C:\Users\bas van swelm\.platformio\.cache\tmp\get-platformio-0.3.5.py", line 69, in <module>
  main()
File "C:\Users\bas van swelm\.platformio\.cache\tmp\get-platformio-0.3.5.py", line 61, in main
  bootstrap()
File "C:\Users\bas van swelm\.platformio\.cache\tmp\get-platformio-0.3.5.py", line 47, in bootstrap
  pioinstaller.__main__.main()
File "C:\Users\bas van swelm\.platformio\.cache\tmp\.piocore-installer-4g_zhg3o\tmpy9dtcyfi\pioinstaller.zip\pioinstaller\__main__.py", line 122, in main
File "C:\Users\bas van swelm\.platformio\.cache\tmp\.piocore-installer-4g_zhg3o\tmpy9dtcyfi\pioinstaller.zip\click\core.py", line 829, in __call__
File "C:\Users\bas van swelm\.platformio\.cache\tmp\.piocore-installer-4g_zhg3o\tmpy9dtcyfi\pioinstaller.zip\click\core.py", line 782, in main
File "C:\Users\bas van swelm\.platformio\.cache\tmp\.piocore-installer-4g_zhg3o\tmpy9dtcyfi\pioinstaller.zip\click\core.py", line 1236, in invoke
File "C:\Users\bas van swelm\.platformio\.cache\tmp\.piocore-installer-4g_zhg3o\tmpy9dtcyfi\pioinstaller.zip\click\core.py", line 1066, in invoke
File "C:\Users\bas van swelm\.platformio\.cache\tmp\.piocore-installer-4g_zhg3o\tmpy9dtcyfi\pioinstaller.zip\click\core.py", line 610, in invoke
File "C:\Users\bas van swelm\.platformio\.cache\tmp\.piocore-installer-4g_zhg3o\tmpy9dtcyfi\pioinstaller.zip\click\decorators.py", line 21, in new_func
File "C:\Users\bas van swelm\.platformio\.cache\tmp\.piocore-installer-4g_zhg3o\tmpy9dtcyfi\pioinstaller.zip\pioinstaller\__main__.py", line 52, in cli
File "C:\Users\bas van swelm\.platformio\.cache\tmp\.piocore-installer-4g_zhg3o\tmpy9dtcyfi\pioinstaller.zip\pioinstaller\core.py", line 72, in install_platformio_core
File "C:\Users\bas van swelm\.platformio\.cache\tmp\.piocore-installer-4g_zhg3o\tmpy9dtcyfi\pioinstaller.zip\pioinstaller\penv.py", line 75, in create_core_penv
File "C:\Users\bas van swelm\.platformio\.cache\tmp\.piocore-installer-4g_zhg3o\tmpy9dtcyfi\pioinstaller.zip\pioinstaller\penv.py", line 144, in add_state_info
File "C:\Users\bas van swelm\.platformio\python3\lib\subprocess.py", line 411, in check_output
  **kwargs).stdout
File "C:\Users\bas van swelm\.platformio\python3\lib\subprocess.py", line 512, in run
  output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['C:\\Users\\bas van swelm\\.platformio\\penv\\Scripts\\python.exe', '-c', "import sys

SO THESE ARE THE ERRORS I GET ANY IDEA’S?
PS C:\Users\bas van swelm\Downloads\Marlin-bugfix-2.0.x\Marlin-bugfix-2.0.x> platformio run -e STM32F103RET6_creality
platformio : The term ‘platformio’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • platformio run -e STM32F103RET6_creality
  •   + CategoryInfo          : ObjectNotFound: (platformio:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

PS C:\Users\bas van swelm\Downloads\Marlin-bugfix-2.0.x\Marlin-bugfix-2.0.x> echo “done” >C:\Users\BASVAN~1\AppData\Local\Temp\ipc
PS C:\Users\bas van swelm\Downloads\Marlin-bugfix-2.0.x\Marlin-bugfix-2.0.x>

Spaces in your username? C:\Users\bas van swelm are most likely to blame. Windows is a little behind the times with that sort of thing!

Cheers,
Norm.

Right and how i fix that??

I’m on Linux, username norman. So, bear that in mind please, I’m not a Windows guru.

I would create a `marlin user and use that for my Marlin stuff. You might be able to map a network drive, say Z:\ to your current user’s home folder? But I’m not sure. You would load the Marlin project from there.

Sorry if this doesn’t help.

Cheers,
Norm.

don’t worry about it at least your trying to help i think i can create another user account ill have a look into that
thanks for trying to help

I do my best!

Hope it works.

Cheers,
Norm.

thanks for that tip and indeed spaces between a username mess it up
what i did i created a new useraccount on windows10 without spaces
then platformIO IDE installed normal in vscode however building the marlin file is still an issue getting this error:platformio : The term ‘platformio’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

and a other thing i did is copy and pasted the platformio folder and the vscode folder from the new useraccount to the old useraccount on windows 10 and now pio home works there aswel

I suspected this. Auto Marlin installs PlatformIO IDE, but actually calls the PlatformIO CLI commands, or at least, that’s what the code appears to do.

You probably need to shut down VSCode and follow the instructions for Windows here: Redirecting... to make the IDE commands available in terminal/command shell sessions.

Basically, you need to append C:\Users\UserName\.platformio\penv\Scripts to your system path. Where “userName” is your no-spaces account name.

Cheers,
Norm.

marlin-2.0.x\marlin\configuration_adv.h:1054:19: error: #if with no expression ,so now i get this everytime and i don’t know what to look for or what to change ??

Look in the file mentioned, and paste here a few lines before and after line 1054.

I suspect it looks like #if SOMETHING but SOMETHING is defined as nothing or is missing. This file is one of the config files, so is liable for editing mishaps. :neutral_face:

Cheers,
Norm.

i guess this is the spot but im not seeing anything wrong ugh

nvm i think there was one space to many and it succesfully build but it puts out a hex file and from what i understand it needs to be a bin file? for use to upload on the sd card