Replies: 1 comment 1 reply
-
Hello, You question seems not related for Alire itself, so I suggest to discuss it in another place. Ada Forum or Reddit, for example. Initial setup to start to use of Ada is a bit tricky, you can take a look at my experiment, see |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am new using Alire and I am trying to make a university project with Ada but I have this problem.
My goal is to create a binary that can run on a MilkV Duo-S board that was a linux buildroot distro installed, in one of its two RISC-V 64 bits IMAFDC cores (C906 processor) by compiling the code on an x86_64 computer (linux ubuntu virtual machine run from Windows). The program is simple, using an ads file and a C file to take advantage from the language interfacing that Ada allows, I declare a constant in the ads file that is exported to a C file that prints it in the terminal.
The source files:
Main file written in C called
prueba7.c
:Ada specification file called
alib.ads
:The attempt:
Run alr init:
alr init --bin prueba7
Add the following lines to prueba7.gpr:
Modify the following line in prueba7.gpr:
Change
for Main use ("prueba7.ads");
tofor Main use ("prueba7.c");
since the main program is the C file, while the Ada program is only an ads file with the exported constant.Change the toolchain to compile in RISC-V:
alr toolchain --select
and then I select thegnat_riscv64_elf=14.2.1
toolchain and thegprbuild=22.0.1
latest gprbuildRun alr run, receive the following error (I am ignoring the style and dependencies warnings):
I was able to run this program when I compile it using the native toolchain, so the source code should be fine. Any help is greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions