Detailed analysis of ACE program porting in Embedded Linux

Source: Internet
Author: User
Article Title: detailed analysis of ACE program porting in embedded Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

1. Install the cross compiler on a PC with a Linux operating system. I use Moxa tool chain for DA66x (the same is true for other embedded Linux systems ), you can download it from the Moxa Website:

Linux/V1.0/Linux_tool-chain_1.0.zip "> http://www.moxa.com/drivers/UC/DA_66X_LX/tool_chain/linux/V1.0/Linux_tool-chain_1.0.zip

2. Download the ACE package to a Linux PC and decompress it.

3. Set environment variables:

A. PATH of the Cross-compilation tool: export PATH = "/usr/local/xscale_be/bin: $ PATH"

B. ACE_ROOT: export ACE_ROOT = "/home/jun/ACE_wrappers" (set according to the actual path)

4. Copy $ ACE_ROOT/ace/config-linux.h to $ ACE_ROOT/ace/config. h

Cp $ ACE_ROOT/ace/config-linux.h $ ACE_ROOT/ace/config. h

5. Copy $ ACE_ROOT/include/makeinclude/platform_linux.GNU

$ ACE_ROOT/include/makeinclude/platform_macros.GNU and modify

$ ACE_ROOT/include/makeinclude/platform_macros.GNU file:

Add:

CC = xscale_be-gcc

CXX = xscale_be-g ++

Delete:

     
      insure ?= 0ifeq ($(insure),1)  CC  = insure  CXX = insureelse  CC  ?= gcc  CXX ?= g++endif
     

6. Modify the $ ACE_ROOT/include/makeinclude/platform_g ++ _ common. GNU file, and comment the 90th rows: LDFLAGS + =-Wl,-E

7. Enter $ ACE_ROOT and directly enter make

8. Convert the generated libACE. copy so.5.5.6 to the cfcard/mnt/had/lib of DA66x, edit/etc/profile of DA662, and add export LD_LIBRARY_PATH = "/mnt/hda/lib to the file: $ LD_LIBRARY_PATH"

9. In addition, the test programs under the gperf directory cannot be compiled because they must pass.

$ (ACE_ROOT)/apps/gperf/src/The gperf program generated by the relevant source code in the directory to complete the next action, which is generated by the cross compiler, cannot run on PC. Therefore, after all: In GNUmakefile, We need to delete the target objects cppinset adainset cinset iinset iinset2 m3inset pinset preinset taoinset tinset.

10. The entire compilation process takes about 30 minutes, depending on the machine performance.

Episode: At first I used platform_macosx.GNU. I made appropriate adjustments to this file and named it platform_macros.GNU, because they are similar. The compilation was quite smooth at the beginning, but soon (when ACEXML was compiled) It couldn't be compiled, and it was dizzy! The generated libACE. so library is also faulty! Later, I saw other netizens compile ACE in Linux on the Internet. I was inspired to switch to platform_linux.GNU and directly

Add:

CC = xscale_be-gcc

CXX = xscale_be-g ++

Related Article

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.