The construction of embedded learning environment

Source: Internet
Author: User

工欲善其事, its prerequisite.

Learning Embedded is the same, the first to understand the environment.

Let me talk about the development steps:

1, serial port settings

First: Connect the serial port and use the tool secure CRT.

But after connecting the serial port, you cannot type.

Solution:

Reference: http://blog.csdn.net/heli007/article/details/7279022SECURECRT The serial port cannot be entered

?

It is important to note that the General Development Board, the factory has already burned the Linux system into the Development Board. We do not need to burn, then the serial port connection.

I use the processor Samsung s5pv210 based on Cortex m-a8. ARM has three series: application, real-time, micro controller.

Note: Generally configured after the serial port, will not immediately out of data, the need to restart the Development Board above the system, the simplest way is to power off.

We then use the CRT (which needs to run in compatibility mode) to capture the interface as follows. (Looks like a hardware self test)

2. Hardware environment

No outside is the network cable and serial connection, we can enter ifconfig in the string to determine the IP address. Then set the native IP to the same network segment as the Development Board.

Currently in my application, we can set up NAT through the network cable, sharing between files, through the serial port or network port to execute commands can be.

Note: Here is a small trick, the general desktop only one network port to do? We just need to connect the board's cable to the router or switch.

3. Configuring the Host Software Environment

The general embedded development Environment has three: Cygwin based on the PC Windows operating system, installing the virtual machine on the Windows system, and then installing the Linux system on the virtual machine; Install the Linux system directly.

Here we take the second example, if the system is strong enough, the configuration is high.

Network aspect: Set up the NFS server.

Steps:

1), configuration file open Vi/etc/exports Enter the directory to be shared/cbt-superiot * (rw) read/write * means that any machine can be accessed, the first is the shared directory.

2), open or restart the service/etc/init.d/nfs restart (all services can be closed or restarted by this method, similar to Svcadm xxxservice start)

In fact, it can also be implemented by service NFS start. or Chkconfig NFS on to implement. These three methods are all possible and the last method takes effect immediately.

Shut down the firewall: (must be turned off, otherwise the board system (from the device) cannot share the NFS directory. )

Explain that in this system, we install Linux on the PC as a client of the NFS network file system. Linux on the Development Board is the true server side. Therefore, the file system needs to be mounted on the server side.

/etc/init.d/iptables stop, Chkconfig iptables off, service iptables start

3), ARM Linux mount NFS System (must kill firewall)

Mount-t nfs–o nolock 192.168.1.107:/cbt-supperiot/mnt/nfs means mount NFS option is-o ip+ shared folder + arm mount point.

Lifting mount: Umount/mnt/nfs

4. Write code

1) There are usually two types of embedded development, mount or download. It is now generally mounted because of the limited storage resources available in arm.

2) Create the experiment directory, write the source code, write the Makefile

Note: Makefile cannot have any errors, otherwise it will not compile.

CC=ARM-LINUX-GCC indicates that the compiler

Exec=hello represents the name of the execution file generated after compilation

OBJS=HELLO.O target File list

cflags+= Compilation parameters

Ldflags+=-static Connection Parameters

All: $ (EXEC) Compile main entry

$ (EXEC): $ (OBJS)

$ (CC) $ (ldflags)-O [email protected] $ (OBJS)

Clean: Clears compilation results

-rm–f $ (EXEC) *.elf *.gdb *.O

Tip: How to switch to the root directory CD/can.

3) Compile the program

At the command Governor, type make. If you need to modify make clean and then modify it.

Note: Compilation changes are made on the host and cannot be done in arm.

Add a little bit of knowledge: Install ARM-LINUX-GCC

1) Loading disc file Mount-t Iso9660/dev/cdrom/mnt/cdrom

2) Copy the file and unzip the CP and TAR commands.

3) Copy the file and specify the path CP and VI command.

4) Make the write file effective and verify that the source and ARM-LINUX-GCC are validated.

Note: The original ARM-LINUX-GCC, like FFmpeg, are executable files. Redhat Software Installation rpm Yum and so on.

Reference:installation method of http://blog.sina.com.cn/s/blog_68f3489201014a86.html arm-linux-gcc-4.5.1

5. Verify in Arm

1) Use the serial terminal to access the NFS shared directory

Cd/mnt/nfs

2) Execution procedure

./hello

The construction of embedded learning environment

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.