This is how to add an application under uclinux:
Add your own programs for 4510B, compile / download their process Step 1: Create a self-appby: Please first read the document in the catalog of uclinux 2.4.x kernel, Directry: ../Documentation/adding-user-apps- Howto.txt can help you create an Application. Step 2: After creating your own Application project, you can use Linux (redhat, etc.) to compile on the PC, execute (./youappexe) on the PC (./youappexe) To verify that your program has bug or error et al. But this seems to be "executable program / file" in the PC is not your ARM / DRAGONBALL / COLDFIRE / POWERPC "" executor / file " ", Because the file system used by the PC (X86) platform and the file system used by your target board (single-chip board) UCLinux, UCLinux's ROMFS format executable / file is a Linux (redhat, etc.) on the PC. ) I know. Suppose you created new applations: ../user/myapp/demo.c assumes that you have fully followed (* in ../documentation/adding-user-apps-howto.txt Required *): ../user/myapp/Demo.c content ----- #include
#######################################################################################################################################################################################################################################################################################################
# begin
#CC = ARM-ELF-GCC
EXEC = Demoobjs = demo.o
All: $ (exec)
$ (EXEC): $ (OBJS) $ (LDFLAGS) -O $ @ $ (oj) $ (ldlibs) # Note that the Tab key is retracted
ROMFS: $ (ROMFSINST) / BIN / $ (EXEC) # Note that the Tab key is retracted
Clean: -RM -F $ (Exec) * .elf * .gdb * .o
# end
##############################################################################
Then compile it, only in the current application directory: make, look at yourself, just as your expectation. STEP 3: Add below to ../user/makefile: DIR _ $ (config_user_myapp_demo) = myApp # Note Plus the alphabetical order, otherwise it is easy to enable its role to allow the compiler to access the MyApp you created. The Makefile of the catalog. It is added to the line, and the path arrangement in this file is in the English alphabetical order, you are not more than the unique, according to this order, add your MyApp directory path!
Step 4: The next step is to modify the most important 2 files to the compiler in the UClinux 2.4.x system: ../config/config.in (1) ../config/configure.help (2) ../ Config / AutoConf.h (3) {[<(This file cannot be modified manually, the system will automatically modify it)>]}
Step 5: Open 'config.in' file, first copy the following content: #################################################################################################################################################################################################################################################################### ##################################################################################
MainMenu_Option next_comment comment 'my new application'
BOOL 'DEMO' config_user_myapp_demo bool 'app1' config_user_myapp_App1 Bool 'app2' config_user_myapp_app2 bool 'app3' config_user_myapp_app3 Comment "My New Application"
Endmenu
######################################################################################################################################################################################################################################################################################################## ##########################################
Step 6: make Xconfig, see the picture below! Your work is very successful!
STEP 7: I believe that next steps are very familiar: make Dep make clean make lib_only (can be only once, no need to come) Make User_only (After each modified your application, this step behind Must come back) Make Romfs make Image make step 8: Download Image.Rom To your board! Run it!