Skip to content

Commit 13b379a

Browse files
Switch to GNAT FSF 12 support (#418)
* Switch to GNAT FSF 12 support * GNAT FSF 12 in GitHub CI * Update README.md * Remove run-time dependency build script that is not compatible with GNAT FSF This script is also not needed as all the BSPs are included in GNAT FSF.
1 parent bbdc182 commit 13b379a

File tree

87 files changed

+470
-488
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+470
-488
lines changed

Diff for: .github/workflows/main.yml

+51-34
Original file line numberDiff line numberDiff line change
@@ -6,49 +6,66 @@ jobs:
66
name: Build and test on Linux
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v1
10-
- uses: ada-actions/toolchain@ce2021
11-
with:
12-
distrib: community
13-
- uses: ada-actions/toolchain@ce2021
14-
with:
15-
distrib: community
16-
target: arm-elf
17-
- uses: ada-actions/toolchain@ce2021
18-
with:
19-
distrib: community
20-
target: riscv32-elf
9+
- uses: actions/checkout@v3
10+
11+
- run: |
12+
wget -q https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-12.2.0-1/gnat-x86_64-linux-12.2.0-1.tar.gz
13+
tar xf gnat-x86_64-linux-12.2.0-1.tar.gz
14+
echo "${PWD}/gnat-x86_64-linux-12.2.0-1/bin" >> $GITHUB_PATH
15+
16+
wget -q https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-12.2.0-1/gnat-arm-elf-linux64-12.2.0-1.tar.gz
17+
tar xf gnat-arm-elf-linux64-12.2.0-1.tar.gz
18+
echo "${PWD}/gnat-arm-elf-linux64-12.2.0-1/bin" >> $GITHUB_PATH
19+
20+
wget -q https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-12.2.0-1/gnat-riscv64-elf-linux64-12.2.0-1.tar.gz
21+
tar xf gnat-riscv64-elf-linux64-12.2.0-1.tar.gz
22+
echo "${PWD}/gnat-riscv64-elf-linux64-12.2.0-1/bin" >> $GITHUB_PATH
23+
24+
wget -q https://github.com/alire-project/GNAT-FSF-builds/releases/download/gprbuild-22.0.0-1/gprbuild-x86_64-linux-22.0.0-1.tar.gz
25+
tar xf gprbuild-x86_64-linux-22.0.0-1.tar.gz
26+
echo "${PWD}/gprbuild-x86_64-linux-22.0.0-1/bin" >> $GITHUB_PATH
27+
2128
- name: Install Python 3.x (required for the testsuite)
2229
uses: actions/setup-python@v2
2330
with:
2431
python-version: '3.x'
25-
- run: python3 $PWD/scripts/install_dependencies.py
32+
2633
- run: python3 $PWD/scripts/build_all_examples.py
2734
- run: python3 $PWD/testsuite/run.py
2835

2936
win-build:
3037
name: Build and test on Windows
3138
runs-on: windows-latest
39+
defaults:
40+
run:
41+
shell: msys2 {0}
3242
steps:
33-
- uses: actions/checkout@v1
34-
- uses: ada-actions/toolchain@ce2021
43+
- uses: actions/checkout@v3
44+
45+
- name: Install msys2
46+
uses: msys2/setup-msys2@v2
3547
with:
36-
distrib: community
37-
- uses: ada-actions/toolchain@ce2021
38-
with:
39-
distrib: community
40-
target: arm-elf
41-
- name: Install Python 3.x (required for the testsuite)
42-
uses: actions/setup-python@v2
43-
with:
44-
python-version: '3.x'
45-
- name: Remove built-in arm-eabi Ravenscar run-times
46-
run: rm -Recurse -Force "d:\a\_temp\gnat-2021-20210519-arm-elf-windows64-bin\arm-eabi\lib\gnat\ravenscar*"
47-
shell: pwsh
48-
- name: Remove built-in arm-eabi ZFP run-times
49-
run: rm -Recurse -Force "d:\a\_temp\gnat-2021-20210519-arm-elf-windows64-bin\arm-eabi\lib\gnat\zfp*"
50-
shell: pwsh
51-
52-
- run: python $PWD/scripts/install_dependencies.py
53-
- run: python $PWD/scripts/build_all_examples.py
54-
- run: python $PWD/testsuite/run.py
48+
install: >-
49+
base-devel
50+
wget
51+
mingw-w64-x86_64-python
52+
53+
- run: |
54+
wget -q https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-12.2.0-1/gnat-x86_64-windows64-12.2.0-1.tar.gz
55+
tar xf gnat-x86_64-windows64-12.2.0-1.tar.gz
56+
export PATH=${PWD}/gnat-x86_64-windows64-12.2.0-1/bin:$PATH
57+
58+
wget -q https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-12.2.0-1/gnat-arm-elf-windows64-12.2.0-1.tar.gz
59+
tar xf gnat-arm-elf-windows64-12.2.0-1.tar.gz
60+
export PATH=${PWD}/gnat-arm-elf-windows64-12.2.0-1/bin:$PATH
61+
62+
wget -q https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-12.2.0-1/gnat-riscv64-elf-windows64-12.2.0-1.tar.gz
63+
tar xf gnat-riscv64-elf-windows64-12.2.0-1.tar.gz
64+
export PATH=${PWD}/gnat-riscv64-elf-windows64-12.2.0-1/bin:$PATH
65+
66+
wget -q https://github.com/alire-project/GNAT-FSF-builds/releases/download/gprbuild-22.0.0-1/gprbuild-x86_64-windows64-22.0.0-1.tar.gz
67+
tar xf gprbuild-x86_64-windows64-22.0.0-1.tar.gz
68+
export PATH=${PWD}/gprbuild-x86_64-windows64-22.0.0-1/bin:$PATH
69+
70+
python $PWD/scripts/build_all_examples.py
71+
python $PWD/testsuite/run.py

Diff for: README.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/ada-lang/Ada_Drivers_Library)
2-
[![Linux Build Status](https://travis-ci.org/AdaCore/Ada_Drivers_Library.svg?branch=master)](https://travis-ci.org/AdaCore/Ada_Drivers_Library)
3-
[![Windows Build status](https://ci.appveyor.com/api/projects/status/github/AdaCore/Ada_Drivers_Library?branch=master&svg=true)](https://ci.appveyor.com/project/github-integration-adacore/ada-drivers-library)
4-
2+
![CI status](https://github.com/AdaCore/Ada_Drivers_Library/actions/workflows/main.yml/badge.svg)
3+
54
# 1. Introduction
65

76
This repository contains drivers and sample projects to program
@@ -44,8 +43,8 @@ for details.
4443

4544
Therefore, building with the sources requires a compiler supporting both Ada
4645
2012 and the GNAT-defined pragma `Volatile_Full_Access`. For instance a recent
47-
GNAT Pro compiler or GNAT Community 2018 for ARM ELF or RISC-V ELF [(Download
48-
here)](http://adacore.com/download).
46+
GNAT Pro compiler or GNAT FSF 12 for ARM ELF or RISC-V ELF [(Download
47+
here)](https://github.com/alire-project/GNAT-FSF-builds/releases).
4948

5049
# 6. Roadmap
5150

Diff for: arch/ARM/Nordic/drivers/nrf_common/nrf-gpio-tasks_and_events.adb

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ with HAL; use HAL;
3434

3535
package body nRF.GPIO.Tasks_And_Events is
3636

37+
pragma Warnings (Off, "renamed variable * is not referenced");
38+
3739
-----------------------------------
3840
-- Acknowledge_Channel_Interrupt --
3941
-----------------------------------

Diff for: arch/ARM/Nordic/drivers/nrf_common/nrf-gpio.adb

+6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ with NRF_SVD.GPIO; use NRF_SVD.GPIO;
3333

3434
package body nRF.GPIO is
3535

36+
pragma Warnings (Off, "renamed variable * is not referenced");
37+
38+
----------
39+
-- Mode --
40+
----------
41+
3642
overriding
3743
function Mode (This : GPIO_Point) return HAL.GPIO.GPIO_Mode is
3844
CNF : PIN_CNF_Register renames GPIO_Periph.PIN_CNF (This.Pin);

Diff for: boards/HiFive1/hifive1_zfp.gpr

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ library project HiFive1_ZFP is
6262

6363
Linker_Switches := ("-T", Project'Project_dir & "/src/zfp/link.ld");
6464
for Target use "riscv32-elf";
65-
for Runtime ("Ada") use "zfp-rv32imac";
65+
for Runtime ("Ada") use "light-rv32imac";
6666

6767
package Device_Configuration is
6868
for CPU_Name use "RISC-V32";
@@ -97,9 +97,9 @@ library project HiFive1_ZFP is
9797
Max_Mount_Points := "2"; -- From default value
9898
Max_Path_Length := "1024"; -- From default value
9999
Number_Of_Interrupts := "0"; -- From default value
100-
Runtime_Name := "zfp-rv32imac"; -- From default value
100+
Runtime_Name := "light-rv32imac"; -- From default value
101101
Runtime_Name_Suffix := "rv32imac"; -- From board definition
102-
Runtime_Profile := "zfp"; -- From command line
102+
Runtime_Profile := "light"; -- From command line
103103
Use_Startup_Gen := "True"; -- From command line
104104
Vendor := "SiFive"; -- From board definition
105105
hifive1_uart_root := "268513280"; -- From board definition

Diff for: boards/HiFive1/src/zfp/adl_config.ads

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ package ADL_Config is
1414
Max_Mount_Points : constant := 2; -- From default value
1515
Max_Path_Length : constant := 1024; -- From default value
1616
Number_Of_Interrupts : constant := 0; -- From default value
17-
Runtime_Name : constant String := "zfp-rv32imac"; -- From default value
17+
Runtime_Name : constant String := "light-rv32imac"; -- From default value
1818
Runtime_Name_Suffix : constant String := "rv32imac"; -- From board definition
19-
Runtime_Profile : constant String := "zfp"; -- From command line
19+
Runtime_Profile : constant String := "light"; -- From command line
2020
Use_Startup_Gen : constant Boolean := True; -- From command line
2121
Vendor : constant String := "SiFive"; -- From board definition
2222
hifive1_uart_root : constant := 268513280; -- From board definition

Diff for: boards/HiFive1/src/zfp/crt0.S

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ __gnat_exit:
106106
.set _exit,__gnat_exit
107107

108108

109+
109110
.globl putchar
110111
.type putchar,@function
111112
putchar:

Diff for: boards/HiFive1/src/zfp/link.ld

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ SECTIONS
2323
KEEP (*(SORT_NONE(.start)))
2424
*(.text .text.* .gnu.linkonce.t*)
2525
*(.gnu.warning)
26+
KEEP (*(.init))
27+
KEEP (*(.fini))
2628
} > board_flash
2729

2830
.eh_frame_hdr :

Diff for: boards/HiFive1_rev_B/hifive1_rev_b_zfp.gpr

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ library project HiFive1_rev_B_ZFP is
6262

6363
Linker_Switches := ("-T", Project'Project_dir & "/src/zfp/link.ld");
6464
for Target use "riscv32-elf";
65-
for Runtime ("Ada") use "zfp-rv32imac";
65+
for Runtime ("Ada") use "light-rv32imac";
6666

6767
package Device_Configuration is
6868
for CPU_Name use "RISC-V32";
@@ -97,9 +97,9 @@ library project HiFive1_rev_B_ZFP is
9797
Max_Mount_Points := "2"; -- From default value
9898
Max_Path_Length := "1024"; -- From default value
9999
Number_Of_Interrupts := "0"; -- From default value
100-
Runtime_Name := "zfp-rv32imac"; -- From default value
100+
Runtime_Name := "light-rv32imac"; -- From default value
101101
Runtime_Name_Suffix := "rv32imac"; -- From board definition
102-
Runtime_Profile := "zfp"; -- From command line
102+
Runtime_Profile := "light"; -- From command line
103103
Use_Startup_Gen := "True"; -- From command line
104104
Vendor := "SiFive"; -- From board definition
105105
hifive1_uart_root := "268513280"; -- From board definition

Diff for: boards/HiFive1_rev_B/src/zfp/adl_config.ads

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ package ADL_Config is
1414
Max_Mount_Points : constant := 2; -- From default value
1515
Max_Path_Length : constant := 1024; -- From default value
1616
Number_Of_Interrupts : constant := 0; -- From default value
17-
Runtime_Name : constant String := "zfp-rv32imac"; -- From default value
17+
Runtime_Name : constant String := "light-rv32imac"; -- From default value
1818
Runtime_Name_Suffix : constant String := "rv32imac"; -- From board definition
19-
Runtime_Profile : constant String := "zfp"; -- From command line
19+
Runtime_Profile : constant String := "light"; -- From command line
2020
Use_Startup_Gen : constant Boolean := True; -- From command line
2121
Vendor : constant String := "SiFive"; -- From board definition
2222
hifive1_uart_root : constant := 268513280; -- From board definition

Diff for: boards/HiFive1_rev_B/src/zfp/crt0.S

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ __gnat_exit:
106106
.set _exit,__gnat_exit
107107

108108

109+
109110
.globl putchar
110111
.type putchar,@function
111112
putchar:

Diff for: boards/HiFive1_rev_B/src/zfp/link.ld

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ SECTIONS
2323
KEEP (*(SORT_NONE(.start)))
2424
*(.text .text.* .gnu.linkonce.t*)
2525
*(.gnu.warning)
26+
KEEP (*(.init))
27+
KEEP (*(.fini))
2628
} > board_flash
2729

2830
.eh_frame_hdr :

Diff for: boards/MicroBit/microbit_zfp.gpr

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ library project MicroBit_ZFP is
6262

6363
Linker_Switches := ("-T", Project'Project_dir & "/src/zfp/link.ld");
6464
for Target use "arm-eabi";
65-
for Runtime ("Ada") use "zfp-cortex-m0";
65+
for Runtime ("Ada") use "light-cortex-m0";
6666

6767
package Device_Configuration is
6868
for CPU_Name use "ARM Cortex-M0";
@@ -127,9 +127,9 @@ library project MicroBit_ZFP is
127127
Max_Mount_Points := "2"; -- From default value
128128
Max_Path_Length := "1024"; -- From default value
129129
Number_Of_Interrupts := "32"; -- From MCU definition
130-
Runtime_Name := "zfp-cortex-m0"; -- From default value
130+
Runtime_Name := "light-cortex-m0"; -- From default value
131131
Runtime_Name_Suffix := "cortex-m0"; -- From board definition
132-
Runtime_Profile := "zfp"; -- From command line
132+
Runtime_Profile := "light"; -- From command line
133133
Use_Startup_Gen := "True"; -- From command line
134134
Vendor := "Nordic"; -- From board definition
135135

Diff for: boards/MicroBit/src/zfp/adl_config.ads

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ package ADL_Config is
1414
Max_Mount_Points : constant := 2; -- From default value
1515
Max_Path_Length : constant := 1024; -- From default value
1616
Number_Of_Interrupts : constant := 32; -- From MCU definition
17-
Runtime_Name : constant String := "zfp-cortex-m0"; -- From default value
17+
Runtime_Name : constant String := "light-cortex-m0"; -- From default value
1818
Runtime_Name_Suffix : constant String := "cortex-m0"; -- From board definition
19-
Runtime_Profile : constant String := "zfp"; -- From command line
19+
Runtime_Profile : constant String := "light"; -- From command line
2020
Use_Startup_Gen : constant Boolean := True; -- From command line
2121
Vendor : constant String := "Nordic"; -- From board definition
2222
end ADL_Config;

0 commit comments

Comments
 (0)