public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "albert prasetyo" <prasetyoalbert@gmail.com>
To: "Sergei Gavrikov" <w3sg@softhome.net>
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] ecos application problem
Date: Mon, 03 Sep 2007 03:58:00 -0000	[thread overview]
Message-ID: <f231b81a0709022058h52f1159axee74efd63ef448bb@mail.gmail.com> (raw)
In-Reply-To: <20070901174802.GA6767@ubuntu>

Hi Sergei;
Thank you very much! Now everything just works.
It is arguable that the cause of my problem (i.e. mangled output) is the cflags.
The original compiler flags that i used is '-I$(INSTALL_DIR)/include'
replace it with your recommended cflags and my application runs properly.
Allow me to reproduce what I did earlier:
ROM mode
Using cygwin and hyperterminal in Windows environment:
1) Compile redboot using AT91RM9200 template with redboot packages.
2) Using ROM mode and without any Ethernet package, I modify nothing
else and start building the library.
3) put the redboot on the board
4) For building application library, repeat step 1 and 2 (only mode used is RAM)
5) start cygwin, go to ecos example folder, and open makefile
6) change the CFLAGS variable to '-O0 -g'
7) compile the application (e.g. hello.c from the ecos example, havent
tried Sergei's hello.c)
8) As Sergei advised, start gdb (only now from cygwin)
arm-elf-gdb -nw -nx -q hello
(gdb) set remotebaud 115200
(gdb) target remote /dev/com1
......//some characters printed (in my case "0x100054b4 in ?? ()")
(gdb) load
loading section .rom_vectors, size xxx lma yyy
loading section .text, size xxx lma yyy
loading section .rodata, size xxx lma yyy
loading section .data, size xxx lma yyy
start address xxx, load size yyy
transfer rate: xxx bits/sec, yyy bytes/write.
(gdb) cont
continuing.

Hello ecos World!

Hope this will help anyone that encounter same problem as me.

On 9/2/07, Sergei Gavrikov <w3sg@softhome.net> wrote:
> On Sat, Sep 01, 2007 at 05:35:47PM +0800, albert prasetyo wrote:
> > Hi Sergey;
> > Thank you for your info. It provides me further understanding on how
> > redboot and ecos work.  Actually, my board (AT91RM9200) is designed to
> > communicate through PC using 1 serial port only (DBGU port). Is there
> > any way to print "Hello World" (i.e. Application message) using only
> > one port?  Moreover, my board does not have spare LED, the LEDs are
> > only used to signal whether the board is turned on or not and Ethernet
> > connection.  Thank you for your attention.
>
> Be sure! I don't know your hardware, sorry. But, If I remember, you ran
> that eCos application using the RedBoot 'go' command and saw a mangled
> output, is it right? So, your eCos application works! Did you try to use
> GDB to download and run any eCos test? If you have a working RedBoot for
> your target and it (RedBoot) contains the GDB interface (cdl_interface
> CYGINT_HAL_DEBUG_GDB_STUBS), try to use even GDB 5.3 from eCosCentric.
>
> Just a conspectus (1-2-3), if you did install eCos stuff on Linux box...
>
> 1. Build eCos
>
> ecosconfig new "your_target_name" minimal \
> && ecosconfig tree \
> && make -s
>
> 2. Build a minimalist 'hello'
>
> cat <<_EOF>hello.c
> cyg_start(){diag_printf("hello, world!\n");}
> _EOF
>
> make hello CFLAGS='-O0 -g' LDFLAGS='-Linstall/lib -Ttarget.ld -nostdlib'
>
> 3. Run that 'hello' using GDB
>
> arm-elf-gdb -nw -nx -q hello
>
> Note: at the least, it's needed to connect itself using the GDB remote
> protocol (suppose, /dev/ttyS0 is your port), reset a board before to do
> this.
>
> On GDB promp (gdb) just try to enter commands (again, it's 1-2-3)
>
> target remote /dev/ttyS0
> load
> cont
>
> Are you seeing something now?
>
> If you aren't... Sorry. They talk that M$ + Cygwin + Insight + Java +
> Eclipse IDE + ... are good things for beginners. Sorry, I don't believe
> them.  They cannot say you, Let's do '1-2-3' and get the result. They
> offer a tour is containing a lot of screenshots...
>
> But, it's pretty simple just to grab and unpack ONE gnutools tarball for
> Linux (ftp://ecos.sourceware.org/pub/ecos/gnutools/i386linux) and get
> the result in a few minutes.
>
>
>        Sergei
>
>

PS: Sergei, when will you come to Singapore? I owe you a treat! =>

Regards;
Albert P

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  reply	other threads:[~2007-09-03  3:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-23 11:28 albert prasetyo
2007-08-23 22:47 ` Paul D. DeRocco
     [not found] ` <029201c7e5d3$ce0bd2d0$887ba8c0@PAULD>
2007-08-24  2:30   ` albert prasetyo
2007-08-24  3:53     ` Paul D. DeRocco
2007-08-24  6:06       ` Sergei Gavrikov
2007-08-27  5:53         ` albert prasetyo
2007-08-27  6:28           ` Sergei Gavrikov
2007-09-01  9:35             ` albert prasetyo
2007-09-01 17:49               ` Sergei Gavrikov
2007-09-03  3:58                 ` albert prasetyo [this message]
2007-09-03  7:05                   ` Sergei Gavrikov
2007-09-04  3:27                     ` albert prasetyo
2007-08-24  4:57     ` Alexey Shusharin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f231b81a0709022058h52f1159axee74efd63ef448bb@mail.gmail.com \
    --to=prasetyoalbert@gmail.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=w3sg@softhome.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).