public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] linking a program for download to at91sam7x-resident redboot
@ 2009-03-20 15:30 Robert Brusa
  2009-03-20 15:41 ` Chris Zimman
  2009-03-20 16:01 ` [ECOS] " John Dallaway
  0 siblings, 2 replies; 6+ messages in thread
From: Robert Brusa @ 2009-03-20 15:30 UTC (permalink / raw)
  To: ecos-discuss

Hi
I have configured, linked and downloaded redboot into my at91sam7x board.  
Its a minimum redboot, supporting only ser0 and ser1 for direct download  
into flash.

Then I wanted to change my little hello-program by linking it in such a  
way to go above redboot in the flash. Actually I placed it at 0x00120000 -  
far above redboot - by editing the ecos-provided target.ld-file. The  
memory-statement in this file now reads like this:

MEMORY
{
     ram : ORIGIN = 0x00200000, LENGTH = 0x20000
     rom : ORIGIN = 0x00120000, LENGTH = 0x80000
}

However, when running the linker, it produces errors and reports vectors  
etc. to be out of rom range. Correct, but I think I do not need these  
vectors here. What else do I have to change in the loader file (or  
elswhere) to get a linked program to be downloadable to/with redboot where  
it will be launched by a cor. redboot command (or a script later on)?  
Thanks for help.
    Robert

-- 
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] 6+ messages in thread

* RE: [ECOS] linking a program for download to at91sam7x-resident redboot
  2009-03-20 15:30 [ECOS] linking a program for download to at91sam7x-resident redboot Robert Brusa
@ 2009-03-20 15:41 ` Chris Zimman
  2009-03-23  9:21   ` Robert Brusa
  2009-03-20 16:01 ` [ECOS] " John Dallaway
  1 sibling, 1 reply; 6+ messages in thread
From: Chris Zimman @ 2009-03-20 15:41 UTC (permalink / raw)
  To: Bob.Brusa, ecos-discuss

> Then I wanted to change my little hello-program by linking it in such a
> way to go above redboot in the flash. Actually I placed it at
> 0x00120000 -
> far above redboot - by editing the ecos-provided target.ld-file. The
> memory-statement in this file now reads like this:
> 
> MEMORY
> {
>      ram : ORIGIN = 0x00200000, LENGTH = 0x20000
>      rom : ORIGIN = 0x00120000, LENGTH = 0x80000
> }
> 
> However, when running the linker, it produces errors and reports
> vectors
> etc. to be out of rom range. Correct, but I think I do not need these
> vectors here. What else do I have to change in the loader file (or
> elswhere) to get a linked program to be downloadable to/with redboot
> where
> it will be launched by a cor. redboot command (or a script later on)?

I'm assuming you're going to relocate this into RAM (eg. you're using FIS,
and the 'load') before running.  
If that's the case, you don't need to change the target.ld file.  Apologies
in advance if I'm mistaken, but 
a little more info on what exactly you're doing would be useful.

--Chris

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

* [ECOS] Re: linking a program for download to at91sam7x-resident redboot
  2009-03-20 15:30 [ECOS] linking a program for download to at91sam7x-resident redboot Robert Brusa
  2009-03-20 15:41 ` Chris Zimman
@ 2009-03-20 16:01 ` John Dallaway
  2009-03-24  9:40   ` Robert Brusa
  1 sibling, 1 reply; 6+ messages in thread
From: John Dallaway @ 2009-03-20 16:01 UTC (permalink / raw)
  To: Bob.Brusa; +Cc: eCos Discussion

Hi Robert

Robert Brusa wrote:

> I have configured, linked and downloaded redboot into my at91sam7x
> board. Its a minimum redboot, supporting only ser0 and ser1 for direct
> download into flash.
> 
> Then I wanted to change my little hello-program by linking it in such a
> way to go above redboot in the flash. Actually I placed it at 0x00120000
> - far above redboot - by editing the ecos-provided target.ld-file. The
> memory-statement in this file now reads like this:
> 
> MEMORY
> {
>     ram : ORIGIN = 0x00200000, LENGTH = 0x20000
>     rom : ORIGIN = 0x00120000, LENGTH = 0x80000
> }
> 
> However, when running the linker, it produces errors and reports vectors
> etc. to be out of rom range. Correct, but I think I do not need these
> vectors here. What else do I have to change in the loader file (or
> elswhere) to get a linked program to be downloadable to/with redboot
> where it will be launched by a cor. redboot command (or a script later
> on)? Thanks for help.

You should be able to specify the desired address of your eCos ROM
startup application image via the CYGNUM_HAL_ARM_AT91_IMAGE_ADDRESS
option which appears to have been implemented for exactly the purpose
you describe.

John Dallaway

-- 
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] 6+ messages in thread

