Re: Basic query on application development



Jan Panteltje wrote:

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

I would add that http://buildroot.uclibc.org/ gives a pretty civilised cross
compiler toolchain based on uClibc - can also generate a full linux system
with kernel, busybox, python, X and microperl if you wish. It's optional
how much you use. I believe it targets ARM9.

Cheers

Tim
.



Relevant Pages

  • Re: Advanced linker magic
    ... if there is no Linux inside ... > an embedded system was indirectly involved has nothing to do ... He explained that the linked (target) program needs to ... Tauno Voipio ...
    (comp.os.linux.development.apps)
  • Re: Basic query on application development
    ... I ported Linux to target device. ... I write it in normal C, create a makefile with a define that defines the compiler, ... then connect to the embedded system via -whatever, ...
    (comp.os.linux.development.apps)
  • Re: linux app to windows
    ... As you can see linux doesn't have a strlwr function so I need to define it, but windows has one. ... See the compiler documentation that would explain what preprocessor macros are pre-defined for you and look for something that would identify the target OS. ...
    (microsoft.public.vc.language)
  • Re: Development environments
    ... > basic as a language. ... REALBasic announced to include Linux as a target in their next version. ... The claim to be able to compiler even VB apps. ...
    (comp.os.linux.development.apps)
  • Re: linux app to windows
    ... As you can see linux doesn't have a strlwr function so I need to define it, but windows has one. ... See the compiler documentation that would explain what preprocessor macros are pre-defined for you and look for something that would identify the target OS. ...
    (microsoft.public.vc.language)