|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: C++ - No Code?
is the cRIO imaged for C++ or LabVIEW?
just open up the imaging tool, change it, and hit apply. |
|
#2
|
||||
|
||||
|
Re: C++ - No Code?
original post: |
|
#3
|
|||
|
|||
|
Re: C++ - No Code?
I second viewing either NetConsole or the serial port output. If you have trouble interpreting it, feel free to post it here and I will do my best to help.
The ucpp project targets the cRIO, and should build code correctly. I have been using that toolchain (under Linux) for years without issues, and with a similar Makefile. |
|
#4
|
|||
|
|||
|
Re: C++ - No Code?
OK. I was able to get NetConsole working after manually changing the default gateway in ni-rt.ini to 10.6.12.4.
More interestingly, it fails to lode the code due to undefined symbol errors. The symbols look like the mangled names of WPILib functions (_Z...WatchdogC1EPi), so i assume that ucpp is not linking in WPILib. Where is the WPILib file? I assume I could add it to StartupDlls in ni-rt.ini, or change the makefile to run wine ldppc.exe (I too am on linux) or something of the like to statically link them together. Or have I just missed a step. Again, I haven't modified the toolchain from the default linux ucpp. Thanks for your help. EDIT: Found the WPILib.a file. It looks like it *should* be linked in (glancing at the makefile). Why am I getting undefined symbol errors then? Last edited by rbmj : 12-15-2011 at 11:34 AM. |
|
#5
|
|||
|
|||
|
Re: C++ - No Code?
Got it to work - An update to version 30 of the firmware did the trick (I was using version 29).
Thanks! |
|
#6
|
|||||
|
|||||
|
Re: C++ - No Code?
Great.
A mismatch of the library/image versions causing the error makes sense. Last edited by Mark McLeod : 12-15-2011 at 04:19 PM. |
|
#7
|
|||
|
|||
|
Re: C++ - No Code?
Technically WPILib was being linked in. The failure was coming from a mismatch of symbol names between WPILib.a and the NI_FPGA.out binary that exposes symbols to access the FPGA.
|
|
#8
|
|||
|
|||
|
Re: C++ - No Code?
Quote:
Thanks, -Joe |
|
#9
|
|||
|
|||
|
Re: C++ - No Code?
Quote:
https://github.com/nikitakit/ucpp Code:
Universal compiling scripts for FRC
System Requirements:
For Linux: wine, wput
For Windows: MSYSgit or Cygwin
Installation instructions:
- Add the "ucpp/ucpp" folder to your system PATH
- Run the ucpp setup script
$ ucpp setup -t <team-number>
Creating a project
$ ucpp init
Configures the current directory as an FRC C++ project
that deploys code to your team's robot.
The ucpp build system aims to be fully compatible with
development in WindRiver. You can initialize any existing
WindRiver project as a ucpp project, as well as any folder
that contains C++ files.
Building and deploying code
$ ucpp configure
Generates a Makefile for your project
For additional options, run "ucpp configure help"
$ make
Compile the project
$ make deploy
Deploy code to the robot
|
|
#10
|
|||
|
|||
|
Re: C++ - No Code?
Quote:
-Joe |
|
#11
|
|||
|
|||
|
Re: C++ - No Code?
Note that the main version by nikitakit doesn't work for me - it calls python2 which is only python on some boxes. Ozzloy added a few commits to detect where python2 was installed and call that through a shell variable, so his fork might work better for many users. He submitted a pull request a long time ago but upstream hasn't merged them in.
I made some patches to some of the scripts as well, as I was getting syntax errors on my computers (Debian & openSUSE). I have a fork at github (https://github.com/rbmj/ucpp) that has ozzloy's changes as well as mine until upstream merges them in. I've also requested that ozzloy merge my changes into his repo. Last edited by rbmj : 12-16-2011 at 01:57 PM. |
|
#12
|
||||
|
||||
|
Re: C++ - No Code?
Quote:
|
|
#13
|
|||
|
|||
|
Re: C++ - No Code?
Quote:
The main issue was that the parsing of the team number into an ip address in ucpp-init. Since the method used in ucpp-setup worked, I changed ucpp-init to parse its arguments in the same manner. I also cleaned up the detect python function, as in my case it was outputting the found python twice. Also there was no need to use the output of that function to set ucpp_python_bin, as the variable is globally scoped. Last I included the found python in the settings file so it could be used from other scripts. |
|
#14
|
|||
|
|||
|
Re: C++ - No Code?
Hey: this may seem a bit off topic, but is there somewhere I could get information on compiling code targeting VxWorks on a ppc 603 cpu like you did without windriver? I'm running unix and I'm trying to figure out how to download code to out cRIO without a license for windriver.
I've started working on compiling my own cross tools to target the different CPU architecture, but I really don't know where to start. Any help appreciated! |
|
#15
|
|||
|
|||
|
Re: C++ - No Code?
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|