Installed Raspbian Toolchain failed

241 views
Skip to first unread message

wenke chen

unread,
Aug 5, 2020, 4:28:49 AM8/5/20
to vmx-pi
Hi,everyone。
I received our vmx-pi the other day, and I have an error when I installed Raspbian Toolchain.
I followed the method here and failed.(I am more familiar with C++.)
when i run ‘./gradlew installRaspbianToolchain’ in new terminal,it say:  > Could not expand ZIP 'C:\Users\Kirk\.gradle\cache\download\wpilibsuite\raspbian-toolchain\releases\download\v2.0.0\Raspbian10-Windows-Toolchain-8.3.0.zip'.
Then I found it here and downloaded it, but I don't know how to install it. Can you tell me what to do next.

Thanks,
wenke

jrothr...@hdsd.org

unread,
Aug 5, 2020, 11:34:54 AM8/5/20
to vmx-pi

Here is what I did (though I did not build the toolchain myself).
1) Create a new project from the example template (I used the encoder example)
2) Click VMX-Pi vscode extension button and select configure for vmx pi (this could be avoided by simply modifying the build.gradle file instead)
3) When the build failed, I opened a new terminal in Vscode.
4) pasted ./gradlew installRaspbianToolchain  and hit enter.

It seemed to work well. Builds worked but I did not try to push it to a bot yet.

jrothr...@hdsd.org

unread,
Aug 5, 2020, 11:37:18 AM8/5/20
to vmx-pi
Edit: Do you know if you have the CPP redistributable package installed? I thought that was part of the WPILib install, but if it is not and is not installed, your build will probably fail.

Scott Libert

unread,
Aug 5, 2020, 12:36:53 PM8/5/20
to vmx-pi
If you have installed the 2020.3.2 VSCode installer, this should just work.

Perhaps there was an internet problem during the original download, and retrying it again would resolve it?

Let us know if the retry works, and if there are still no problems we can dig out the detailed install instructions.  But this should just work - so it’s worth retrying running the installRaspbianToolchain command.

wenke chen

unread,
Aug 5, 2020, 9:34:01 PM8/5/20
to vmx-pi
Thank you for your reply.
I don't know to install  the CPP redistributable package, but I can try it.
How should I install it in VS CODE?

在 2020年8月5日星期三 UTC+8下午11:37:18,jrothr...@hdsd.org写道:

wenke chen

unread,
Aug 5, 2020, 9:42:11 PM8/5/20
to vmx-pi
I tried to reinstall it late last night.
I'm sure the network is good, but VMX-Pi vscode extension and Builds worked still can't work.


在 2020年8月6日星期四 UTC+8上午12:36:53,Scott Libert写道:

Scott Libert

unread,
Aug 5, 2020, 9:57:01 PM8/5/20
to vmx-pi
The error messages indicates that in your project's build.gradle file, the version of the VSCodeExtension is "run.wpilib.update"

This is an incorrect version, and it should be something like:

plugins {
    id "cpp"
    id "google-test-test-suite"
    id "com.kauailabs.first.GradleRIO" version "2020.3.2.2"
}

The likely cause for the problem you are seeing was the the computer was not connected to the internet when the VMX-pi VSCode extension's "Update WPILib Version" was last run. 

What's recommended is to (a) make sure your computer is connected to the internet and (b) re-run the "Update WPILib Version" command in the VMX-pi VSCode extension.  After it completes successfully, you should see the version string look something like the above.

Cheers,

- scott

jrothr...@hdsd.org

unread,
Aug 6, 2020, 8:23:44 AM8/6/20
to vmx-pi
The redistributable package is an .EXE install. I think you will want the 2015, 2017, and 2019 version. You can find it here.  https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads  

wenke chen

unread,
Aug 7, 2020, 4:16:24 AM8/7/20
to vmx-pi
I have made new progress.
1) When I run'./gradlew installRaspbianToolchain' in the new terminal, Toolchain is downloaded, but I found it incomplete in the installation directory
2) I replaced the file I downloaded a few days ago and then ran'./gradlew installRaspbianToolchain'
3) Successful installation

Is this a network problem? It is normal for me to log on to the website directly.

Now I have created a few examples using WPILIB and have new questions.
1) If the example contains HAL, it will report an error
2) Others can build normally

Is this also because of network problems?

在2020年8月6日星期四UTC + 8上午9:57:01,斯科特·利伯特认为:
错误消息表明在项目的build.gradle文件中,VSCodeExtension的版本为“ run.wpilib.update”。

这是一个不正确的版本,应该是这样的:

插件{
    id  “ cpp”
    id  “ google-test-test- suite”
    id  “ com.kauailabs.first。GradleRIO  版本  “ 2020.3.2。2
}

您看到的问题的可能原因是上次运行VMX-pi VSCode扩展的“更新WPILib版本”时,计算机未连接到Internet。 

