* [ECOS] hal_platform_setup.h usage
@ 2007-06-28 15:50 Alexandre
2007-06-28 16:03 ` Andrew Lunn
0 siblings, 1 reply; 9+ messages in thread
From: Alexandre @ 2007-06-28 15:50 UTC (permalink / raw)
To: ecos-discuss
Hey everyone,
I'd like to use the macros included in the hal_platform_setup.h file.
How can I do that ?
--
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] 9+ messages in thread
* Re: [ECOS] hal_platform_setup.h usage
2007-06-28 15:50 [ECOS] hal_platform_setup.h usage Alexandre
@ 2007-06-28 16:03 ` Andrew Lunn
2007-06-28 16:12 ` Alexandre
0 siblings, 1 reply; 9+ messages in thread
From: Andrew Lunn @ 2007-06-28 16:03 UTC (permalink / raw)
To: Alexandre; +Cc: ecos-discuss
On Thu, Jun 28, 2007 at 05:28:56PM +0200, Alexandre wrote:
> Hey everyone,
>
> I'd like to use the macros included in the hal_platform_setup.h file.
> How can I do that ?
They are not designed to be used from application code.
Which macros are you interested in? What are you trying to do?
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] 9+ messages in thread
* Re: [ECOS] hal_platform_setup.h usage
2007-06-28 16:03 ` Andrew Lunn
@ 2007-06-28 16:12 ` Alexandre
2007-06-28 16:13 ` Slide
2007-06-28 16:15 ` Andrew Lunn
0 siblings, 2 replies; 9+ messages in thread
From: Alexandre @ 2007-06-28 16:12 UTC (permalink / raw)
To: Alexandre, ecos-discuss
I'm trying to initialize my eval board and use the leds on it.
I saw the macro
.macro _led x
on that file and thought i could use it -.-
--
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] 9+ messages in thread
* Re: [ECOS] hal_platform_setup.h usage
2007-06-28 16:12 ` Alexandre
@ 2007-06-28 16:13 ` Slide
2007-06-28 17:21 ` Alexandre
2007-06-28 16:15 ` Andrew Lunn
1 sibling, 1 reply; 9+ messages in thread
From: Slide @ 2007-06-28 16:13 UTC (permalink / raw)
To: ecos-discuss
On 6/28/07, Alexandre <thekyz@gmail.com> wrote:
> I'm trying to initialize my eval board and use the leds on it.
> I saw the macro
> .macro _led x
> on that file and thought i could use it -.-
>
Is writing to the LEDs that complex that you can't just rewrite the
code somewhere else? I would think that toggling some LEDs would be
simple, and providing a function in C even easier than the assembly.
--
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] 9+ messages in thread
* Re: [ECOS] hal_platform_setup.h usage
2007-06-28 16:12 ` Alexandre
2007-06-28 16:13 ` Slide
@ 2007-06-28 16:15 ` Andrew Lunn
1 sibling, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2007-06-28 16:15 UTC (permalink / raw)
To: Alexandre; +Cc: ecos-discuss
On Thu, Jun 28, 2007 at 05:34:44PM +0200, Alexandre wrote:
> I'm trying to initialize my eval board and use the leds on it.
> I saw the macro
> .macro _led x
> on that file and thought i could use it -.-
You can use that macro within the setup code, ie inside
hal_platform_setup. For application code there is often a
function, eg the AT91 boards have hal_at91_led().
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] 9+ messages in thread
* Re: [ECOS] hal_platform_setup.h usage
2007-06-28 16:13 ` Slide
@ 2007-06-28 17:21 ` Alexandre
2007-06-28 18:17 ` Alexandre
2007-06-28 18:32 ` Andrew Lunn
0 siblings, 2 replies; 9+ messages in thread
From: Alexandre @ 2007-06-28 17:21 UTC (permalink / raw)
To: Slide; +Cc: ecos-discuss
Slide wrote:
>Is writing to the LEDs that complex that you can't just rewrite the
>code somewhere else? I would think that toggling some LEDs would be
>simple, and providing a function in C even easier than the assembly.
Actually it's quite simple to toggle the leds, i was inquiring if
there was some "eCos way" to do it :)
Andrew wrote:
>You can use that macro within the setup code, ie inside
>hal_platform_setup. For application code there is often a
>function, eg the AT91 boards have hal_at91_led().
Thank you andrew i found the hal_lpc2xxx_set_leds() function, that's
exactly what i was seeking for !
So if i understand things correctly, the whole hal_platform_setup
thing is launched at startup ?
Can i modify that file to fit my platform specs ?
I'm using the olimex lpc2106 eval board package on an IAR kickstart
lpc2106 eval board and some things are a bit different here and there.
--
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] 9+ messages in thread
* Re: [ECOS] hal_platform_setup.h usage
2007-06-28 17:21 ` Alexandre
@ 2007-06-28 18:17 ` Alexandre
2007-06-28 18:32 ` Andrew Lunn
1 sibling, 0 replies; 9+ messages in thread
From: Alexandre @ 2007-06-28 18:17 UTC (permalink / raw)
To: Slide; +Cc: ecos-discuss
And additionaly, the function
externC void hal_lpc2xxx_set_leds(int mask);
is defined as is in hal_diag.h
Do you happend to know where the full definition is ? (do i have to
write it myself ?)
On 6/28/07, Alexandre <thekyz@gmail.com> wrote:
> Slide wrote:
> >Is writing to the LEDs that complex that you can't just rewrite the
> >code somewhere else? I would think that toggling some LEDs would be
> >simple, and providing a function in C even easier than the assembly.
>
> Actually it's quite simple to toggle the leds, i was inquiring if
> there was some "eCos way" to do it :)
>
> Andrew wrote:
> >You can use that macro within the setup code, ie inside
> >hal_platform_setup. For application code there is often a
> >function, eg the AT91 boards have hal_at91_led().
>
> Thank you andrew i found the hal_lpc2xxx_set_leds() function, that's
> exactly what i was seeking for !
>
> So if i understand things correctly, the whole hal_platform_setup
> thing is launched at startup ?
>
> Can i modify that file to fit my platform specs ?
>
> I'm using the olimex lpc2106 eval board package on an IAR kickstart
> lpc2106 eval board and some things are a bit different here and there.
>
--
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] 9+ messages in thread
* Re: [ECOS] hal_platform_setup.h usage
2007-06-28 17:21 ` Alexandre
2007-06-28 18:17 ` Alexandre
@ 2007-06-28 18:32 ` Andrew Lunn
2007-06-28 19:18 ` Alexandre
1 sibling, 1 reply; 9+ messages in thread
From: Andrew Lunn @ 2007-06-28 18:32 UTC (permalink / raw)
To: Alexandre; +Cc: ecos-discuss
> Andrew wrote:
> >You can use that macro within the setup code, ie inside
> >hal_platform_setup. For application code there is often a
> >function, eg the AT91 boards have hal_at91_led().
>
> Thank you andrew i found the hal_lpc2xxx_set_leds() function, that's
> exactly what i was seeking for !
>
> So if i understand things correctly, the whole hal_platform_setup
> thing is launched at startup ?
Correct. Take a look at the HAL porting guide. It should tell you more
about how the startup sequence works.
> Can i modify that file to fit my platform specs ?
>
> I'm using the olimex lpc2106 eval board package on an IAR kickstart
> lpc2106 eval board and some things are a bit different here and there.
You might want to make a new HAL package based on the nearest match.
Look at the porting guide and other HALs for ideas.
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] 9+ messages in thread
* Re: [ECOS] hal_platform_setup.h usage
2007-06-28 18:32 ` Andrew Lunn
@ 2007-06-28 19:18 ` Alexandre
0 siblings, 0 replies; 9+ messages in thread
From: Alexandre @ 2007-06-28 19:18 UTC (permalink / raw)
To: Alexandre, ecos-discuss
Oki, thank you very much for you answers :)
Alex
--
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] 9+ messages in thread
end of thread, other threads:[~2007-06-28 16:15 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-28 15:50 [ECOS] hal_platform_setup.h usage Alexandre
2007-06-28 16:03 ` Andrew Lunn
2007-06-28 16:12 ` Alexandre
2007-06-28 16:13 ` Slide
2007-06-28 17:21 ` Alexandre
2007-06-28 18:17 ` Alexandre
2007-06-28 18:32 ` Andrew Lunn
2007-06-28 19:18 ` Alexandre
2007-06-28 16:15 ` Andrew Lunn
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).