Re: Basic query on application development



On a sunny day (Thu, 28 Jun 2007 11:33:37 -0000) it happened kracks
<kirthikaiitm@xxxxxxxxx> wrote in
<1183030417.717442.56150@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>:

Hi,
I am pretty new to Linux.
I am working with ARM9 (s3c2440 )CPU
I ported Linux to target device.
Now i want to develop a small Application in Linux.
I am not sure how to start with.
First i think i hv to make a simple C (file) application (Eg ."hello
world")

I do it usually this way, as you probably have a cross compiler for arm,
I write it in normal C, create a makefile with a define that defines the compiler,
Then I compile it first for the PC (x86) (for all parts that are not hardware specific),
and run it, in your case that would just run it and print 'hello world' on the PC.
Then I change the define for the cross compiler, compile it again with
all hardware specific stuff enabled, and upload it to the embedded system,
then connect to the embedded system via -whatever, for example serial link-
and try to run it. Most of that can be scripted.
At least this guarantees your basic code is OK before you try to run it on the target.
Just develop small pieces at the time, works for modules too.
There may be issues like your embedded system runs kernel 2.4 and your PC 2.6, just
find a way around that.

El Pante

.



Relevant Pages

  • Re: Basic query on application development
    ... I ported Linux to target device. ... I do it usually this way, as you probably have a cross compiler for arm, ... upload it to the embedded system, then connect to the embedded system via ...
    (comp.os.linux.development.apps)
  • Re: Use of C99 int types
    ... > those that actually are part of the C-implementation for Linux. ... the kernel definitions are part of /usr/include). ... The kernel uses __foobar stuff provided by the compiler because it has ... > the Gimp and GCC run on completely different architectures aswell. ...
    (Linux-Kernel)
  • Re: function pointers
    ... I am using gcc under ... gdb, and the compiler, exactly like in 1986 when I first started using ... when running on linux, I usually use gedit or kedit. ... There is only one debugger: ...
    (comp.lang.c)
  • Re: 1] UNIX/LINUX Compilation 2] IDE
    ... under Unix or Linux? ... compiler, and Josh Vanderhoof's Cross ELF linker. ... AFAICT, RHIDE is the only ... VIM is in some ways as good as GNU Emacs ...
    (comp.os.msdos.djgpp)
  • Re: Use of C99 int types
    ... the compiler. ... > Except the kernel wants to be optimized and work and use what features ... And where exactly are linux and libc when compiling code for an ... Just to make the bloody point GCC is not dependent on Linux in any way ...
    (Linux-Kernel)