public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] simple question regarding hello.c world and Redboot
@ 2012-01-16 23:17 Stephen Polkowski
  2012-01-16 23:28 ` Frank Pagliughi
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Polkowski @ 2012-01-16 23:17 UTC (permalink / raw)
  To: ecos-discuss

Hello,

	I'm having difficulty in getting a simple application like hello.c to 
run with Redboot on the pc.  When I run hello from GDB I don't see any 
printfs on the screen.  I'm stumped as to my mistake.

	My simple question is should I compile my hello.c application against 
the Redboot build tree or the generic pc build tree?  I assume
that I should be building it against the generic pc tree.

	When I try to build the hello.c app against the redboot tree
it fails because printf function isn't in the library.

hello.c:6: warning: implicit declaration of function 'printf'
hello.c:6: warning: incompatible implicit declaration of built-in 
function 'printf'
i386-elf-gcc -L/home/users/stephen/ecos/redboot_i82559/install/lib 
-nostartfiles -Wl,--gc-sections -Wl,--Map -Wl,hello.map -o hello hello.o 
-Ttarget.ld -nostdlib
/home/users/stephen/ecos/redboot_i82559/install/lib/libtarget.a(redboot_main.o): 
In function `cyg_start':
/opt/ecos/ecos/packages/redboot/current/src/main.c:264: undefined 
reference to `RedBoot_version'
collect2: ld returned 1 exit status

	Therefore, I've been building hello.c with the pc_i82559 tree.
Everything compiles just fine, except I don't see any printfs on the screen.

ecosconfig new pc_i82559
ecosconfig check
ecosconfig tree
make

cd app
make
i386-elf-gcc -c -o hello.o -g 
-I/home/users/stephen/ecos/pc_i82559/install/include -Wall 
-ffunction-sections -fdata-sections hello.c
i386-elf-gcc -L/home/users/stephen/ecos/pc_i82559/install/lib 
-nostartfiles -Wl,--gc-sections -Wl,--Map -Wl,hello.map -o hello hello.o 
-Ttarget.ld -nostdlib

gdb hello
(gdb) target remote 10.40.200.22:9000
Remote debugging using 10.40.200.22:9000
0x00114398 in ?? ()
(gdb) load hello
Loading section .text, size 0x8cf6 lma 0x208000
Loading section .rodata, size 0x8e8 lma 0x210cf8
Loading section .data, size 0x240 lma 0x2115e0
Start address 0x208000, load size 38942
Transfer rate: 381784 bits/sec, 499 bytes/write.
(gdb) continue
Continuing.


	I realize that the default pc_i82559 build disables rom monitor support 
and I've been fiddling with different settings but I haven't got it 
figured out.

	Could someone share the obvious configuration for enabling Redboot gdb 
support to a basic hello.c app for the pc_i82559 build?  I'm shocked 
that I can't figure this one out.

Thanks for your help,

Stephen

	



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] simple question regarding hello.c world and Redboot
  2012-01-16 23:17 [ECOS] simple question regarding hello.c world and Redboot Stephen Polkowski
@ 2012-01-16 23:28 ` Frank Pagliughi
  2012-01-16 23:33   ` Stephen Polkowski
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Pagliughi @ 2012-01-16 23:28 UTC (permalink / raw)
  To: Stephen Polkowski; +Cc: ecos-discuss

On 01/16/2012 06:16 PM, Stephen Polkowski wrote:
> Hello,
>
>     I'm having difficulty in getting a simple application like hello.c 
> to run with Redboot on the pc.  When I run hello from GDB I don't see 
> any printfs on the screen.  I'm stumped as to my mistake.
>

By default the output comes out the serial port. Check COM1.


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] simple question regarding hello.c world and Redboot
  2012-01-16 23:28 ` Frank Pagliughi
@ 2012-01-16 23:33   ` Stephen Polkowski
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Polkowski @ 2012-01-16 23:33 UTC (permalink / raw)
  To: Frank Pagliughi; +Cc: ecos-discuss


Aaaaaaaaaaaaaauuuuuugggggggggggggggggggggggggggghhhhhhhhhhhh!

[the sound of Charlie Brown missing the football]

Thanks Frank!

Stephen


Frank Pagliughi wrote:
> On 01/16/2012 06:16 PM, Stephen Polkowski wrote:
>> Hello,
>>
>>     I'm having difficulty in getting a simple application like hello.c 
>> to run with Redboot on the pc.  When I run hello from GDB I don't see 
>> any printfs on the screen.  I'm stumped as to my mistake.
>>
> 
> By default the output comes out the serial port. Check COM1.
> 

-- 
Stephen Polkowski
Centaur Technology
Austin, TX
(512) 418-5730

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-16 23:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-16 23:17 [ECOS] simple question regarding hello.c world and Redboot Stephen Polkowski
2012-01-16 23:28 ` Frank Pagliughi
2012-01-16 23:33   ` Stephen Polkowski

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).