User's Manual

Network Utilities uClinux NEEK BSP
5.6 Adding New User Application
This section explains you of adding a user application named hello in uClinux.
Follow the steps below to add a new user application.
1. Create hello directory in the /home/uClinux/uClinux-dist/user directory.
2. Copy source file (C file) to the hello directory
3. Add the configuration variable hello to the user/Kconfig file:
config USER_HELLO
bool "hello"
help
help_words_here.....
This adds the hello menu option to the userland configuration menu.
4. Add following lines to the user/Makefile to add the hello directory in
compilation.
...
dir_$(CONFIG_USER_HELLO) += hello
...
5. Create the Makefile under user/hello directory as mentioned below to
compile the hello application.
EXEC = hello
OBJS = hello.o
all: $(EXEC)
$(EXEC): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
romfs:
$(ROMFSINST) /bin/$(EXEC)
clean:
-rm -f $(EXEC) *.elf *.gdb *.o
6. Build the kernel with this application and issue the following command to
view the output of this application.
/>hello
Here, you will see the output of your application.
32 System Level Solutions