* [ECOS] Port problem
@ 2001-08-16 11:00 Cristiano Ligieri Pereira
2001-08-16 22:47 ` Cristiano Ligieri Pereira
0 siblings, 1 reply; 8+ messages in thread
From: Cristiano Ligieri Pereira @ 2001-08-16 11:00 UTC (permalink / raw)
To: ecos-discuss
Hi all,
I'm porting eCos to a XScale based platform. The board have Cygmon in its
Flash memory, which is invoked at reset time. I can load an eCos
application in it (I'm modifying the port to IQ80310). So far I have
modified the file PLATFORM_SETUP1, in which I change the memory map and
initialize (or re-initialize since cygmon initialize them already) all the
necessary components (caches, BTB, MMU, etc...). All this seems to work
fine. The memory mapping is changed so that I have SDRAM at address 0x0.
Now I'm a little confused on how to make the serial communication work. I
can download an application using GDB. So obviously there is a connection
between the target and the GDB in the host. What should I do to keep using
this connection to send debugging messages to the host? Or should I break
this connection and restart it somehow?
Thanks in advance,
Cristiano.
------------------------------------------------------------
Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ECOS] Port problem
2001-08-16 11:00 [ECOS] Port problem Cristiano Ligieri Pereira
@ 2001-08-16 22:47 ` Cristiano Ligieri Pereira
2001-08-17 2:50 ` Jesper Skov
2001-08-17 5:36 ` Gary Thomas
0 siblings, 2 replies; 8+ messages in thread
From: Cristiano Ligieri Pereira @ 2001-08-16 22:47 UTC (permalink / raw)
To: ecos-discuss
Hi again!
I don't know whether my previous question made no sense or if it was too
simple... since I've got no answer. :-|
I'm working on the port of an XScale based platform. So far I have done a
reasonable progress (in my opinion...) but now I'm kind of stuck. :(
I started the port copying the IQ80310 and modifying it's files since both
platforms are quite different (except the processor, obviously). Then the
next thing I did was to clean up the macro PLATFORM_SETUP1 so that the
specific IQ80310 initializations were removed and the specific
initializations of my platform were inserted (those I got from CygMon
source code). After this I've changed the memory map (that I actually sent
to this list yesterday) so that I have RAM at 0x0.
After this I've been trying two things: load a Hello World eCos
application configured to execute on RAM (by means of GDB/Cygmon) and load
RedBoot configured to execute at RAM as well. For both I load the
application at the original RAM address (since for cygmon this is still
the RAM memory address) and for both I'm executing the code in
PLATFORM_SETUP1, which remaps the memory.
When I try to execute the Hello World application the code crashes when
calling diag_printf function in the main body. For the RAM/RedBoot code it
is crashing when cleaning the BSS (I've checked the addresses I'm hitting
and they fall within the original memory addresses 0xC0000000).
how should I do about the serial communication with the host? Can I reuse
the communication already established with CygMon? Do I need to break it
and restart a new connection?
Am I on the right track? I was feeling good about it till two days
ago. But now that I'm stuck I getting frustrated instead. :-|
Thanks again,
Cristiano.
> Hi all,
>
> I'm porting eCos to a XScale based platform. The board have Cygmon in its
> Flash memory, which is invoked at reset time. I can load an eCos
> application in it (I'm modifying the port to IQ80310). So far I have
> modified the file PLATFORM_SETUP1, in which I change the memory map and
> initialize (or re-initialize since cygmon initialize them already) all the
> necessary components (caches, BTB, MMU, etc...). All this seems to work
> fine. The memory mapping is changed so that I have SDRAM at address 0x0.
>
> Now I'm a little confused on how to make the serial communication work. I
> can download an application using GDB. So obviously there is a connection
> between the target and the GDB in the host. What should I do to keep using
> this connection to send debugging messages to the host? Or should I break
> this connection and restart it somehow?
>
> Thanks in advance,
> Cristiano.
>
> ------------------------------------------------------------
> Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ECOS] Port problem
2001-08-16 22:47 ` Cristiano Ligieri Pereira
@ 2001-08-17 2:50 ` Jesper Skov
2001-08-17 5:10 ` Mark Salter
2001-08-17 5:36 ` Gary Thomas
1 sibling, 1 reply; 8+ messages in thread
From: Jesper Skov @ 2001-08-17 2:50 UTC (permalink / raw)
To: Cristiano Ligieri Pereira; +Cc: ecos-discuss
>>>>> "Cristiano" == Cristiano Ligieri Pereira <cpereira@ics.uci.edu> writes:
Cristiano> After this I've been trying two things: load a Hello World
Cristiano> eCos application configured to execute on RAM (by means of
Cristiano> GDB/Cygmon) and load RedBoot configured to execute at RAM
Cristiano> as well. For both I load the application at the original
Cristiano> RAM address (since for cygmon this is still the RAM memory
Cristiano> address) and for both I'm executing the code in
Cristiano> PLATFORM_SETUP1, which remaps the memory.
Diddling the MMU when running from RAM is not going to work unless you
are really careful!
Cristiano> how should I do about the serial communication with the
Cristiano> host? Can I reuse the communication already established
Cristiano> with CygMon? Do I need to break it and restart a new
Cristiano> connection?
The problem is probably that the eCos application will try to use
virtual vectors for writing to the serial port: but these may not be
compatible with CygMon.
Running RedBoot from RAM should work though (as it will initialize the
virtual vectors and use its own serial driver).
Jesper
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ECOS] Port problem
2001-08-17 2:50 ` Jesper Skov
@ 2001-08-17 5:10 ` Mark Salter
2001-08-17 7:56 ` Cristiano Ligieri Pereira
0 siblings, 1 reply; 8+ messages in thread
From: Mark Salter @ 2001-08-17 5:10 UTC (permalink / raw)
To: jskov; +Cc: cpereira, ecos-discuss
>>>>> Jesper Skov writes:
>>>>> "Cristiano" == Cristiano Ligieri Pereira <cpereira@ics.uci.edu> writes:
Cristiano> After this I've been trying two things: load a Hello World
Cristiano> eCos application configured to execute on RAM (by means of
Cristiano> GDB/Cygmon) and load RedBoot configured to execute at RAM
Cristiano> as well. For both I load the application at the original
Cristiano> RAM address (since for cygmon this is still the RAM memory
Cristiano> address) and for both I'm executing the code in
Cristiano> PLATFORM_SETUP1, which remaps the memory.
> Diddling the MMU when running from RAM is not going to work unless you
> are really careful!
Cristiano> how should I do about the serial communication with the
Cristiano> host? Can I reuse the communication already established
Cristiano> with CygMon? Do I need to break it and restart a new
Cristiano> connection?
> The problem is probably that the eCos application will try to use
> virtual vectors for writing to the serial port: but these may not be
> compatible with CygMon.
> Running RedBoot from RAM should work though (as it will initialize the
> virtual vectors and use its own serial driver).
And PLATFORM_SETUP1 is a no-op for RAM-based RedBoots, at least
for iq80310.
--Mark
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ECOS] Port problem
2001-08-16 22:47 ` Cristiano Ligieri Pereira
2001-08-17 2:50 ` Jesper Skov
@ 2001-08-17 5:36 ` Gary Thomas
2001-08-17 11:07 ` Cristiano Ligieri Pereira
1 sibling, 1 reply; 8+ messages in thread
From: Gary Thomas @ 2001-08-17 5:36 UTC (permalink / raw)
To: Cristiano Ligieri Pereira; +Cc: ecos-discuss
On 17-Aug-2001 Cristiano Ligieri Pereira wrote:
>
> Hi again!
>
> I don't know whether my previous question made no sense or if it was too
> simple... since I've got no answer. :-|
>
> I'm working on the port of an XScale based platform. So far I have done a
> reasonable progress (in my opinion...) but now I'm kind of stuck. :(
>
> I started the port copying the IQ80310 and modifying it's files since both
> platforms are quite different (except the processor, obviously). Then the
> next thing I did was to clean up the macro PLATFORM_SETUP1 so that the
> specific IQ80310 initializations were removed and the specific
> initializations of my platform were inserted (those I got from CygMon
> source code). After this I've changed the memory map (that I actually sent
> to this list yesterday) so that I have RAM at 0x0.
>
You built this CygMon yourself? If so, what was the source code base?
Note: we really only support RedBoot on the XScale, not CygMon.
> After this I've been trying two things: load a Hello World eCos
> application configured to execute on RAM (by means of GDB/Cygmon) and load
> RedBoot configured to execute at RAM as well. For both I load the
> application at the original RAM address (since for cygmon this is still
> the RAM memory address) and for both I'm executing the code in
> PLATFORM_SETUP1, which remaps the memory.
>
> When I try to execute the Hello World application the code crashes when
> calling diag_printf function in the main body. For the RAM/RedBoot code it
> is crashing when cleaning the BSS (I've checked the addresses I'm hitting
> and they fall within the original memory addresses 0xC0000000).
>
This tells me that you may have a memory mapping problem.
eCos programs expect the memory map to be somewhat different than the hardware
map. Most particularly, DRAM gets moved to 0x00000000 and the FLASH at 0
gets moved around as well. On some XScale platforms, this is even trickier,
but the basic idea is the same.
> how should I do about the serial communication with the host? Can I reuse
> the communication already established with CygMon? Do I need to break it
> and restart a new connection?
>
No.
> Am I on the right track? I was feeling good about it till two days
> ago. But now that I'm stuck I getting frustrated instead. :-|
>
I think you should look into getting RedBoot working as your base debug
environment.
> Thanks again,
> Cristiano.
>
>> Hi all,
>>
>> I'm porting eCos to a XScale based platform. The board have Cygmon in its
>> Flash memory, which is invoked at reset time. I can load an eCos
>> application in it (I'm modifying the port to IQ80310). So far I have
>> modified the file PLATFORM_SETUP1, in which I change the memory map and
>> initialize (or re-initialize since cygmon initialize them already) all the
>> necessary components (caches, BTB, MMU, etc...). All this seems to work
>> fine. The memory mapping is changed so that I have SDRAM at address 0x0.
>>
>> Now I'm a little confused on how to make the serial communication work. I
>> can download an application using GDB. So obviously there is a connection
>> between the target and the GDB in the host. What should I do to keep using
>> this connection to send debugging messages to the host? Or should I break
>> this connection and restart it somehow?
>>
>> Thanks in advance,
>> Cristiano.
>>
>> ------------------------------------------------------------
>> Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ECOS] Port problem
2001-08-17 5:10 ` Mark Salter
@ 2001-08-17 7:56 ` Cristiano Ligieri Pereira
0 siblings, 0 replies; 8+ messages in thread
From: Cristiano Ligieri Pereira @ 2001-08-17 7:56 UTC (permalink / raw)
To: Mark Salter; +Cc: jskov, ecos-discuss
> And PLATFORM_SETUP1 is a no-op for RAM-based RedBoots, at least
> for iq80310.
Yes, it is. But I'm forcing to execute it so that I'm able to remmap
memory. So shouldn't I remmap the memory when executing RedBoot from RAM
then?
Thanks,
Cristiano.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ECOS] Port problem
2001-08-17 5:36 ` Gary Thomas
@ 2001-08-17 11:07 ` Cristiano Ligieri Pereira
2001-08-17 11:14 ` Gary Thomas
0 siblings, 1 reply; 8+ messages in thread
From: Cristiano Ligieri Pereira @ 2001-08-17 11:07 UTC (permalink / raw)
To: Gary Thomas; +Cc: ecos-discuss
> You built this CygMon yourself? If so, what was the source code base?
>
> Note: we really only support RedBoot on the XScale, not CygMon.
I didn't build it but I have the sources from Intel. The addressesare the
following (file elf-lrh-rom.specs):
*link:
-T bsp.ld%s -Ttext 0x00000000 -Tdata 0xc0000000 %(old_link)
> This tells me that you may have a memory mapping problem.
>
> eCos programs expect the memory map to be somewhat different than the hardware
> map. Most particularly, DRAM gets moved to 0x00000000 and the FLASH at 0
> gets moved around as well. On some XScale platforms, this is even trickier,
> but the basic idea is the same.
That's why I'm forcing to execute PLATFORM_SETUP1 and remapping the memory
there according to what you've just said. But it looks like I'm missing
something then.
> > how should I do about the serial communication with the host? Can I reuse
> > the communication already established with CygMon? Do I need to break it
> > and restart a new connection?
> >
>
> No.
The No refers to which question? :-)
> I think you should look into getting RedBoot working as your base debug
> environment.
Ok. I'll do that.
Cristiano.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ECOS] Port problem
2001-08-17 11:07 ` Cristiano Ligieri Pereira
@ 2001-08-17 11:14 ` Gary Thomas
0 siblings, 0 replies; 8+ messages in thread
From: Gary Thomas @ 2001-08-17 11:14 UTC (permalink / raw)
To: Cristiano Ligieri Pereira; +Cc: ecos-discuss
On 17-Aug-2001 Cristiano Ligieri Pereira wrote:
>> > how should I do about the serial communication with the host? Can I reuse
>> > the communication already established with CygMon? Do I need to break it
>> > and restart a new connection?
>> >
>>
>> No.
>
It should not be necessary to restart any communications channel when you
run an eCos program. It should just work.
> The No refers to which question? :-)
>
>> I think you should look into getting RedBoot working as your base debug
>> environment.
>
> Ok. I'll do that.
>
Start with this. Once you have RedBoot working for the platform, you should
be in much better shape.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2001-08-17 11:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-16 11:00 [ECOS] Port problem Cristiano Ligieri Pereira
2001-08-16 22:47 ` Cristiano Ligieri Pereira
2001-08-17 2:50 ` Jesper Skov
2001-08-17 5:10 ` Mark Salter
2001-08-17 7:56 ` Cristiano Ligieri Pereira
2001-08-17 5:36 ` Gary Thomas
2001-08-17 11:07 ` Cristiano Ligieri Pereira
2001-08-17 11:14 ` Gary Thomas
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).