How to add user applications in uClinux

Source: Internet
Author: User
Article Title: detailed methods for adding user applications in uClinux. 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. uClinux-dist/user/Makefile

Dir _ $ (CONFIG_USER_HELLO_WORLD)

+ = Hello

2. uClinux-dist/config/Configure. help

CONFIG_USER_HELLO_WORLD

A simple hello world program

3. uClinux-dist/config. in

Find the following two lines

Mainmenu_option next_comment

Comment 'miscellaneous Applications'

Add the following line

Bool 'hello'

CONFIG_USER_HELLO_WORLD

4.1.uClinux-dist/user/hello/Makefile

       
        EXEC = helloOBJS = hello.oall: $(EXEC)$(EXEC): $(OBJS)$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)romfs:$(ROMFSINST)    /bin/$(EXEC)clean:-rm -f $(EXEC) *.elf *.gdb *.o
       

4.2.uClinux-dist/user/hello. c

       
        #include 
        
         int main(){printf("Hello, World\n");return 0;}
        
       

5. Compile the user program into romfs

       
        # cd ~/uClinux-dist# make menuconfig# make dep# make romfs
       

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.