Today, it took a whole day to solve the problem that the port of insight cannot be modified. Although the problem was solved, it also paid a lot of money, it took a whole day + to destroy the previous system. So we can reinstall and configure the cross-compiling environment of ARM Linux. Write down .....
1. the Virtual Machine is installed with ubuntu9.10, which is simple and does not need to be explained. Before the installation, VMWare will let you choose how much hard disk to divide. In fact, this will not really immediately separate such a large space, even if you only have 5 GB left, you can divide it into 30 GB. You only specify an upper limit. It is best to set it to a larger value to avoid further reconfiguration if it is not enough. After the virtual machine is installed, the first thing is to install the VMware tool, and then select the Ubuntu software source. China's cn99 is very good, and the APT-Get update is updated to facilitate software installation, I usually use the root user directly to avoid any trouble. Set the root password sudo passwd root and then switch over.
2. the GCC version that comes with Ubuntu is relatively high, and the syntax requirements are very strict, it will be very unfavorable for us to compile and install some software in the future, we need to select less than 4.2, OK, just install 4.2, it is the safest and easiest to install with Ubuntu commands. If you download the source code for compilation and installation, it will be exhausting.
Apt-Get install gcc-4.2
Then modify the default GCC. GCC is under/usr/bin. It is actually just a soft link, deleted, and re-specified. Switch to the/usr/bin directory, and set up the soft link here for the installed gcc4.2.
Ln-s gcc-4.2 gcc
Check whether the command is correctly displayed when running gcc-v. It's easy.
3. install the cross-compiler and download a good cross-compiler tool chain online. I used 3.4.1, Which is simpler. decompress it, then, move the arm folder to the desired place, for example,/usr/local, then add the binfile path/usr/local/ARM/3.4.1/bin to/etc/environment. Then we can directly use arm-Linux-GCC.
4. install insight, is also the focus of today, insight is based on GDB, so GDB needs the environment is certain to have, the new IDE install libx11-dev libncurses5-dev and libc6-dev the three dependent files, first installed well, otherwise, re-compilation is required when an error occurs. Before compiling insight, you must modify the source code to modify the default port. Otherwise, the port 1000 cannot be changed because I use jlink and its port 2331 cannot be modified, therefore, only the gdb port is modified. Find/GDB/gdbtk/libaray/targetselection. ITB, search for 1000, and change it to 2331 (jlink port). Note that if you want to modify the insight port just like me, you must check it carefully, this is the first time for insight compilation and installation. If you have installed and deleted it before, it will not be effective to modify the compilation and installation as per my instructions, unless you ensure that the uninstallation is very clean (in fact, the source code make uninstall is not written), otherwise, you have to reinstall the system! Configure insight:
./Configure -- target = arm-Linux -- enable-sim -- prefix =/usr/local/insight
Compilation usually takes a long time, and then make; make install
Finally, add the path to the system and modify/etc/environment to add/usr/local/Insight/bin. Update the file source/etc/environment.
Then, the gdbserver is compiled,
~ /Gdb-6.8/GDB/gdbserver $./configure -- target = arm-Linux -- Host = arm-Linux
~ /Gdb-6.8/GDB/gdbserver $ make cc = arm-Linux-GCC specifies the compiler, you can also directly specify the path
In this way, a gdbserver executable file is generated under the gdb-6.8/GDB/gdbserver directory and copied to the target development board.
5. Install eclipse
This is an ide. In fact, I don't need this thing, but I'm just curious about installing and playing. I actually use the source insight editor under windows, and then compile ubuntu, with jlink + insight debugging, we don't want to pursue any pure Windows Linux or anything. How can we help you?
Install Java
Apt-Get install sun-Java-JRE
Apt-Get install sun-Java-JDK
Select the default Java: sudo Update-alternatives -- config Java
Although the above is very simple, it is indeed a long time that I have spent a lot of time with tears and experience. I used to make these simple things for a long time, such as compiling and installing gcc4.2, people can go crazy, rely on a lot of software, compilation time is too long, and do not know that you can directly install without compiling and installation, it is the consequence of not moving your mind to stick to other people's articles, in the future, whenever you encounter things, you need to move your mind and make specific and selective decisions!