View Single Post
  #27   Spotlight this post!  
Unread 10-01-2013, 16:17
rbmj rbmj is offline
Registered User
FRC #0612 (Chantilly Robotics)
Team Role: Alumni
 
Join Date: Apr 2011
Rookie Year: 2011
Location: DC Area/Fairfax County
Posts: 192
rbmj is a jewel in the roughrbmj is a jewel in the roughrbmj is a jewel in the rough
Re: Alternate GCC Toolchain

I have some beta-quality binaries up and running! These aren't the crappy binaries from the last toolchain but real, full debian toolchain binary packages. As always, all of the source is on my GitHub page. Sorry, but these are based off of debian (testing, specifically), and I don't have time to package every distro out there. They should work on *buntu and mint though (somebody confirm?). Feel free to try installing via alien on rpm or tgz based systems, but your mileage may vary.

Also, if any debian developers happen to read this, these packages make lintian want to barf. However they work and I've removed any really serious violations.

Though GitHub doesn' t offer downloads anymore, I was able to upload the files to dropbox (google drive didn't like the large files). Link:

https://www.dropbox.com/sh/0odxo8r92reos4z/1wIQYNwpaW

Note (if you are unfamiliar with these things) that unless you are going to try and compile from source you don't need the .dsc files. Those go with the original source code (which you can find if you look for it, a lot of it is on my github page, but NOT gcc or binutils - grab the right version of binutils from GNU and the current development branch of gcc).


As a request, is anyone willing to mirror the debs and/or provide a repo so that people can add it to the /etc/apt/sources.list? That would be awesome

Setup:

install the wrs-headers-installer package, then the powerpc-wrs-vxworks- packages (binutils, gcc, buildscripts, in that order), then the wpilib package. After that, you have a working toolchain! You'll also want cmake if you don't have that already.

Again, I don't have a repo, so dependency handling is a pain in the rear.

New workflow:

Add a CMakeLists.txt file to your code. This suffices as a minimal example:
Code:
cmake_minimum_required(VERSION 2.8)
include(FRCDeploy)

project(robot_code)
find_package(WPILib)

file(GLOB_RECURSE SOURCE_CODE *.cpp)

include_directories(${WPILib_INCLUDE_DIRS})
add_executable(robot_module ${SOURCE_CODE})
target_link_libraries(robot_module ${WPILib_LIBRARY})
add_make_deploy(robot_module 10.xx.yy.2)
Then, go to your build directory (I will assume they are called sourcedir and builddir and are in the same directory) and do the following:

Code:
$ mkdir ../builddir
$ cd ../builddir
$ frcmake ../sourcedir
NOTE THAT ITS FRCMAKE, *NOT* CMAKE.

frcmake is a wrapper for cmake that adds on some command line arguments to make your life easier...

Then, all you need is:
Code:
$ make
$ make deploy
Cross your fingers, and it should work!

Now, a disclaimer: I have not tested code built using this compiler. Since beginning this project I have gone off to college and now no longer have access to shiny cRIOs . PLEASE PLEASE PLEASE somebody test things out! I know that when I left school the toolchain worked with few issues. I've been able to fix many issues and can confirm that this builds REAL ROBOT CODE with WPILib successfully. However I can no longer say with certainty if such code will run correctly. IF it doesn't work, please tell me! However, know that I cannot help you without NETCONSOLE OUTPUT. Even then, sometimes it's cryptic and I hope that there are brave souls (CodeYeti, are you out there? ) that can work with you and squash any bugs. I'm hoping that this is early enough in the build season that people still have time to play with things

Note: As a minor bug if you want to use the 'make deploy' functionality you need to have wput installed on your system, which isn't a dependency of the package. This is because I plan to remove the dependency in the future, I'm lazy, and I've already invoked debuild a few too many times for my own sanity this week :/