View Single Post
  #3   Spotlight this post!  
Unread 15-01-2017, 14:32
CSkillet CSkillet is offline
Registered User
FRC #0135
 
Join Date: Jan 2016
Location: Indiana
Posts: 11
CSkillet is an unknown quantity at this point
Re: CTRE Toolsuite with Command-Based C++

Here is the build for the Command Based code that isn't working:
Code:
14:24:46 **** Incremental Build of configuration Debug for project 2017Code ****
Info: Internal Builder is used for build
arm-frc-linux-gnueabi-g++ -std=c++1y "-IC:\\Users\\Robotics/wpilib/cpp/current/include" "-IC:\\Users\\Robotics\\git\\2017Code\\2017Code\\src" "-IC:\\Users\\Robotics/wpilib/user/cpp/include" -O0 -Og -g3 -Wall -c -fmessage-length=0 -o "src\\CommandBase.o" "..\\src\\CommandBase.cpp" 
arm-frc-linux-gnueabi-g++ -std=c++1y "-IC:\\Users\\Robotics/wpilib/cpp/current/include" "-IC:\\Users\\Robotics\\git\\2017Code\\2017Code\\src" "-IC:\\Users\\Robotics/wpilib/user/cpp/include" -O0 -Og -g3 -Wall -c -fmessage-length=0 -o "src\\Subsystems\\ExampleSubsystem.o" "..\\src\\Subsystems\\ExampleSubsystem.cpp" 
arm-frc-linux-gnueabi-g++ -std=c++1y "-IC:\\Users\\Robotics/wpilib/cpp/current/include" "-IC:\\Users\\Robotics\\git\\2017Code\\2017Code\\src" "-IC:\\Users\\Robotics/wpilib/user/cpp/include" -O0 -Og -g3 -Wall -c -fmessage-length=0 -o "src\\Commands\\ExampleCommand.o" "..\\src\\Commands\\ExampleCommand.cpp" 
arm-frc-linux-gnueabi-g++ -std=c++1y "-IC:\\Users\\Robotics/wpilib/cpp/current/include" "-IC:\\Users\\Robotics\\git\\2017Code\\2017Code\\src" "-IC:\\Users\\Robotics/wpilib/user/cpp/include" -O0 -Og -g3 -Wall -c -fmessage-length=0 -o "src\\Robot.o" "..\\src\\Robot.cpp" 
arm-frc-linux-gnueabi-g++ "-LC:\\Users\\Robotics/wpilib/cpp/current/lib" "-LC:\\Users\\Robotics/wpilib/user/cpp/lib" -Wl,-rpath,/opt/GenICam_v3_0_NI/bin/Linux32_ARM -o FRCUserProgram "src\\CommandBase.o" "src\\Commands\\ExampleCommand.o" "src\\OI.o" "src\\Robot.o" "src\\Subsystems\\ExampleSubsystem.o" -lCTRLib -lwpi 

14:24:59 Build Finished (took 13s.113ms)
I did what you said and looked in the C/C++ build settings linker, and the CTRLib wasn't in there, so I added it. The build error with the TalonSRXLib only occurred after I installed the CTRE Toolsuite v4.4.1.9, which is the first version of the CTRE Toolsuite where they changed it from TalonSRXLib to CTRLib. I was able to find libCTRLib.a on my computer and included the file path for the CTRLib.

After I did this, the undefined reference for CANTalon::CANTalon(int) does not appear anymore. The only error that occurs now is the Driver Station one:
Code:
ERROR  -52010  NIFPGA: Resource not initialized  GetFPGATime [Utility.cpp:171] 
 Error at GetFPGATime [Utility.cpp:171]: NIFPGA: Resource not initialized 
 	at frc::GetFPGATime() 
 	at frc::Timer::GetFPGATimestamp() 
 	at frc::MotorSafetyHelper::MotorSafetyHelper(frc::MotorSafety*) 
 	at /home/lvuser/FRCUserProgram() [0x20fac] 
 	at /home/lvuser/FRCUserProgram() [0x16aac] 
 	at /home/lvuser/FRCUserProgram() [0x14018] 
 	at /home/lvuser/FRCUserProgram() [0x140c8]
This seems to be the only difference between the working IterativeRobot Program and the CommandBased Program in terms of build errors, deploying the robot code, and the driver station errors.

Also, I used <> instead of "" and the Driver Station error did not go away.
Reply With Quote