建议采取以下措施:(a)确保您的计算机已连接到Internet,并且(b)重新运行VMX-pi VSCode扩展名中的“更新WPILib版本”命令。成功完成后,您应该会看到版本字符串类似于上面的内容。

干杯,

-斯科特

2020年8月5日星期三UTC-10下午3:42:11,wenke chen写道:
我昨晚试图重新安装它。
我确定网络良好,但是VMX-Pi vscode扩展和Builds仍然无法正常工作。


在2020年8月6日星期四UTC + 8上午12:36:53,斯科特·利伯特认为:
如果您已经安装了2020.3.2 VSCode安装程序,则应该可以正常工作。

原始下载过程中可能存在互联网问题,再次尝试可以解决该问题?

让我们知道重试是否可行,如果仍然没有问题,我们可以找出详细的安装说明。但这应该可以工作-因此值得再次尝试运行installRaspbianToolchain命令。

2020年8月4日星期二UTC-10下午10:28:49,wenke chen写道:
嗨,大家好。
前几天我收到了vmx-pi,安装Raspbian Toolchain时出现错误。
我在遵循该方法,但失败了。(我对C ++更加熟悉。)
当我在新终端中运行'./gradlew installRaspbianToolchain'时,它说:>无法展开ZIP'C:\ Users \ Kirk \ .gradle \ cache \ download \ wpilibsuite \ raspbian- toolchain \ releases \ download \ v2.0.0 \ Raspbian10-Windows- Toolchain-8.3.0.zip”。
然后我在这里找到并下载了它,但是我不知道如何安装。你能告诉我下一步怎么做。

谢谢,
文科

jrothr...@hdsd.org

unread,
Aug 9, 2020, 10:41:05 PM8/9/20
to vmx-pi
Hello. Congratulations on the success.  That is excellent. This error is triggered because you need to be online when you build for the first time. I am unsure if this is unique to the VMX-Pi library, or just how Gradle works. We were (are) a Python team so we did not use Gradle much.

I think this is true for each new program you create.

I would do the following...
1) Connect to the Internet.
2) Run the VMX plugin to change the build.gradle file for the VMX-Pi
3) Use the WPI plugin to build the project.

After that, it should build, and you should be able to install the project on your bot. Also, subsequent builds of that project should be fine as well.

Good luck.

jrothr...@hdsd.org

unread,
Aug 10, 2020, 3:41:25 PM8/10/20
to vmx-pi
Hello,
While looking into a similar issue on a different thread, I noticed that it seems the VMX plugin is missing the modification of one line in the build.gradle. 

Per the instructions, you need to (manually) add the following to your build. gradle around line 7 (just below the code you posted in the first screenshot).

toolchainsPlugin.withRaspbian()

It should be on its own line. It should also be noted that when you go back to the roborio, you will need to manually remove it so your project uses the Athena toolchain again.

Good luck.

Scott Libert

unread,
Aug 10, 2020, 4:41:11 PM8/10/20
to vmx-pi
> 1) If the example contains HAL, it will report an error

It's not typical for robot applications to directly reference the HAL.  This is because WPI Library provides various libraries which (internally) use the HAL.

Note that the HAL library is present, however I'm pretty sure Visual Studio apparently does not add the path to the include files for it, since it's not intended for direct use by Robot Applications.

Can you please let us know why you are trying to directly reference HAL.h from your robot application?  If we understand what you are trying to accomplish, we may be able to suggest how to access this functionality using the WPI Library's public interfaces.

Thanks,

- scott

alex ho

unread,
Sep 27, 2020, 6:46:54 AM9/27/20
to vmx-pi
Hello, Scott: 

Recently, I was programming for VMX-Pi with C++ using the WPI Library, and I'm referring to this site. There are so many functions, and I mainly use the frc Namespace Reference section. In addition I notice there are also different functions to work on VMX-Pi such as HAL Library. But I just can't understand the relationship among different classes of C++ function in there and there.

How do it works that the VMX-Pi runs the code which is written on PC.Is there any mechanism on Raspberry Pi? I wonder how the WPILibC++ and HAL Library functions work.

If you know, may you answer me? thank you.

Cheers,
Alex

Scott Libert

unread,
Sep 29, 2020, 1:08:05 AM9/29/20
to vmx-pi
Hi Alex,

The WPI Library is a higher level programming environment, with many classes for various kinds of sensors and actuator devices, many classes including algorithms for drive system control, PID Controllers, etc.  Via VSCode, it supports remote build/deploy/debug, and there’s a driver station software for controlling it.

The lower level VMX Platform library provides a direct but lower level programming access, somewhat similar to the Arduino API.  

Hope that helps.

- scott

alex ho

unread,
Sep 29, 2020, 1:31:27 AM9/29/20
to vmx-pi
Thank you for your reply! 

Moreover, may I ask how does the raspberry-pi distinguish the code written from the VSCode? 

Again, thank you very much.
Alex

在 2020年9月29日星期二 UTC+8下午1:08:05,Scott Libert写道:
Reply all
Reply to author
Forward
0 new messages