Notifications
Clear all

Can't compile MULTILANG firmware with VSC on Windows  

  RSS
M
 M
(@m-5)
Membre
Can't compile MULTILANG firmware with VSC on Windows

Hello,

i try to compile the MULTILANG firmware (3.13.1) with Visual Studio Code 1.80.2 on Windows 10 for the mk3s but it fails due to wrong CMAKE_BUILD_TYPE.

I have followed the instructions for Windows from Github but without clonig the repo as i use the stable release. When i start VSC i get this output.

[proc] Executing command: ${workspaceFolder}/.dependencies/cmake-3.22.5/bin/cmake --version
[proc] The command: ${workspaceFolder}/.dependencies/cmake-3.22.5/bin/cmake --version failed with error: Error: spawn ${workspaceFolder}/.dependencies/cmake-3.22.5/bin/cmake ENOENT
[proc] Executing command: ${workspaceFolder}/.dependencies/cmake-3.22.5/bin/cmake -E capabilities
[proc] The command: ${workspaceFolder}/.dependencies/cmake-3.22.5/bin/cmake -E capabilities failed with error: Error: spawn ${workspaceFolder}/.dependencies/cmake-3.22.5/bin/cmake ENOENT
[variant] Loaded new set of variants
[kit] Successfully loaded 2 kits from C:\Users\1\AppData\Local\CMakeTools\cmake-tools-kits.json
[kit] Successfully loaded 1 kits from c:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1\.vscode\cmake-kits.json
[proc] Executing command: c:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1/.dependencies/cmake-3.22.5/bin/cmake --version
[proc] Executing command: c:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1/.dependencies/cmake-3.22.5/bin/cmake -E capabilities
[main] Configuring project: Prusa-Firmware-3.13.1 
[proc] Executing command: c:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1/.dependencies/cmake-3.22.5/bin/cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_TOOLCHAIN_FILE:FILEPATH=c:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1/cmake/AvrGcc.cmake -DCMAKE_MAKE_PROGRAM:STRING=c:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1/.dependencies/ninja-1.10.2/ninja -SC:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1 -Bc:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1/build -G Ninja
[cmake] Not searching for unused variables given on the command line.
[cmake] CMake Warning at cmake/ProjectVersion.cmake:38 (message):
[cmake]   Failed to resolve build number: HEAD-HASH-NOTFOUND.  Setting to zero.
[cmake] Call Stack (most recent call first):
[cmake]   CMakeLists.txt:24 (resolve_version_variables)
[cmake] 
[cmake] 
[cmake] -- Project version: 3.13.1
[cmake] -- Project version with short suffix: 3.13.1+0
[cpptools] The build configurations generated do not contain the active build configuration. Using "Release" for CMAKE_BUILD_TYPE instead of "Debug" to ensure that IntelliSense configurations can be found
[cmake] ToolChain dir is C:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1/.dependencies/avr-gcc-7.3.0
[cmake] Language maximum size (from config.h): 13568 bytes
[cmake] Variant added: 1_75mm_MK25-RAMBo10a-E3Dv6full
[cmake] Variant added: 1_75mm_MK25-RAMBo13a-E3Dv6full
[cmake] Variant added: 1_75mm_MK25S-RAMBo10a-E3Dv6full
[cmake] Variant added: 1_75mm_MK25S-RAMBo13a-E3Dv6full
[cmake] Variant added: 1_75mm_MK3-EINSy10a-E3DREVO
[cmake] Variant added: 1_75mm_MK3-EINSy10a-E3DREVO_HF_60W
[cmake] Variant added: 1_75mm_MK3-EINSy10a-E3Dv6full
[cmake] Variant added: 1_75mm_MK3S-EINSy10a-E3DREVO
[cmake] Variant added: 1_75mm_MK3S-EINSy10a-E3DREVO_HF_60W
[cmake] Variant added: 1_75mm_MK3S-EINSy10a-E3Dv6full
[cmake] -- Configuring done
[cmake] -- Generating done
[cmake] -- Build files have been written to: C:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1/build
[cpptools] The build configurations generated do not contain the active build configuration. Using "Release" for CMAKE_BUILD_TYPE instead of "Debug" to ensure that IntelliSense configurations can be found
[cpptools] The build configurations generated do not contain the active build configuration. Using "Release" for CMAKE_BUILD_TYPE instead of "Debug" to ensure that IntelliSense configurations can be found

