comp.lang.ada
 help / color / mirror / Atom feed
* Build a new cross-compiler
@ 2011-03-21 21:40 Lion O
  2011-03-22 13:49 ` Lion O
  2011-03-22 13:52 ` Lucretia
  0 siblings, 2 replies; 12+ messages in thread
From: Lion O @ 2011-03-21 21:40 UTC (permalink / raw)


Hi,
I recently bought an DSO201 board, which is an open-source digital oscilloscope, and found out some C codes and some .hex files generated using it. 
But I would prefer to write new functionality codes (for example, a FFT implementation) in Ada. Unfortunately, no idea of how could start it. 
I started to look for cross-compilers for it (maybe win-x86 to DSO201 or linux, unix, whatever) and guess that nothing came up. So I was thinking about making a cross-compiler myself for it, and I do not have any idea of how can I do it. 
Is there exist generic big tutorial for making a cross-compiler? Ideas?

Regards.



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

* Re: Build a new cross-compiler
  2011-03-21 21:40 Build a new cross-compiler Lion O
@ 2011-03-22 13:49 ` Lion O
  2011-03-22 15:43   ` Lucretia
  2011-03-22 13:52 ` Lucretia
  1 sibling, 1 reply; 12+ messages in thread
From: Lion O @ 2011-03-22 13:49 UTC (permalink / raw)


Ok, maybe it's such a difficult idea. But certainly if I had a cross-compiler for the board, I'd rather develop the drivers in Ada than in C.



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

* Re: Build a new cross-compiler
  2011-03-21 21:40 Build a new cross-compiler Lion O
  2011-03-22 13:49 ` Lion O
@ 2011-03-22 13:52 ` Lucretia
  2011-03-22 16:02   ` Lion O
  1 sibling, 1 reply; 12+ messages in thread
From: Lucretia @ 2011-03-22 13:52 UTC (permalink / raw)


On Mar 21, 9:40 pm, Lion O <liono.swordofom...@gmail.com> wrote:
> Hi,
> I recently bought an DSO201 board, which is an open-source digital oscilloscope, and found out some C codes and some .hex files generated using it.
> But I would prefer to write new functionality codes (for example, a FFT implementation) in Ada. Unfortunately, no idea of how could start it.
> I started to look for cross-compilers for it (maybe win-x86 to DSO201 or linux, unix, whatever) and guess that nothing came up. So I was thinking about making a cross-compiler myself for it, and I do not have any idea of how can I do it.
> Is there exist generic big tutorial for making a cross-compiler? Ideas?
>
> Regards.

+othis is ARM €ortex-M3 based? yes it is possible, I am currently
doing something similar to what you want. I am hitting a bare machine
with a zero footprint runtime. keep an eye on me https://github.com/lucretia,
i'll be adding a blinking light sample soon.

Luke



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

* Re: Build a new cross-compiler
  2011-03-22 13:49 ` Lion O
@ 2011-03-22 15:43   ` Lucretia
  2011-03-22 16:04     ` Lion O
  2011-03-22 17:30     ` Mark Lorenzen
  0 siblings, 2 replies; 12+ messages in thread
From: Lucretia @ 2011-03-22 15:43 UTC (permalink / raw)


On Mar 22, 1:49 pm, Lion O <liono.swordofom...@gmail.com> wrote:
> Ok, maybe it's such a difficult idea. But certainly if I had a cross-compiler for the board, I'd rather develop the drivers in Ada than in C.

I  won't say it's easy, it's not. I will say that if you're expecting
a full blown Ada runtime, you will be dissappointed, that would
require a ton of work to basically implement OS features on a bare
board. I spent pretty much 2 full weeks just building and rebuilding
gnat because it's a pain and this configuration is not supported at
all.

Luke



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

* Re: Build a new cross-compiler
  2011-03-22 13:52 ` Lucretia
@ 2011-03-22 16:02   ` Lion O
  0 siblings, 0 replies; 12+ messages in thread
From: Lion O @ 2011-03-22 16:02 UTC (permalink / raw)
  Cc: Lucretia

Great! It's really ARM Cortex-M3. I'm going to check it out.
Tnx



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

* Re: Build a new cross-compiler
  2011-03-22 15:43   ` Lucretia
@ 2011-03-22 16:04     ` Lion O
  2011-03-22 17:30     ` Mark Lorenzen
  1 sibling, 0 replies; 12+ messages in thread
From: Lion O @ 2011-03-22 16:04 UTC (permalink / raw)
  Cc: Lucretia

I guess it will fit well. I do not expect full runtime; a start point helps so much!



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

* Re: Build a new cross-compiler
  2011-03-22 15:43   ` Lucretia
  2011-03-22 16:04     ` Lion O
@ 2011-03-22 17:30     ` Mark Lorenzen
  2011-03-22 18:26       ` Lion O
  2011-03-22 20:19       ` Lucretia
  1 sibling, 2 replies; 12+ messages in thread
From: Mark Lorenzen @ 2011-03-22 17:30 UTC (permalink / raw)


On 22 Mar., 16:43, Lucretia <Lucretia9...@yahoo.co.uk> wrote:
>
> I  won't say it's easy, it's not. I will say that if you're expecting
> a full blown Ada runtime, you will be dissappointed, that would
> require a ton of work to basically implement OS features on a bare
> board. I spent pretty much 2 full weeks just building and rebuilding
> gnat because it's a pain and this configuration is not supported at
> all.
>
> Luke

AdaCore has started shipping bare-board versions of their GNAT run-
time libraries supporting the Ravenscar tasking profile. In the GPL
toolset there is support for LEGO MINDSTORMS NXT platform, and in the
Pro toolset there is support for Power, ERC32 and LEON2/3. The run-
time libraries do not need the support of an RTOS, but implement all
the necessary functionality.

