comp.lang.ada
 help / color / mirror / Atom feed
* ANN: STM32F4 GNAT Run Time Systems 20150204
@ 2015-02-05 11:26 Simon Wright
  2015-02-05 16:06 ` Tero Koskinen
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Wright @ 2015-02-05 11:26 UTC (permalink / raw)


This is the third release of a GNAT RTS with the GCC Runtime Library
exception for STM32F4 boards.

(a) Tasking is implemented using FreeRTOS[3], which STMicroelectronics
    provide a copy of with their BSP.

(b) I've included minimal interfaces to the board hardware: clock,
    buttons, LEDs. Given that the Ada RTS is minimal, these could have
    been put in their own library, not part of the RTS; but I was
    concerned that the board requires clock initialization before the
    other hardware can be used, and the Ada RTS requires clock
    initialization .. will probably revisit this decision.

The release is at [4]: it contains two RTSs, one (in
stm32f429i-disco-bsp; demonstrators in demo-stm32f429i-disco-bsp) has
the barest minimum for Ada support, while the more interesting one (in
stm32f429i-disco-rtos; demonstrators in demo-stm32f429i-disco-rtos)
supports Ravenscar tasking, allocators, tagged types, and the secondary
stack. From its README,

This is an Ada Runtime System (RTS) for the GCC Ada compiler (GNAT),
targeted to the STMicroelectronics STM32F429I Discovery board (see
http://www.st.com/).

The RTS supports Ravenscar tasking. Package System contains the
following additional restrictions:

   pragma Restrictions (No_Enumeration_Maps);
   pragma Restrictions (No_Exception_Propagation);
   pragma Restrictions (No_Finalization);
   pragma Restrictions (No_Recursion);

The RTS contains object code for all the relevant drivers from
STMicroelectronics' STM32Cube_FW_F4_V1.3.0 package, but not the source
code. Makefile.inc (altered as necessary to match the place where you
have installed the STM32Cube package) can be included in your own
Makefiles to provide access to the drivers' header and source files;
see the demonstration's Makefile.

The RTS has been built with no optimisation (-O0) and for debugging
(-g), using GCC 4.9.1 for arm-eabi-darwin13-bin[1] on Mac OS X (it
should work out of the box (but after recompilation!) with a
Linux-hosted cross-compiler.

The RTS is intended to support commercial binary distributions[2]. The
Ada source code has either been derived from FSF GCC (4.9.1) or
written for this work; see the files COPYING3 and COPYING.RUNTIME. The
C source has either been derived from STMCube or written for this
work: see the file COPYING.STMicroelectronics.

The RTS is based on FreeRTOS[3], as customised by STMicroelectronics
in the STM32Cube package. See COPYING.FreeRTOS.

The following non-original files don't form part of a binary
deliverable, so don't affect the status of the binary:

o build_runtime.gpr and runtime.xml originated in AdaCore's GNAT GPL
  2014 arm-eabi distribution (for Linux).

o The linker script stm32f429i-flash.ld is under an MIT licence: see
  COPYING.MIT.

[1] https://sourceforge.net/projects/gnuada/files/GNAT_GCC%20Mac%20OS%20X/4.9.1bis/arm-eabi/
[2] STMicroelectronics' evaluation product licence agreement at
www.st.com/epla forbids the sale of products including this board, so
this work would have to be reconfigured for a different board anyway.
[3] http://www.freertos.org
[4] https://sourceforge.net/projects/stm32f4-gnat-rts/files/20150204/


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

* Re: ANN: STM32F4 GNAT Run Time Systems 20150204
  2015-02-05 11:26 ANN: STM32F4 GNAT Run Time Systems 20150204 Simon Wright
@ 2015-02-05 16:06 ` Tero Koskinen
  2015-02-05 17:21   ` Simon Wright
  0 siblings, 1 reply; 4+ messages in thread
From: Tero Koskinen @ 2015-02-05 16:06 UTC (permalink / raw)


5.2.2015, 13:26, Simon Wright kirjoitti:
> This is the third release of a GNAT RTS with the GCC Runtime Library
> exception for STM32F4 boards.

Nice to see people working actively on this area.

> This is an Ada Runtime System (RTS) for the GCC Ada compiler (GNAT),
> targeted to the STMicroelectronics STM32F429I Discovery board (see
> http://www.st.com/).
..
> The RTS is intended to support commercial binary distributions[2]. The
> Ada source code has either been derived from FSF GCC (4.9.1) or
> written for this work; see the files COPYING3 and COPYING.RUNTIME.
..
 > o The linker script stm32f429i-flash.ld is under an MIT licence: see
 >    COPYING.MIT.

I found that some MCU(STM32F4) specific packages use plain GPL, like
http://sourceforge.net/p/stm32f4-gnat-rts/code/ci/default/tree/demo_leds-stm32f4/src/stm32f4.ads

Was this intentional?

Personally I would prefer BSD/ISC/MIT for all possible parts, like
you have done for the linker script.

For example, see my STM32F4 package:
https://bitbucket.org/tkoskine/gnat-arm-app-skeleton/src/ab141a07860925a7c19d333c30b6084a041d9325/stm32f4.ads?at=default

> The RTS has been built with no optimisation (-O0) and for debugging
> (-g), using GCC 4.9.1 for arm-eabi-darwin13-bin[1] on Mac OS X (it
> should work out of the box (but after recompilation!) with a
> Linux-hosted cross-compiler.

If someone has time, Ubuntu/Debian/Fedora packages would be nice. :)

For AVR-Ada, I have tried to provide unofficial packages[1,2] which
can be installed with apt-get/yum and then hello world project
works out of the box:
  apt-get install avr-ada
  cd hello-avr-ada
  avr-gnatmake -XBOARD=arduino_uno hello

Similar procedure for ARM/STM32F4 should be doable (although
takes some time).

> [2] STMicroelectronics' evaluation product licence agreement at
> www.st.com/epla forbids the sale of products including this board, so
> this work would have to be reconfigured for a different board anyway.

Olimex sells many different STM32Fx boards which don't have this
restriction. I have used[3] STM32-P405 and STM32-E407[4] boards.

Yours,
  Tero

[1] http://ubuntu.ada-language.com/
[2] http://fedora.ada-language.com/
[3] 
http://tero.stronglytyped.org/running-ada-2012-on-olimex-stm32-e407-arm-cortex-m4-stm32f4.html
[4] https://www.olimex.com/Products/ARM/ST/STM32-E407/


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

* Re: ANN: STM32F4 GNAT Run Time Systems 20150204
  2015-02-05 16:06 ` Tero Koskinen
