I@n Posted September 4, 2016 Share Posted September 4, 2016 Hi, I'm just trying out the "Getting started with Zynq" tutorial on a Zybo card with a fresh ubuntu installation of Vivado. I get a compilation error at the end compiling the helloworld.c in the SDK. Building file: ../src/helloworld.c Invoking: ARM v7 gcc compiler arm-none-eabi-gcc -Wall -O0 -g3 -c -fmessage-length=0 -MT"src/helloworld.o" -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -I../../getting_started_with_ZYBO_bsp/ps7_cortexa9_0/include -MMD -MP -MF"src/helloworld.d" -MT"src/helloworld.o" -o "src/helloworld.o" "../src/helloworld.c" arm-none-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory make: *** [src/helloworld.o] Error 1 arm-none-eabi-gcc does exist (in several places). ian@ian-linux-1:~$ whereis arm-none-eabi-gcc arm-none-eabi-gcc: /usr/bin/arm-none-eabi-gcc /usr/bin/X11/arm-none-eabi-gcc ian@ian-linux-1:~$ ian@ian-linux-1:~$ ls -l /opt/Xilinx/SDK/2016.2/gnu/aarch32/lin/gcc-arm-none-eabi/bin/arm-none-eabi-gcc lrwxrwxrwx 1 root root 23 Sep 3 23:13 /opt/Xilinx/SDK/2016.2/gnu/aarch32/lin/gcc-arm-none-eabi/bin/arm-none-eabi-gcc -> arm-none-eabi-gcc-4.9.2 ian@ian-linux-1:~$ ian@ian-linux-1:~$ arm-none-eabi-gcc -print-prog-name=cc1 bash: /opt/Xilinx/SDK/2016.2/gnu/aarch32/lin/gcc-arm-none-eabi/bin/arm-none-eabi-gcc: No such file or directory ian@ian-linux-1:~$ so, not sure quite what's it's trying to find, or failing to? Anyone else had this and have the answer? Link to comment Share on other sites More sharing options...
D@n Posted September 4, 2016 Share Posted September 4, 2016 GCC is actually the master orchestrator as one part in a series of programs. These programs are generally the precompiler (cpp), compiler (cc1), assembler (as or gas), and linker (ld). If you have copied the compiler from somewhere, without actually installing it properly, you will have missing components. Sometimes you can find where these components should be by typing "gcc -v", or in your case "arm-none-eabi-gcc -v". Look for the "--libexecdir" argument, and then drill down to libexec/gcc/arm/cc1. Alternatively, you might find it below the "--prefix" argument. As examples, I have "cc1" in /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/cc1, /usr/lib/gcc/msp430/4.6.3/cc1, and /usr/lib/gcc/x86_64-linux-gnu/4.8/cc1. If your compiler is not properly set up, however, cc1 may not exist or may be in the wrong place. You might wish to try "sudo apt-get install gnu-arm-none-eabi", to see if you can install it properly. Dan Link to comment Share on other sites More sharing options...
I@n Posted September 4, 2016 Author Share Posted September 4, 2016 OK, thanks. Found the answer here in the end: https://forums.xilinx.com/t5/Embedded-Development-Tools/SDK-can-t-find-arm-xilinx-eabi-gcc/td-p/344639 Board switches now control the LEDS. I don't see any messages on the console from pressing the switches though, as expected output from call to xil_printf("button 0 pressed\n\r"); function. Should they appear in the SDK Terminal? Link to comment Share on other sites More sharing options...
jpeyron Posted September 6, 2016 Share Posted September 6, 2016 Hi I@n, You should be seeing the "button 0 pressed" when button 0 is pressed. Make sure that the SDK terminal is set to 11520 otherwise you will not see anything. thank you, Jon Link to comment Share on other sites More sharing options...
D@n Posted September 6, 2016 Share Posted September 6, 2016 @jpeyron, You meant to say that the SDK terminal needed to be set to 115200 Baud, 8 data bits, no parity, and one stop bit ... right? (vice 11520 baud) Dan Link to comment Share on other sites More sharing options...
jpeyron Posted September 6, 2016 Share Posted September 6, 2016 D@n is correct. Sorry for not being clear with my instructions. thank you, Jon Link to comment Share on other sites More sharing options...
I@n Posted September 8, 2016 Author Share Posted September 8, 2016 Are we connecting to something like /dev/ttyUSB1 as invoked by the SDK Term tab + option, not PuTTY or something like that? None of the obvious candidates /dev/ttyUSB0 et. al. seem to work; just says Nothing found at port? The USB Rx light flashes when I press a key, so it's trying to send something? Been a while since I've fiddled about with serial ports so forgotten all the tricks... Ian. Link to comment Share on other sites More sharing options...
jpeyron Posted September 8, 2016 Share Posted September 8, 2016 Hi I@N, Have you tried using the terminal to get the serial communication like here? thank you, Jon Link to comment Share on other sites More sharing options...
I@n Posted September 10, 2016 Author Share Posted September 10, 2016 Hi Jon, Got it, Putty has to be run as sudo on ttyUSB1 to get the text. I have bad memories coming back now of past issues things related to security when doing this. Various Linux commands seem to run OK, non-root, but don't actually tell you they've haven't done anything. IIRC chown seems to run OK but doesn't actually change anything unless it's from root. I suspect that if Vivado was not installed as root then things might be OK as the attach is seen as coming from a "friend"? Thanks to both you and D@n for the help. Ian. Link to comment Share on other sites More sharing options...
D@n Posted September 10, 2016 Share Posted September 10, 2016 @I@n, Many Linux distributions require a user to be a member of the "dialout" group in order to use a serial port due to the security issues related to "dial"ing out. (You might tie up a phone line, incur long distance bills to be paid for by the sysadmin, hack into some institution and create legal headaches for the owner, etc.) In your case, you should be able to avoid needing to be root by making yourself a member of the "dialout" group. # sudo usermod -a dialout <username> and then log out and back in again. (You might need to reboot--I've had trouble getting this change to take effect, and I know rebooting settles the issue--I just can't remember if anything shy of rebooting does for certain.) Dan Link to comment Share on other sites More sharing options...
I@n Posted September 12, 2016 Author Share Posted September 12, 2016 Hi Dan, Thanks, even better; didn't know that; works as user inside the GUI SDK Terminal window as well now! The command that worked has the -G option for the supplementary group so: sudo usermod -a -G dialout <username> but fine otherwise. Thanks Ian. Link to comment Share on other sites More sharing options...
D@n Posted September 12, 2016 Share Posted September 12, 2016 I@n, Thanks for the correction. I only ever use that command once in a blue moon after a new installation, so remembering and getting it right was ... well, you got it, so congrats to you. Dan Link to comment Share on other sites More sharing options...
Question
I@n
Hi,
I'm just trying out the "Getting started with Zynq" tutorial on a Zybo card with a fresh ubuntu installation of Vivado.
I get a compilation error at the end compiling the helloworld.c in the SDK.
Building file: ../src/helloworld.c Invoking: ARM v7 gcc compiler arm-none-eabi-gcc -Wall -O0 -g3 -c -fmessage-length=0 -MT"src/helloworld.o" -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -I../../getting_started_with_ZYBO_bsp/ps7_cortexa9_0/include -MMD -MP -MF"src/helloworld.d" -MT"src/helloworld.o" -o "src/helloworld.o" "../src/helloworld.c" arm-none-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory make: *** [src/helloworld.o] Error 1
arm-none-eabi-gcc does exist (in several places).
ian@ian-linux-1:~$ whereis arm-none-eabi-gcc arm-none-eabi-gcc: /usr/bin/arm-none-eabi-gcc /usr/bin/X11/arm-none-eabi-gcc ian@ian-linux-1:~$ ian@ian-linux-1:~$ ls -l /opt/Xilinx/SDK/2016.2/gnu/aarch32/lin/gcc-arm-none-eabi/bin/arm-none-eabi-gcc lrwxrwxrwx 1 root root 23 Sep 3 23:13 /opt/Xilinx/SDK/2016.2/gnu/aarch32/lin/gcc-arm-none-eabi/bin/arm-none-eabi-gcc -> arm-none-eabi-gcc-4.9.2 ian@ian-linux-1:~$ ian@ian-linux-1:~$ arm-none-eabi-gcc -print-prog-name=cc1 bash: /opt/Xilinx/SDK/2016.2/gnu/aarch32/lin/gcc-arm-none-eabi/bin/arm-none-eabi-gcc: No such file or directory ian@ian-linux-1:~$
so, not sure quite what's it's trying to find, or failing to? Anyone else had this and have the answer?
Link to comment
Share on other sites
11 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.