It would probably be much much easier to port one the existing bare-
board run-time libraries instead of writing a new one. I don't know
enough about the GNAT run-time system to determine how much work is
involved, but maybe it resembles writing a new BSP?

Regards,

Mark L



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

* Re: Build a new cross-compiler
  2011-03-22 17:30     ` Mark Lorenzen
@ 2011-03-22 18:26       ` Lion O
  2011-03-22 18:46         ` Lion O
  2011-03-22 20:21         ` Lucretia
  2011-03-22 20:19       ` Lucretia
  1 sibling, 2 replies; 12+ messages in thread
From: Lion O @ 2011-03-22 18:26 UTC (permalink / raw)
  Cc: Mark Lorenzen

>AdaCore has started shipping bare-board versions of their GNAT run-
>time libraries supporting the Ravenscar tasking profile. In the GPL
>toolset there is support for LEGO MINDSTORMS NXT platform, and in the
>Pro toolset there is support for Power, ERC32 and LEON2/3. The run-
>time libraries do not need the support of an RTOS, but implement all
>the necessary functionality.

>It would probably be much much easier to port one the existing bare-
>board run-time libraries instead of writing a new one. I don't know
>enough about the GNAT run-time system to determine how much work is
>involved, but maybe it resembles writing a new BSP?

I could think a way of using Lego Mindstorms platform for generating Cortex-32 executables (but maybe it's a lack of knoledgement of mine, do not have idea). Can you think a way for it? It could be a good option.
I like Luke's too, it looks that Tamp (the microkernel he talked about) provides a good learningship. 



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

* Re: Build a new cross-compiler
  2011-03-22 18:26       ` Lion O
@ 2011-03-22 18:46         ` Lion O
  2011-03-22 20:21         ` Lucretia
  1 sibling, 0 replies; 12+ messages in thread
From: Lion O @ 2011-03-22 18:46 UTC (permalink / raw)
  Cc: Mark Lorenzen

Correcting...
I could NOT think (...)
:-)



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

* Re: Build a new cross-compiler
  2011-03-22 17:30     ` Mark Lorenzen
  2011-03-22 18:26       ` Lion O
@ 2011-03-22 20:19       ` Lucretia
  1 sibling, 0 replies; 12+ messages in thread
From: Lucretia @ 2011-03-22 20:19 UTC (permalink / raw)


On Mar 22, 5:30 pm, Mark Lorenzen <mark.loren...@gmail.com> wrote:

> AdaCore has started shipping bare-board versions of their GNAT run-
> time libraries supporting the Ravenscar tasking profile. In the GPL
> toolset there is support for LEGO MINDSTORMS NXT platform, and in the
> Pro toolset there is support for Power, ERC32 and LEON2/3. The run-
> time libraries do not need the support of an RTOS, but implement all
> the necessary functionality.

Yup.

> It would probably be much much easier to port one the existing bare-
> board run-time libraries instead of writing a new one. I don't know
> enough about the GNAT run-time system to determine how much work is
> involved, but maybe it resembles writing a new BSP?

1) It's GPL'd and I prefer the the more open GMGPL'd FSF version.
2) I've been reliably informed that the FSF has more fixes/features
than that version of the GPL'd version.
3) Some of the files from the bare board support has already filtered
down into the FSF tree.
4) I'm not rewriting anything, I'm using the files that already exist
within the FSF tree.
5) You do need HW specific code as well, this works alongside the RTS,
even AdaCore don't provide that for ARM, they do provide what you need
for NXT OS development though.

Luke.



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

* Re: Build a new cross-compiler
  2011-03-22 18:26       ` Lion O
  2011-03-22 18:46         ` Lion O
@ 2011-03-22 20:21         ` Lucretia
  2011-03-23  0:32           ` Lion O
  1 sibling, 1 reply; 12+ messages in thread
From: Lucretia @ 2011-03-22 20:21 UTC (permalink / raw)


On Mar 22, 6:26 pm, Lion O <liono.swordofom...@gmail.com> wrote:

> I could think a way of using Lego Mindstorms platform for generating Cortex-32 executables (but maybe it's a lack of knoledgement of mine, do not have idea). Can you think a way for it? It could be a good option.
> I like Luke's too, it looks that Tamp (the microkernel he talked about) provides a good learningship.

That compiler would work for you, -mcpu=cortex-m3 but you would still
require a HW support lib (BSP).

As for TAMP, it's currently non-existent, just been trying to get a
compiler - this does build, read that docs I've put up. What I'm
playing with at the moment will provide more information and a solid
example of hitting bare hardware with GNAT. Keep an eye on my GitHub
profile, I'll be adding more projects for this kind of thing :D

Luke.



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

* Re: Build a new cross-compiler
  2011-03-22 20:21         ` Lucretia
@ 2011-03-23  0:32           ` Lion O
  0 siblings, 0 replies; 12+ messages in thread
From: Lion O @ 2011-03-23  0:32 UTC (permalink / raw)
  Cc: Lucretia

Thanks Luke, 
I'm gonna install the packages and see what I can do.



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

end of thread, other threads:[~2011-03-23  0:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-21 21:40 Build a new cross-compiler Lion O
2011-03-22 13:49 ` Lion O
2011-03-22 15:43   ` Lucretia
2011-03-22 16:04     ` Lion O
2011-03-22 17:30     ` Mark Lorenzen
2011-03-22 18:26       ` Lion O
2011-03-22 18:46         ` Lion O
2011-03-22 20:21         ` Lucretia
2011-03-23  0:32           ` Lion O
2011-03-22 20:19       ` Lucretia
2011-03-22 13:52 ` Lucretia
2011-03-22 16:02   ` Lion O

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox