This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Porting trouble
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Christer Kaivo-oja <christer dot kaivo at kvaser dot se>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Fri, 24 May 2002 11:10:30 +0200
- Subject: Re: [ECOS] Porting trouble
- References: <200205240900.g4O90hE25022@ascomax.hasler.ascom.ch>
On Fri, May 24, 2002 at 10:55:21AM +0200, Christer Kaivo-oja wrote:
> Hi.
>
> I am currently trying to make a platform port of eCos onto a strongarm 1110
> board (Keith & Koep's Trizeps board). Now, I'm having trouble getting
> started...
>
> What I am trying to do it to get _any_ indication that code is actually
> running or if it's in some form of exception state... I am basing my port on
> the assabet platform.
>
> What I've done so far is to try to find the _first_ piece of code that's run
> at startup and put a small "flash-the-diodes" endless loop before anything
> happens, but there is no response... As far as I've seen, it's the
> reset_vector function in packages/hal/arm/arch/current/src/vectors.S that
> should be the entry point. Am I right in this?
>
> I am able to compile a stand-alone diode flashing program and download it to
> the target. I'm not too familiar with the linker scripts either, so I'm sort
> of stuck... Anyone have ideas?
The ARM HAL should already be playing with the LEDs, assuming the
specific target supports LEDs. See the comment in vectors.S
// CYGHWR_LED_MACRO can be defined in hal_platform_setup.h. It's free to
// use r0+r1. Argument is in "\x" - cannot use macro arguments since the
// macro may contain #-chars and use of arguments cause these to be
// interpreted as CPP stringify operators.
// See example in PID hal_platform_setup.h.
But later on its says...
// We cannot access any LED registers until after PLATFORM_SETUP1
I guess this is because before PLATFORM_SETUP1 nothing is setup, The
GPIO pins connected to the LEDs could inputs not outputs etc....
You probably want to look at the PLATFORM_SETUP1 macro and see where
its safe to start using LEDs and work from there.
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss