Arm xilinx linux gnueabi gcc

Arm xilinx linux gnueabi gcc

Experience: check the experience, follow the hands, if you can, if you do things. Well, um. . . You have to make contributions, pay more attention to error in the practice process.

STEP1 has a installation package
ARM-XILINX-Linux version of GCC: link: https: //pan.baidu.com/s/1ullaji525gmxaemflhsc6g
extraction code: 1234
After decompression, put this installation package under a folder of Ubuntu, then execute the following two instructions:

CD CODESOURERY / SOURY_CODEBENCH_LITE_FOR_XILINX_GNU_LINUX / BIN / / Find Compiler Path PWD // Get the path 

Step2 Configuring environment variables
Back to the directory, execute the statement:

Then add the path you just get at the bottom, the following is my personal:

export PATH=$PATH:usr/local/arm/CodeSourcery/Sourcery_CodeBench_Lite_for_X ilinx_GNU_Linux/bin 

Save, exit,
STEP3 activates environment variables
Execute instruction:

Source ./bashrc// Activate the setting of environment variables 

You can execute instructions:

arm-xilinx-linux-gnueabi-gcc -v 

If there is a version number of the GCC, it is complete. If not, please continue. . .

I have read a lot of articles online, saying that there is a 32-bit library compatibility package leads to «No Such File or Directory», their handling method is to execute: sudo apt-get install lib32ncurses5 lib32z1, I tried, reported. The error means that the current Ubuntu20 version doesn’t have to use lib32ncurses5, so I will change the instructions:

sudo apt-get install lib32z1 

Then, execute the armi-xilinx-linux-gnueabi-gcc -v again, it is possible.

Источник

Русские Блоги

Следует отметить, что последней версией цепочки кросс-компиляции xilinx-arm-linux является версия 2011. После этого xilinx больше не предоставляет цепочку кросс-компиляции отдельно. Если вам нужна последняя версия, пожалуйста, установите программное обеспечение для разработки SDK, а затем просмотрите каталог установки. Или источник setting.sh можно использовать после активации.

1. Загрузка программного обеспечения

В интернете много людей, я только предоставляю имя файла здесь, вы можете искать этот файл

xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin

2. Установка программного обеспечения

Скопируйте файл в среду Ubuntu, посмотрите свойства

-rwxrw-rw- 1 pp pp 148299693 5Месяц 28 16:01 xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin*

Учитывая переносимость программного обеспечения, здесь используется обычная пользовательская установка.

./xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin

Введите весь путь вниз и, наконец, выведите:

Installation Complete --------------------- Congratulations! Sourcery CodeBench Lite for Xilinx GNU/Linux has been successfully installed to: /home/pp/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux 

Убедитесь, что установка прошла успешно, введите arm-xilinx-linux-gnueabi-gcc -v, чтобы отобразить соответствующую информацию

 cd /home/pp/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin ./arm-xilinx-linux-gnueabi-gcc -v

Три, добавить переменные среды и проверки

После установки, если вам нужно вручную добавить переменные среды, вам потребуется добавлять путь среды компиляции в переменную среды PATH с помощью команды экспорта при каждой компиляции программного обеспечения.

export PATH=/home/pp/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin:$PATH

Конечно, вы также можете напрямую

gedit ~/.bashrc export PATH=/home/pp/CodeSourcery/ Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin:$PATH arm-xilinx-linux-gnueabi-gcc -v

В случае успеха выводится информация о версии.

#include int main() < printf("hello world!\n"); return 0; >

Скомпилируйте и сгенерируйте исполняемый файл в среде arm, рассмотрите возможность добавления опции –staitic

 arm-xilinx-linux-gnueabi-gcc hello.c -o hello.out или arm-linux-gnueabihf-gcc hello.c -o hello.out --static file hello

Источник

Arm xilinx linux gnueabi gcc

After finishing the installation of the xilinx-arm-linux cross-compilation chain, summarize the whole process, so that later researchers can avoid detours.

Regarding the installation of the xilinx-arm-linux cross-compilation chain, I searched a lot on the Internet, but the resources in some materials are old, and some can no longer be downloaded. Some methods do not work after testing by themselves, so here is a systematic description.

First of all, explain why you need to install the xilinx-arm-linux compilation chain. I use Xilinx’s Zedboard for development.

After running Linux on Zynq, if you want to operate PS, there are two ways:

(1) On the Windows system, use the SDK to create a new C Project SDK with its own compilation environment, and automatically generate elf files after compilation. Use U disk to copy elf to Zedboard and run it. This method will be explained in detail in the future.

(2) On the Linux system, use the xilinx-arm-linux cross-compilation chain, compile the C file, and copy the compiled file to Zedboard. Today I mainly talk about this part, and the installation steps are as follows.

1. A computer with Linux system or Windows system with Linux virtual machine is required, and the system is Ubuntu;

2. Enter the Ubuntu system and press Ctrl+Alt+T to call up the Terminal. Enter sudo passwd root, you will be asked to enter the user password, and then reset the root password, the password will not be displayed here. After resetting, enter su root, and then enter the root password just reset to enter root

Here is a key point to explain, the directory must be set up.