@ 2015-02-05 17:21   ` Simon Wright
  2015-02-05 18:51     ` Paul Rubin
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Wright @ 2015-02-05 17:21 UTC (permalink / raw)


Tero Koskinen <tero.koskinen@iki.fi> writes:

> 5.2.2015, 13:26, Simon Wright kirjoitti:

>> o The linker script stm32f429i-flash.ld is under an MIT licence: see
>>    COPYING.MIT.
>
> I found that some MCU(STM32F4) specific packages use plain GPL, like
> http://sourceforge.net/p/stm32f4-gnat-rts/code/ci/default/tree/demo_leds-stm32f4/src/stm32f4.ads
>
> Was this intentional?

That is a copy of AdaCore's RTS, so it retains their licensing.

> Personally I would prefer BSD/ISC/MIT for all possible parts, like
> you have done for the linker script.

And that is derived from someone else's work, they used the MIT license.

It doesn't really matter what license these build scripts, including
GPRs, use, because they won't be part of a deliverable binary. So long
as the license terms allow you to use them for a build, of course! For
demo code, if I haven't already, I'll be using this:

   "This unit is free software; you can redistribute it and/or modify it
    as you wish. This unit is distributed in the hope that it will be
    useful, but WITHOUT ANY WARRANTY; without even the implied warranty
    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."

which I thought was the GNU All-Permissive license but I see isn't! - 

   "Copying and distribution of this file, with or without modification,
    are permitted in any medium without royalty provided the copyright
    notice and this notice are preserved.  This file is offered as-is,
    without any warranty."

http://www.gnu.org/prep/maintain/html_node/License-Notices-for-Other-Files.html

>> [2] STMicroelectronics' evaluation product licence agreement at
>> www.st.com/epla forbids the sale of products including this board, so
>> this work would have to be reconfigured for a different board anyway.
>
> Olimex sells many different STM32Fx boards which don't have this
> restriction. I have used[3] STM32-P405 and STM32-E407[4] boards.

The Discovery boards are intended for exploration, so it seems
reasonable for them to impose this restriction. I need to work out
porting at some point.


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

* Re: ANN: STM32F4 GNAT Run Time Systems 20150204
  2015-02-05 17:21   ` Simon Wright
@ 2015-02-05 18:51     ` Paul Rubin
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Rubin @ 2015-02-05 18:51 UTC (permalink / raw)


Simon Wright <simon@pushface.org> writes:
> The Discovery boards are intended for exploration, so it seems
> reasonable for them to impose this restriction. I need to work out
> porting at some point.

I've been interested in this board because of its small size, and had
been wanting to ask how difficult it is to create a BSP:

  http://www.pjrc.com/teensy/teensy31.html


I guess this seems like as good a place as any to bring it up.  The cpu
is a Cortex M4 rather than M4F, if that matters for fixed point code. 

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

end of thread, other threads:[~2015-02-05 18:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-05 11:26 ANN: STM32F4 GNAT Run Time Systems 20150204 Simon Wright
2015-02-05 16:06 ` Tero Koskinen
2015-02-05 17:21   ` Simon Wright
2015-02-05 18:51     ` Paul Rubin

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