when trying to complie MULTILANG with CMake i get this output

[main] Building folder: Prusa-Firmware-3.13.1 MK3S-EINSy10a_MULTILANG
[build] Starting build
[proc] Executing command: chcp
[proc] Executing command: c:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1/.dependencies/cmake-3.22.5/bin/cmake --build c:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1/build --config Debug --target MK3S-EINSy10a_MULTILANG --
[build] [1/17   5% :: 0.074] Generating MK3S-EINSy10a language map
[build] FAILED: build_gen/MK3S-EINSy10a/lang/MK3S-EINSy10a_lang.map build_gen/MK3S-EINSy10a/MK3S-EINSy10a_lang_patch.bin build_gen/MK3S-EINSy10a/MK3S-EINSy10a_lang_patch.hex C:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1/build/build_gen/MK3S-EINSy10a/lang/MK3S-EINSy10a_lang.map C:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1/build/build_gen/MK3S-EINSy10a/MK3S-EINSy10a_lang_patch.bin C:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1/build/build_gen/MK3S-EINSy10a/MK3S-EINSy10a_lang_patch.hex 
[build] cmd.exe /C "cd /D C:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1\build\build_gen\MK3S-EINSy10a && C:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1\.dependencies\avr-gcc-7.3.0\bin\avr-objcopy.exe -O binary MK3S-EINSy10a_lang_base MK3S-EINSy10a_lang_patch.bin && C:\Users\1\AppData\Local\Programs\Python\Python310\python.exe C:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1/lang/lang-map.py MK3S-EINSy10a_lang_base MK3S-EINSy10a_lang_patch.bin > lang/MK3S-EINSy10a_lang.map && C:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1\.dependencies\avr-gcc-7.3.0\bin\avr-objcopy.exe -I binary -O ihex MK3S-EINSy10a_lang_patch.bin MK3S-EINSy10a_lang_patch.hex"
[build] Traceback (most recent call last):
[build]   File "C:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1\lang\lang-map.py", line 4, in <module>
[build]     import elftools.elf.elffile
[build] ModuleNotFoundError: No module named 'elftools'
[build] ninja: build stopped: subcommand failed.
[proc] The command: c:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1/.dependencies/cmake-3.22.5/bin/cmake --build c:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1/build --config Debug --target MK3S-EINSy10a_MULTILANG -- exited with code: 1
[driver] Build completed: 00:00:00.196
[build] Build finished with exit code 1
[cpptools] The build configurations generated do not contain the active build configuration. Using "Release" for CMAKE_BUILD_TYPE instead of "Debug" to ensure that IntelliSense configurations can be found

how do i compile the multilanguage firmware correctly?

 

Publié : 24/09/2023 3:51 pm
gudnimg
(@gudnimg)
Eminent Member
RE: Can't compile MULTILANG firmware with VSC on Windows

You need to install the required python packages:

pip install -r /path/to/requirements.txt

https://github.com/prusa3d/Prusa-Firmware/blob/MK3/lang/requirements.txt

Publié : 24/09/2023 6:18 pm
gudnimg
(@gudnimg)
Eminent Member
RE: Can't compile MULTILANG firmware with VSC on Windows

This is probably an issue:

 

The command: ${workspaceFolder}/.dependencies/cmake-3.22.5/bin/cmake --version failed with error: Error: spawn ${workspaceFolder}/.dependencies/cmake-3.22.5/bin/cmake ENOENT

 

I'd delete the .dependecies folder and start over by running

python .\utils\bootstrap.py

 again. It seems like it didn't install everything correctly.

Publié : 24/09/2023 6:37 pm
M
 M
(@m-5)
Membre
Topic starter answered:
RE: Can't compile MULTILANG firmware with VSC on Windows