3. In the root directory, enter mkdir /zed, create tool under zed, and copy the downloaded xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin to the tool directory.

At this time, the system will prompt that the permission is not enough, you need to enter the following way

chmod 777 xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin

Then enter ./xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin to pop up the installation interface, and click next each time. But you need to remember the installation path in the figure below.

4. Environment variables need to be set after installation

Many tutorials mentioned that you want to download the ia32-libs library, type apt-get install ia32-libs 。 But in practice, I found that the library could not be found after entering this, and it can be compiled without installation.

The method of setting environment variables is: input export CROSS_COMPILE=arm-xilinx-linux-gnueabi-

Here, there are really different methods for different tutorials. It should be noted that you must set the PATH according to your own installation path when specifying the PATH. There is no problem with the two lines of commands, so you can use it with confidence.

In some places, it is the wording of arm-xilinx-linux-gnuadbi. This should be caused by someone’s typographical error and finally spread to the Internet. Everyone needs to pay attention to identification.

I would like to thank the snail who wants to run for the method provided. You can edit the .bashrc file in the host directory and save the command for setting environment variables in .bashrc, because every time you open the terminal, the system will automatically run the .bashrc file , So after saving the settings, close the terminal and reopen it, so there is no need to set the environment every time.

After completion, enter arm-xilinx-linux-gnueabi-gcc -v and related information will be displayed

5. Finally, when using the cross-compilation chain, you only need to enter arm-xilinx-linux-gnueabi-gcc a.c -o a (a.c is the file to be compiled, and a is the output file)

Copy the output file to Zedboard to run.

It should be noted that the environment variable must be reset each time it is started.

Источник

Русские Блоги

Ссылка для загрузки xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin:

Официальный адрес загрузки — http://xilinx.wikidot.com/zynq-tools, но я не нашел GNU в SDK и, наконец, загрузил его прямо в Baidu Cloud.

После завершения установки цепочки кросс-компиляции xilinx-arm-linux кратко опишите весь процесс, чтобы в дальнейшем исследователи могли избежать обходных путей.

Что касается установки цепочки кросс-компиляции xilinx-arm-linux, я много искал в Интернете, но ресурсы в некоторых материалах старые, а некоторые больше не могут быть загружены. Некоторые методы не работают после тестирования сами по себе, поэтому вот систематическое описание.

Прежде всего, объясните, почему вам нужно установить цепочку компиляции xilinx-arm-linux.Я использую Xilinx Zedboard для разработки.

Если после запуска Linux на Zynq вы хотите использовать PS, есть два способа:

(1) В системе Windows используйте SDK для создания нового SDK проекта C с собственной средой компиляции и автоматического создания файлов elf после компиляции. Используйте диск U, чтобы скопировать elf в Zedboard и запустить его. Этот метод будет подробно описан в будущем.

(2) В системе Linux используйте цепочку кросс-компиляции xilinx-arm-linux, скомпилируйте файл C и скопируйте скомпилированный файл в Zedboard. Сегодня я в основном говорю об этой части, а шаги по установке следующие.

1. Требуется компьютер с системой Linux или системой Windows с виртуальной машиной Linux.Ubuntu;

2. Войдите в систему Ubuntu и нажмите Ctrl + Alt + T, чтобы вызвать Терминал. Введите sudo passwd root, вам будет предложено ввести пароль пользователя, а затем сбросить пароль root, пароль здесь отображаться не будет. После сброса введите su root, а затем введите пароль root, просто сбросьте, чтобы войти в root

Вот ключевой момент для объяснения: каталог должен быть настроен.

3. В корневом каталоге введите mkdir / zed, создайте инструмент в zed и скопируйте загруженный xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin в каталог инструментов.

Связанные ресурсы скачать

Введите cd / root / zed / tool

В это время система подскажет, что разрешения недостаточно, нужно ввести следующим образом

chmod 777 xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin

Затем введите ./xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin, чтобы открыть интерфейс установки, и каждый раз нажимайте «Далее». Но вам нужно запомнить путь установки, показанный на рисунке ниже.

4. После установки необходимо задать переменные среды.

Во многих руководствах упоминалось, что вы хотите загрузить библиотеку ia32-libs, введите apt-get install ia32-libs 。 Но на практике я обнаружил, что библиотека не может быть найдена после ввода этого, и ее можно скомпилировать без установки.

Метод установки переменных среды: input export CROSS_COMPILE = arm-xilinx-linux-gnueabi-

Здесь действительно есть разные методы для разных руководств. Следует отметить, что при указании PATH вы должны установить PATH в соответствии с вашим собственным путем установки. Нет проблем с двумя строками команд, поэтому вы можете использовать их с уверенностью.

После завершения введите arm-xilinx-linux-gnueabi-gcc -v, и отобразится соответствующая информация.

xilinx-arm-linux

5. Наконец, при использовании цепочки кросс-компиляции вам нужно только ввести arm-xilinx-linux-gnueabi-gcc a.c -o a (a.c — это файл для компиляции, a — выходной файл)

Скопируйте выходной файл в Zedboard для запуска.

Следует отметить, что переменная среды должна сбрасываться при каждом запуске.

Источник

Читайте также:  Linux присвоить значение команды переменной
Оцените статью
Adblock
detector