public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] AT91sam7a guidance in porting
@ 2007-11-30  9:15 Meiring, H, Mnr <meiring@sun.ac.za>
  2007-11-30 15:50 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Meiring, H, Mnr <meiring@sun.ac.za> @ 2007-11-30  9:15 UTC (permalink / raw)
  To: ecos-discuss


Hi all,

I am planning to work most of the next month on the porting of the sam7a2 uC and drivers but would appreciate it if someone can guide me through the process please.

Current Project status: 

I copied at91sam7s platform/variant and renamed to at91sam7a and adjusted the ecos.db to make a target at91sam7a2 visible consisting only of the basic hal packages. 
CYGPKG_HAL_ARM
CYGPKG_HAL_ARM_AT91
CYGPKG_HAL_ARM_AT91SAM7A
I also adjusted the memory layout files to only run from ram.

This setup using the redboot template succesfully compiles providing me with an .elf image.

When using my sam-ice jtag device with gdb server and insight, redboot runs successfully, (according to me) I can do mfill, dump etc for the whole memory range over the usart.

What next? I suppose I need to add a flash driver for the flash chips iplemented, but where to start. Or is there something else that I need to do first? 

I have not changed the timers, or the interrupts from the sam7s port.

In what order must the porting sections be attempted and tested. I know there is not a right and wrong order, but there should be a better and worse.

Regards
Hendrik Meiring
Stellenbosch University
South Africa

--
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] AT91sam7a guidance in porting
  2007-11-30  9:15 [ECOS] AT91sam7a guidance in porting Meiring, H, Mnr <meiring@sun.ac.za>
@ 2007-11-30 15:50 ` Andrew Lunn
  2007-12-03  8:47   ` Meiring, H, Mnr <meiring@sun.ac.za>
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2007-11-30 15:50 UTC (permalink / raw)
  To: Meiring, H, Mnr <meiring@sun.ac.za>; +Cc: ecos-discuss

On Fri, Nov 30, 2007 at 10:56:16AM +0200, Meiring, H, Mnr <meiring@sun.ac.za> wrote:
> 
> Hi all,
> 
> I am planning to work most of the next month on the porting of the sam7a2 uC and drivers but would appreciate it if someone can guide me through the process please.
> 
> Current Project status: 
> 
> I copied at91sam7s platform/variant and renamed to at91sam7a and adjusted the ecos.db to make a target at91sam7a2 visible consisting only of the basic hal packages. 
> CYGPKG_HAL_ARM
> CYGPKG_HAL_ARM_AT91
> CYGPKG_HAL_ARM_AT91SAM7A
> I also adjusted the memory layout files to only run from ram.

I've not looked at the SAM7A2 much. Is it sufficiently different from
the SAM7 what it needs a whole new platform & variant? If it fits, i
would suggest extending the SAM7S package to cover the A2 as well.

> When using my sam-ice jtag device with gdb server and insight,
> redboot runs successfully, (according to me) I can do mfill, dump
> etc for the whole memory range over the usart.

I would run clocktruth and tm_basic, the kernel test programs. If
clock truth works correctly it means timers are O.K. and basic
interrupt handling is working. tm_basic is a good all round test.
Then just pick a few random tests and see if they work. You could
systematically run all the tests, but that takes a while.

> What next? I suppose I need to add a flash driver for the flash
> chips iplemented, but where to start.

Does the A2 have on-chip flash like the SAM7S? If so, it should be
very easy to make the existing driver work. Just add the cpu id.  If
it is an external chip, more work is needed. You need the generic
flash driver for the chip you have, plus a hardware specific driver
for your particular platform. This configures the generic driver for
your setup. Look at the other targets for examples.

What comes after that depends on what you want to do with the
hardware. Get the SPI working? Write an I2C driver etc...

          Andrew

-- 
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] AT91sam7a guidance in porting
  2007-11-30 15:50 ` Andrew Lunn
@ 2007-12-03  8:47   ` Meiring, H, Mnr <meiring@sun.ac.za>
  0 siblings, 0 replies; 3+ messages in thread
From: Meiring, H, Mnr <meiring@sun.ac.za> @ 2007-12-03  8:47 UTC (permalink / raw)
  To: Andrew Lunn, meiring; +Cc: ecos-discuss


> I've not looked at the SAM7A2 much. Is it sufficiently different from
> the SAM7 what it needs a whole new platform & variant? If it fits, i
> would suggest extending the SAM7S package to cover the A2 as well.

Nick Garnett did a port for ecoscentric, and we agreed that a seperate port will be cleaner as there are quite a few nigling differences between the uC's. There is however speculation that the a1 and a2 will be discontinued in the near future so yes, it seems more pratical to create its own variant.


> > When using my sam-ice jtag device with gdb server and insight,
> > redboot runs successfully, (according to me) I can do mfill, dump
> > etc for the whole memory range over the usart.

> I would run clocktruth and tm_basic, the kernel test programs. If
> clock truth works correctly it means timers are O.K. and basic
> interrupt handling is working. tm_basic is a good all round test.
> Then just pick a few random tests and see if they work. You could
> systematically run all the tests, but that takes a while.

Ok, just step by step to see if I uderstand you correctly. I am currently running the redboot elf image direct from ram using the Sam-ice JTAG device. 
Now I must build the kernel template I presume. 
When this is done, I must build the tm_basic test using the generated files from the last build and load the executable using redboot with its load with ymodem command.
The basic test should now be able to execute, or is there a better way. 

Regards
Hendrik Meiring





--
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:[~2007-12-03  8:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-30  9:15 [ECOS] AT91sam7a guidance in porting Meiring, H, Mnr <meiring@sun.ac.za>
2007-11-30 15:50 ` Andrew Lunn
2007-12-03  8:47   ` Meiring, H, Mnr <meiring@sun.ac.za>

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