i deleted the .dependecies folder and ran

python .\utils\bootstrap.py

but the output is the same. Running 

pip install -r \lang\requirements.txt

gives this

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: polib==1.1.1 in c:\users\1\appdata\roaming\python\python38\site-packages (from -r lang\requirements.txt (line 1)) (1.1.1)
Requirement already satisfied: pyelftools==0.29 in c:\users\1\appdata\roaming\python\python38\site-packages (from -r lang\requirements.txt (line 2)) (0.29)
Requirement already satisfied: regex==2022.9.13 in c:\users\1\appdata\roaming\python\python38\site-packages (from -r lang\requirements.txt (line 3)) (2022.9.13)

so the requirements seem to be installed.

I don't know how to solve this error

The command: ${workspaceFolder}/.dependencies/cmake-3.22.5/bin/cmake --version failed with error: Error: spawn ${workspaceFolder}/.dependencies/cmake-3.22.5/bin/cmake ENOENT
Publié : 24/09/2023 7:07 pm
M
 M
(@m-5)
Membre
Topic starter answered:
RE: Can't compile MULTILANG firmware with VSC on Windows

Trying to compile MULTILANG gives this output

[main] Building folder: Prusa-Firmware-3.13.1 MK3S-EINSy10a_MULTILANG
[build] Starting build
[proc] Executing command: chcp
[proc] Executing command: c:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1/.dependencies/cmake-3.22.5/bin/cmake --build c:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1/build --config Debug --target MK3S-EINSy10a_MULTILANG --
[build] [1/17   5% :: 0.073] Generating MK3S-EINSy10a language map
[build] FAILED: build_gen/MK3S-EINSy10a/lang/MK3S-EINSy10a_lang.map build_gen/MK3S-EINSy10a/MK3S-EINSy10a_lang_patch.bin build_gen/MK3S-EINSy10a/MK3S-EINSy10a_lang_patch.hex C:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1/build/build_gen/MK3S-EINSy10a/lang/MK3S-EINSy10a_lang.map C:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1/build/build_gen/MK3S-EINSy10a/MK3S-EINSy10a_lang_patch.bin C:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1/build/build_gen/MK3S-EINSy10a/MK3S-EINSy10a_lang_patch.hex 
[build] cmd.exe /C "cd /D C:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1\build\build_gen\MK3S-EINSy10a && C:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1\.dependencies\avr-gcc-7.3.0\bin\avr-objcopy.exe -O binary MK3S-EINSy10a_lang_base MK3S-EINSy10a_lang_patch.bin && C:\Users\1\AppData\Local\Programs\Python\Python310\python.exe C:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1/lang/lang-map.py MK3S-EINSy10a_lang_base MK3S-EINSy10a_lang_patch.bin > lang/MK3S-EINSy10a_lang.map && C:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1\.dependencies\avr-gcc-7.3.0\bin\avr-objcopy.exe -I binary -O ihex MK3S-EINSy10a_lang_patch.bin MK3S-EINSy10a_lang_patch.hex"
[build] Traceback (most recent call last):
[build]   File "C:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1\lang\lang-map.py", line 4, in <module>
[build]     import elftools.elf.elffile
[build] ModuleNotFoundError: No module named 'elftools'
[build] ninja: build stopped: subcommand failed.
[proc] The command: c:\Users\1\Documents\PlatformIO\Projects\Prusa-Firmware-3.13.1/.dependencies/cmake-3.22.5/bin/cmake --build c:/Users/1/Documents/PlatformIO/Projects/Prusa-Firmware-3.13.1/build --config Debug --target MK3S-EINSy10a_MULTILANG -- exited with code: 1
[driver] Build completed: 00:00:00.196
[build] Build finished with exit code 1
[cpptools] The build configurations generated do not contain the active build configuration. Using "Release" for CMAKE_BUILD_TYPE instead of "Debug" to ensure that IntelliSense configurations can be found

The hex file is not generated

Publié : 24/09/2023 7:23 pm
Partager :