Skip to content

Commit 88e9fa9

Browse files
author
Simon Wright
committed
Preparation for release.
* INSTALL, Makefile, README, README-for-distribution, arduino-due/Makefile.dist, common/Makefile.dist, stm32f4/Makefile.dist, stm32f429i/Makefile.dist, test-arduino-due/Makefile.dist, test-common/Makefile.dist, test-stm32f4/Makefile, test-stm32f4/Makefile.dist, test-stm32f429i/Makefile.dist: updated. * test-arduino-due/testbed.gpr: no longer with arduino_due_bsp. * common/vApplicationStackOverflowHook.c: moved from arduino-due/adainclude.
1 parent 3e2eda5 commit 88e9fa9

File tree

15 files changed

+186
-103
lines changed

15 files changed

+186
-103
lines changed

INSTALL

Lines changed: 81 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,115 @@
1-
You should always use gprbuild to do cross-builds. Gnatmake
2-
(arm-eabi-gnatmake) doesn't work nearly so well. For GPS, in
3-
Build-Settings-Targets, in the File tab change gnatmake and builder to
4-
gprbuild.
1+
The runtimes are supplied pre-built with GNAT GPL 2015.
2+
3+
You should always use gprbuild and a GNAT Project (GPR) to do
4+
cross-builds. Gnatmake (arm-eabi-gnatmake) doesn't work nearly so
5+
well.
6+
7+
* For GPS, in Build-Settings-Targets, in the File tab change
8+
gnatmake and builder to gprbuild.
9+
10+
* for Emacs ada-mode, in the Ada Build group, set
11+
Ada Build Check Cmd to gprbuild -p -P${gpr_file} -c -u -f ${full_current}
12+
Ada Build Make Cmd to gprbuild -p -P${gpr_file}
13+
14+
Target
15+
======
516

617
You need to specify the target (arm-eabi). If you're only going to use
718
the command line, you can specify --target=arm-eabi on the command
8-
line or in the GPR project-level attribute Target (for Target use
9-
"arm-eabi";). If you're going to use Emacs ada-mode, use the Target
10-
attribute. If you're going to use GPS, you can't use the Target
11-
attribute (it confuses GPS): instead, in Build-Settings-Toolchains,
12-
select Activate multiple toolchains setup, enter the cross-compiler
13-
path in 'Compiler path', enter the host compiler path in 'Tools path',
14-
untick 'Use the compiler in tools path to generate cross-reference
15-
files', and include package IDE in your GPR:
16-
17-
package IDE is
18-
for Gnatlist use "arm-eabi-gnatls";
19-
end IDE;
19+
line or in the GPR project-level attribute Target
20+
21+
for Target use "arm-eabi";
22+
23+
If you're going to use GPS or Emacs ada-mode, use the Target
24+
attribute.
25+
26+
Run time system
27+
===============
2028

2129
The GNAT compiler running under gprbuild can find RTSs in various
22-
ways. An RTS contains an adainclude/ directory with the source of the
23-
RTS and an adalib/ directory with the corresponding library, linker
24-
script and .ali files.
30+
ways. An RTS usually contains an adainclude/ directory with the source
31+
of the RTS and an adalib/ directory with the corresponding library,
32+
linker script and .ali files (these defaults can be changed by listing
33+
the source directory, or colon-separated directories, in
34+
ada_source_path, and the object directory in ada_object_path).
2535

26-
If not the default, the RTS is named using a "--RTS=" option. In a
27-
GPR, this would be in package Builder (so it's applied during all
28-
phases of the build):
36+
If not the default, the RTS can be named on the command using a --RTS=
37+
option. In a GPR, you can do this in package Builder (so it's applied
38+
during all phases of the build):
2939

3040
package Builder is
3141
for Default_Switches ("ada") use
3242
(
3343
"-g",
3444
"-O0",
35-
"--RTS=stm32f429i-disco-rtos"
45+
"--RTS=stm32f429i"
3646
);
3747
end Builder;
3848

