RTEMS Development Environment (Linux)

Source: Internet
Author: User

I have already written the RTEMS method in cygwin, but I still want to write about Linux after thinking about it.

First, compare the advantages and disadvantages of cygwin and Linux development environments.

1. cygwin Mode
-Download and install the GNU tools compression package;
-The compilation speed is slow, but the development interface is friendly.

2. Linux-only
-Download and install the RPM packages of related GNU tools;
-Fast compilation, but it is difficult to find an appropriate editing tool in Linux;
-Use wine to run source insight.

3. Virtual Machine + linux
-Create a virtual machine environment;
-Download and install the RPM packages of related GNU tools;
-Fast Compilation speed;
-You can use the text editing tool in windows;
-File Sharing is required between virtual machines and windows, which is difficult to configure and has permission problems.

I chose the third method: Windows XP SP3, VMWare 6.5 for virtual machines, and Linux fc8 for Linux. There are official Images Using virtualbox, which are relatively large, but you don't need to worry about these troubles in the future. You can develop them directly. If you want to do it yourself, come together.

Fc8 is installed on Vmware 6.5. VMWare 6.5 does not support fc8. You can only select other Linux kernel 2.6.x. I installed a development environment with the gnome interface. By the way, I brought the Samba server.

After the installation is complete, select the NAT mode for the NIC of the Virtual Machine. the IP address of the virtual machine should be 192.168.xx.128, the host address should be 192.168.xx.1, and XX should be the network segment. The value may be different on different machines. Download the related RTEMS 4.9 development tool chain.

Http://www.rtems.org/ftp/pub/rtems/linux/4.9/fedora/8/i386/
Download the following RPM package
Rtems-4.9-arm-rtems4.9-binutils-2.19-3-el5.i386.rpm
Rtems-4.9-arm-rtems4.9-gcc-4.3.2-24.el5.i386.rpm
-Rtems-4.9-arm-rtems4.9-gcc-c ++-4.3.2-24. el5.i386. rpm
Rtems-4.9-arm-rtems4.9-gdb-6.8-11.el5.i386.rpm
Rtems-4.9-arm-rtems4.9-newlib-1.16.0-24.el5.i386.rpm
Rtems-4.9-autoconf-2.62-4.el5.noarch.rpm
Rtems-4.9-automake-1.10.3-1.el5.noarch.rpm
Rtems-4.9-binutils-common-2.19-3.el5.i386.rpm
Rtems-4.9-gcc-common-4.3.2-24.el5.i386.rpm
Rtems-4.9-gdb-common-4.3.2-24.el5.i386.rpm
-Rtems-4.9-newlib-common-1.16.0.-24. el5.i386. rpm

Note: The RPM package depends on the installation sequence. Pay attention to the RPM command prompts and select the appropriate sequence for installation. The installed address is/opt/rtems-4.9/bin.

After the installation is complete, consider sharing files between virtual machines and Windows:
There are roughly five file sharing methods
1.-files exist on windows. In Linux, NFS is used to share Windows files. (The compilation speed is slow, File Permission is limited, and it is easy to use)
2.-files are stored on Windows. Use VMware Tools of vmware6.5 to share Windows folders (the compilation speed is slow and file permissions are insufficient for ease of use)
3.-files exist on Windows. use tools such as SSH to share files in the Windows folder (slow Compilation speed, File Permission problems, and easy to use)
4.-files exist in Linux. Windows accesses files through the Samba server of Linux (the compilation speed is fast and there is no File Permission problem. Due to the Linux network permission problem, it is slightly inconvenient to use)
5. -Two files, one for Linux and one for Windows, are synchronized to the file system using SVN (fast compilation and no permission issues, because files need to be shared through SVN, inconvenient to use)

We recommend that you use the fourth method. The file system is stored in Linux and used to view and edit the code generation file in Windows. The speed requirement is not high. In addition, this method has no file permission problems, the script does not produce any strange compilation during compilation and execution.

Samba server sharing:
1. the configuration of the Samba server is very convenient and simple in the graphic interface. I will skip it here. If this is not the case, please refer to the articles written by other netizens on the Internet. If the graphic interface is not installed, please refer to other articles from other netizens and use scripts to configure Samba. This process is not complicated.
2. disable SELinux. SELinux is the security mechanism of Linux. There is no need to disable SELinux on the Virtual Machine. Change SELinux = "" to "disabled" in the/etc/SELinux/config file and restart the system;
3. Start the root account as the default shared account, which can avoid many permission problems;
4. Note that the IP address of the host machine (that is, the name and IP address of the host machine in Windows) is resolved in Linux. Otherwise, Windows Access to Linux will be very slow. Because Windows networks are based on NETBIOS, while Linux is based on DNS, Linux cannot reverse resolve windows addresses through DNS, resulting in extremely slow speed.

Select the tool chain path
-Export Path =/opt/rtems-4.9/bin: $ path
-Do not do this in cygwin: Export Path = $ path:/opt/rtems-4.9/bin

Go to the rtems4.9 source code folder (assuming that the BSP of csb337 is compiled)
-./Bootstrap-C
-./Bootstrap-P
-./Bootstrap
-Mkdir csb337
-CD csb337
-../Configure -- target = arm-rtems4.9 -- disable-POSIX -- enable-networking -- enable-cxx-enable-rtemsbsp = csb337-Prefix =/opt/rtems-4.9
-Make all install (note that two commands are separated under cygwin, make; make install)

Note: makefile generated in Linux cannot be used in cygwin. One is the gmake command, and the other is the make command.

If the compilation is successful, congratulations, the tool chain in Linux is also installed successfully. Note: If you share the source code directory of rtems4.9 in Linux, you can access it in windows and edit it using the development tool in windows.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.