* Re: [ECOS] linking a program for download to at91sam7x-resident  redboot
  2009-03-20 15:41 ` Chris Zimman
@ 2009-03-23  9:21   ` Robert Brusa
  2009-03-24  0:23     ` Chris Zimman
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Brusa @ 2009-03-23  9:21 UTC (permalink / raw)
  To: Chris Zimman, ecos-discuss

On Fri, 20 Mar 2009 16:14:37 +0100, Chris Zimman <czimman@bloomberg.com>  
wrote:

>> Then I wanted to change my little hello-program by linking it in such a
>> way to go above redboot in the flash. Actually I placed it at
>> 0x00120000 -
>> far above redboot - by editing the ecos-provided target.ld-file. The
>> memory-statement in this file now reads like this:
>>
>> MEMORY
>> {
>>      ram : ORIGIN = 0x00200000, LENGTH = 0x20000
>>      rom : ORIGIN = 0x00120000, LENGTH = 0x80000
>> }
>>
>> However, when running the linker, it produces errors and reports
>> vectors
>> etc. to be out of rom range. Correct, but I think I do not need these
>> vectors here. What else do I have to change in the loader file (or
>> elswhere) to get a linked program to be downloadable to/with redboot
>> where
>> it will be launched by a cor. redboot command (or a script later on)?
>
> I'm assuming you're going to relocate this into RAM (eg. you're using  
> FIS,
> and the 'load') before running.
> If that's the case, you don't need to change the target.ld file.   
> Apologies
> in advance if I'm mistaken, but
> a little more info on what exactly you're doing would be useful.
>
> --Chris

Hi Chris
well, this little hello-program I want to launch from redboot is just my  
example to climb the learning curve of how it has to be done. The  
code-part of the program I ultimately want to launch from redboot is too  
big to go into RAM. So it has to run from flash.  And I need redboot to  
have a loader on board, so the application can be updated if required.  
Unfortunately I can not use the bootloader that comes with all  
AT91SAM7x-based systems, because it (SAM_BA) supports USB and the serial  
debug-I/F only and both of them are not implemented (not accesible) on the  
board I am using here - hence (a minimum) redboot was identified as the  
solution of the problem.

The FIS in my case only has to take a small script that launches my big-ap  
if UART0 or UART1 does not receive a ctrl-c character during a timeout  
interval of a few seconds. In such a case it would abort the script and  
one would be able to use redboot for downloading a program (direct load  
into flash).  Any comments on these ideas?
   Regards, Robert

-- 
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] 6+ messages in thread

* RE: [ECOS] linking a program for download to at91sam7x-resident redboot
  2009-03-23  9:21   ` Robert Brusa
@ 2009-03-24  0:23     ` Chris Zimman
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Zimman @ 2009-03-24  0:23 UTC (permalink / raw)
  To: Bob.Brusa, ecos-discuss

> well, this little hello-program I want to launch from redboot is just
> my example to climb the learning curve of how it has to be done. The
> code-part of the program I ultimately want to launch from redboot is
> too big to go into RAM. So it has to run from flash.  And I need redboot to
> have a loader on board, so the application can be updated if required.
> Unfortunately I can not use the bootloader that comes with all
> AT91SAM7x-based systems, because it (SAM_BA) supports USB and the
> serial debug-I/F only and both of them are not implemented (not accesible)
on
> the board I am using here - hence (a minimum) redboot was identified as the
> solution of the problem.
> 
> The FIS in my case only has to take a small script that launches my
> big-app if UART0 or UART1 does not receive a ctrl-c character during a
timeout
> interval of a few seconds. In such a case it would abort the script and
> one would be able to use redboot for downloading a program (direct load
> into flash).  Any comments on these ideas?

Hi Robert,

I don't know the AT91SAM7 stuff too well, but I guess as was pointed out,
there's a CDL option to change the startup location of a flash app just for
the AT91s.  From the perspective of what you're trying to do with Redboot and
the timeouts, there shouldn't be any problem.  I don't know the specifics of
that particular AT91 option, and how it behaves, but fundamentally, there's
nothing wrong with what you're trying to do.

--Chris

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

* [ECOS] Re: linking a program for download to at91sam7x-resident redboot
  2009-03-20 16:01 ` [ECOS] " John Dallaway
@ 2009-03-24  9:40   ` Robert Brusa
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Brusa @ 2009-03-24  9:40 UTC (permalink / raw)
  To: John Dallaway; +Cc: eCos Discussion

On Fri, 20 Mar 2009 16:29:40 +0100, John Dallaway <john@dallaway.org.uk>  
wrote:

> Hi Robert
>
> Robert Brusa wrote:
>
>> I have configured, linked and downloaded redboot into my at91sam7x
>> board. Its a minimum redboot, supporting only ser0 and ser1 for direct
>> download into flash.
>>
>> Then I wanted to change my little hello-program by linking it in such a
>> way to go above redboot in the flash. Actually I placed it at 0x00120000
>> - far above redboot - by editing the ecos-provided target.ld-file. The
>> memory-statement in this file now reads like this:
>>
>> MEMORY
>> {
>>     ram : ORIGIN = 0x00200000, LENGTH = 0x20000
>>     rom : ORIGIN = 0x00120000, LENGTH = 0x80000
>> }
>>
>> However, when running the linker, it produces errors and reports vectors
>> etc. to be out of rom range. Correct, but I think I do not need these
>> vectors here. What else do I have to change in the loader file (or
>> elswhere) to get a linked program to be downloadable to/with redboot
>> where it will be launched by a cor. redboot command (or a script later
>> on)? Thanks for help.
>
> You should be able to specify the desired address of your eCos ROM
> startup application image via the CYGNUM_HAL_ARM_AT91_IMAGE_ADDRESS
> option which appears to have been implemented for exactly the purpose
> you describe.
>
> John Dallaway

Hi John and Chris
thank you for the hint. It helped. Now its working.
    Robert

-- 
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] 6+ messages in thread

end of thread, other threads:[~2009-03-24  8:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-20 15:30 [ECOS] linking a program for download to at91sam7x-resident redboot Robert Brusa
2009-03-20 15:41 ` Chris Zimman
2009-03-23  9:21   ` Robert Brusa
2009-03-24  0:23     ` Chris Zimman
2009-03-20 16:01 ` [ECOS] " John Dallaway
2009-03-24  9:40   ` Robert Brusa

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