39-
The normal place for RTSs to be installed is in the location indicated
40-
by "arm-eabi-gcc -print-libgcc-file-name"; for GNAT GPL 2014, that
41-
would be $prefix/lib/gcc/arm-eabi/4.7.4/, referred to from here as
42-
$lib.
49+
or, with GPRBUILD GPL 2015, via an attribute:
50+
51+
for Runtime ("ada") use "stm32f429i";
52+
53+
There are two places where RTSs can be installed:
54+
55+
* in the location indicated by arm-eabi-gcc -print-libgcc-file-name;
56+
for GNAT GPL 2015, that would be $prefix/lib/gcc/arm-eabi/4.9.3/,
57+
referred to from here as $lib.
4358

44-
If the RTS is named stm32f429i-disco-bsp, the compiler will treat it
59+
* in $prefix/arm-eabi/lib/gnat.
60+
61+
You can also work with an RTS in its build location.
62+
63+
In $lib:
64+
--------
65+
66+
The directory containing the RTS should be called rts-{name}, for
67+
example rts-stm32f429i.
68+
69+
If the RTS is named stm32f429i, the compiler will treat it
4570
as the default RTS (and you need a default RTS) if
4671

47-
o $lib contains text files ada_object_path, ada_source_path containing
48-
the locations of the adalib and adainclude directories of the RTS
49-
respectively; or
72+
* $lib contains text files ada_object_path, ada_source_path
73+
containing the locations of the adalib and adainclude directories
74+
of the RTS respectively, and (GCC 5.0) there is a file
75+
adainclude/system.ads; or
5076

51-
o $lib contains symbolic links named adalib and adainclude to the
52-
adalib and adainclude directories of the RTS respectively.
77+
* $lib contains symbolic links named adalib and adainclude to the
78+
adalib and adainclude directories of the RTS respectively.
5379

5480
Alternative RTSs are found here if they are in directories named
55-
rts-{name}, for example rts-stm32f429i-disco-bsp/ corresponds to
56-
--RTS=stm32f429i-disco-bsp.
81+
rts-{name}, for example rts-stm32f429i/ corresponds to
82+
--RTS=stm32f429i.
83+
84+
In $prefix/arm-eabi/lib/gnat:
85+
-----------------------------
5786

58-
RTSs can also be located by giving the explicit path in the --RTS=
59-
option (this has to be an absolute path if using gnatmake, a relative
60-
path works fine for command line or Emacs):
87+
The directory containing the RTS is just called {name},
88+
e.g. stm32f429i.
89+
90+
In the build location:
91+
----------------------
92+
93+
RTSs can also be located by giving the explicit path in the Runtime
94+
("ada") attribute or the --RTS= option (this has to be an absolute
95+
path with GPRBUILD GPL 2015):
6196

6297
package Builder is
6398
for Default_Switches ("ada") use
6499
(
65100
"-g",
66101
"-O0",
67-
"--RTS=../stm32f429i-disco-bsp"
102+
"--RTS=“ & Project’Project_Dir & "../stm32f429i"
68103
);
69104
end Builder;
70105

106+
or
107+
108+
for Runtime ("ada") use Project’Project_Dir & "../stm32f429i";
109+
110+
Link map file
111+
=============
112+
71113
It can be very useful indeed to have a link map file. In case gprbuild
72114
doesn't support --create-map-file with a cross-compiler, a good way to
73115
specify this is in package Linker in the GPR:

Makefile

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,22 @@ all: ; $(error This makefile is only for building distributions, \
2121

2222
NAME ?= cortex-gnat-rts
2323

24-
# Note the order, which is necssary.
24+
# The "common" sibdirs must come first.
2525
subdirs = \
2626
common \
27-
bsp-common \
2827
test-common
2928

3029
subdirs += \
3130
arduino-due \
32-
arduino-due-bsp \
33-
test-arduino-due \
34-
demos-arduino-due
31+
test-arduino-due
3532

3633
subdirs += \
37-
stm32f429i \
38-
test-stm32f429i
34+
stm32f4 \
35+
test-stm32f4
3936

4037
subdirs += \
41-
stm32f429i-disco-rtos \
42-
stm32f429i-disco-bsp \
43-
demo-stm32f429i-disco-rtos \
44-
test-stm32f4
38+
stm32f429i \
39+
test-stm32f429i
4540

4641
TOP_LEVEL_FILES = INSTALL README
4742

README

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,38 @@ the STM32F4-series evaluation boards from STMicroelectronics at
55
http://www.st.com). A particular release may not contain all of the
66
RTSs.
77

8-
The Ada source is either original or based on GCC 4.9.1.
8+
In each case, the board support for the RTS (configuration for size
9+
and location of Flash, RAM; clock initialization; interrupt naming) is
10+
in $RTS/adainclude. Support for the on-chip peripherals is also
11+
included, in Ada spec files generated by SVD2Ada
12+
(https://github.com/AdaCore/svd2ada).
13+
14+
The Ada source is either original or based on FSF GCC (mainly 4.9.1,
15+
some later releases too).
916

1017
(1) arduino-due is a Ravenscar-style RTOS based on FreeRTOS from
11-
http://www.freertos.org.
18+
http://www.freertos.org for the Arduino Due.
1219

1320
See arduino-due/COPYING* for licensing terms.
1421

22+
On-chip peripheral support in atsam3x8e/.
23+
1524
Tests in test-arduino-due/.
16-
Demos in demos-arduino-due/.
1725

18-
arduino-due-bsp/ contains some initial support for board
19-
peripherals.
26+
(2) stm32f4 is a Ravenscar-style RTOS based on FreeRTOS from
27+
http://www.freertos.org for the STM32F4-DISC* board.
2028

21-
(2) stm32f429i is a Ravenscar-style RTOS based on FreeRTOS from
22-
http://www.freertos.org.
29+
See stm32f4/COPYING* for licensing terms.
2330

24-
See stm32f429i/COPYING* for licensing terms.
31+
On-chip peripheral support in stm32f40x/.
2532

26-
Board support (spec files only) is included in the RTS.
27-
28-
Tests in test-stm32f429i/.
33+
Tests in test-stm32f4/.
2934

30-
(3) stm32f429i-disco-rtos is a Ravenscar-style RTS based on the ST
31-
Cube BSPs from STMicroelectronics and their packaged FreeRTOS
32-
kernel.
35+
(3) stm32f429i is a Ravenscar-style RTOS based on FreeRTOS from
36+
http://www.freertos.org for the STM32F429I-DISC* board.
3337

34-
See stm32f429i-disco-rtos/COPYING* for licensing terms.
38+
See stm32f429i/COPYING* for licensing terms.
3539

36-
Tests in test-stm32f4/.
37-
Demos in demo-stm32f429i-disco-rtos/.
40+
On-chip peripheral support in stm32f429x/.
3841

39-
Board support in stm32f429i-disco-bsp/.
42+
Tests in test-stm32f429i/.

README-for-distribution

Lines changed: 53 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,64 @@
1-
20160314
1+
20160522
22
========
33

4-
This release includes
4+
This release includes GNAT Ada Run Time Systems (RTSs) based
5+
on FreeRTOS (http://www.freertos.org) and targeted at boards with
6+
Cortex-M3, -M4, -M4F MCUs (Arduino Due from http://www.arduino.org,
7+
the STM32F4-series evaluation boards from STMicroelectronics at
8+
http://www.st.com).
59

6-
* an RTS for the Arduino Due, arduino-due, and a minimal BSP,
7-
arduino-due-bsp.
10+
In each case, the board support for the RTS (configuration for size
11+
and location of Flash, RAM; clock initialization; interrupt naming) is
12+
in $RTS/adainclude. Support for the on-chip peripherals is also
13+
included, in Ada spec files generated by SVD2Ada
14+
(https://github.com/AdaCore/svd2ada).
815

9-
* an RTS for the STM32F429I-DISCO, stm32f429i-disco-rtos, based on
10-
STMicroelectronics' STM32Cube package and FreeRTOS, and a
11-
corresponding partial BSP, stm32f429i-disco-bsp.
16+
The Ada source is either original or based on FSF GCC (mainly 4.9.1,
17+
some later releases too).
1218

13-
* an RTS for the STM32F429I-DISCO, stm32f429i, based on FreeRTOS, with
14-
a set of peripheral definition packages created by SVD2Ada.
19+
(1) arduino-due is a Ravenscar-style RTOS based on FreeRTOS from
20+
http://www.freertos.org for the Arduino Due.
21+
22+
See arduino-due/COPYING* for licensing terms.
23+
24+
On-chip peripheral support in atsam3x8e/.
25+
26+
Tests in test-arduino-due/.
27+
28+
(2) stm32f4 is a Ravenscar-style RTOS based on FreeRTOS from
29+
http://www.freertos.org for the STM32F4-DISC* board.
30+
31+
See stm32f4/COPYING* for licensing terms.
32+
33+
On-chip peripheral support in stm32f40x/.
34+
35+
Tests in test-stm32f4/.
36+
37+
(3) stm32f429i is a Ravenscar-style RTOS based on FreeRTOS from
38+
http://www.freertos.org for the STM32F429I-DISC* board.
39+
40+
See stm32f429i/COPYING* for licensing terms.
41+
42+
On-chip peripheral support in stm32f429x/.
43+
44+
Tests in test-stm32f429i/.
1545

1646
In this release,
1747

18-
* the Containers support generalized iteration ("for all E of C
19-
loop"). Note, this is achieved by removing tampering checks. While
20-
tampering errors are rare, it would be as well to check algorithms
21-
using a fully-featured desktop compiler.
48+
* There is no longer any dependence on the STMicroelectronics'
49+
STM32Cube package.
50+
51+
* The support for on-chip peripherals is limited to the
52+
SVD2Ada-generated spec files. The AdaCore 'bareboard' software
53+
(currently https://github.com/AdaCore/bareboard, but a name change
54+
is under consideration) supports the STM32 line.
55+
56+
* Tasking no longer requires an explicit start
57+
(https://sourceforge.net/p/cortex-gnat-rts/tickets/5/).
58+
59+
* Locking in interrupt-handling protected objects no longer inhibits
60+
all interrupts, only those of equal or lower priority
61+
(https://sourceforge.net/p/cortex-gnat-rts/tickets/18/).
2262

2363
The standard packages included (there are more, implementation-specific,
2464
ones) are:

arduino-due/Makefile.dist

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,16 @@ RTS_DISTRIBUTION_FILES += \
4848
adainclude/a-intnam.ads \
4949
adainclude/s-interr.adb \
5050
adainclude/s-interr.ads \
51-
adainclude/start_freertos_scheduler.adb \
5251
adainclude/startup-set_up_clock.adb \
5352
adainclude/startup.adb \
54-
adainclude/startup.ads \
55-
adainclude/start_freertos_scheduler.adb
53+
adainclude/startup.ads
5654

5755
RTS_DISTRIBUTION_FILES += \
5856
adainclude/FreeRTOSConfig.h \
59-
adainclude/heap_4.c \
60-
adainclude/_init.c \
61-
adainclude/syscalls.c \
62-
adainclude/vApplicationStackOverflowHook.c
57+
adainclude/heap_4.c
58+
59+
RTS_DISTRIBUTION_FILES += \
60+
atsam3x8e/*.ads
6361

6462
RTS_DISTRIBUTION_FILES += \
6563
adalib/due-flash.ld

common/Makefile.dist

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ RTS_DISTRIBUTION_FILES += \
9696
s-fremut.ads \
9797
s-freque.adb \
9898
s-freque.ads \
99+
s-fresem.adb \
100+
s-fresem.ads \
99101
s-fretas.adb \
100102
s-fretas.ads \
101103
s-fretcb.adb \
@@ -132,12 +134,12 @@ RTS_DISTRIBUTION_FILES += \
132134
s-valuns.ads \
133135
s-valuti.adb \
134136
s-valuti.ads \
135-
start_freertos_scheduler.ads \
136137
system.ads
137138

138139
RTS_DISTRIBUTION_FILES += \
139140
freertos_bindings.c \
140-
last_chance_handler.c
141+
last_chance_handler.c \
142+
vApplicationStackOverflowHook.c
141143

142144
dist:: $(RTS_DISTRIBUTION_FILES)
143145
mkdir $(DIST)/$(THIS)
File renamed without changes.

0 commit comments

Comments
 (0)