1

For nostalgia's sake I was just unearthing some of my Ada texts from the 80's when I came upon this site Ada on the Raspberry Pi Pico. GNAT Ada is available easy enough for RaspberryOS though having a 8G Rpi4 I suspect helps, and I've built the Alire package manager with little problem.

The project setup

alr init --bin hello_pico
cd hello_pico
alr with pico_bsp

works fine, and I changed the gpr file as instructed to

with "config/hello_pico_config.gpr";
with "pico_bsp.gpr";
project Hello_Pico is
    for Target use "arm-eabi";
    for Runtime ("Ada") use "light-cortex-m0p";
    package Linker is
        for Switches ("Ada") use Pico_BSP.Linker_Switches;
    end Linker;

    for Source_Dirs use ("src/", "config/");

However, the build command alr build --development fails

pico_bsp.gpr:20:26: warning: libraries are not supported on this platform hal.gpr:5:24: warning: libraries are not supported on this platform rp2040_hal.gpr:18:25: warning: libraries are not supported on this platform cortex_m0.gpr:17:25: warning: libraries are not supported on this platform cortex_m0.gpr:4:09: no compiler for language "Ada", cannot compile "cortex_m-nvic.ads" gprbuild: *** compilation phase failed ERROR: Command ["gprbuild", "-s", "-j0", "-p", "-P", "/home/pi/Ada/pico/hello_pico/hello_pico.gpr"] exited with code 4 ERROR: Compilation failed.

The same sequence works as it should on MacOS. So it would appear the necessary toolchain to cross-compile from RaspberryOS to Pico 2040 is missing. Does any one know if one exists. I've looked in the online catalogue of software to no success.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.