bmd-studio / stm32-for-vscode

STM32 extension for working with STM32 and CubeMX in VSCode
MIT License
207 stars 27 forks source link

Arm toolchain not detected: folder just downloaded #190

Open darderik opened 4 months ago

darderik commented 4 months ago

Hello, while I didn't find any issues at all on my laptop and succesfully configured the extension,i'm unable to do it on my desktop pc. Even after deleting multiple times the bdm folder in AppData/Code, thus reinstalling the build tools, the extension can't find the arm toolchain folder even if it's there. Did I do something wrong on my end? Thank you!

image

Saksham-P commented 4 months ago

I am also experiencing the same issue. I have tried a few things:

  1. I tried reinstalling the STM32 for VSCode Extension which didn't really do anything.
  2. After clicking Install Build Tools, it successfully installs the ARM Toolchain, Make executable, and openOCD executable, but regardless the extension cannot detect the ARM Toolchain and prompts the user to still Install Build Tools
  3. I replaced the variable in "...\AppData\Roaming\Code\User\settings.json for the field stm32-for-vscode.armToolchainPath from false to "..AppData\Roaming\Code\User\globalStorage\bmd.stm32-for-vscode\@xpack-dev-tools\arm-none-eabi-gcc\13.2.1-1.1.1.content\bin" and then tried building the project using command palette options, but that also failed
  4. I also realized that running the Check Build Tools command sets the stm32-for-vscode.armToolchainPath field to false in the settings.json file.
Saksham-P commented 4 months ago

I found a work around (for Windows, maybe same works for mac).

  1. https://developer.arm.com/downloads/-/gnu-rm - Download the gcc-arm-none-eabi-10.3-2021.10-win32.zip file and extract it

  2. Once extracted, take the 4 folders bin, lib, share, arm-none-eabi and drag them to ...\AppData\Roaming\Code\User\globalStorage\bmd.stm32-for-vscode\@xpack-dev-tools\arm-none-eabi-gcc\13.2.1-1.1.1\.content or wherever your STM32 for VSCode toolchain is downloaded. If it asks whether to replace the files, just say yes.

  3. In the STM32 For VSCode Extension, click Check Build Tools, this should update all the paths in settings

There are probably things that are not necessary in the above steps, but it worked for me

darderik commented 4 months ago

I found a work around (for Windows, maybe same works for mac).

  1. https://developer.arm.com/downloads/-/gnu-rm - Download the gcc-arm-none-eabi-10.3-2021.10-win32.zip file and extract it

  2. Once extracted, take the 4 folders bin, lib, share, arm-none-eabi and drag them to ...\AppData\Roaming\Code\User\globalStorage\bmd.stm32-for-vscode\@xpack-dev-tools\arm-none-eabi-gcc\13.2.1-1.1.1\.content or wherever your STM32 for VSCode toolchain is downloaded. If it asks whether to replace the files, just say yes.

  3. In the STM32 For VSCode Extension, click Check Build Tools, this should update all the paths in settings

There are probably things that are not necessary in the above steps, but it worked for me

I can confirm that this works. Really weird that previous files weren't detected, looks like an issue on the downloading. Leaving here the url to the arm-none-eabi package for Windows

Thank you again.

DeflateAwning commented 3 months ago

Seems like this issue was as a result of one of the required downloads being unavailable at the time, as this issue doesn't appear to have happened again for my team. Perhaps this issue can be closed, unless there's a reproduction which still fails?

jortbmd commented 2 months ago

Might be good to have a back-up for this, as I want to move away from the current solution I am using (xPack), as they seem to be moving away of providing individual downloads for tooling without using some sorf of configuration file.