AdaCore / bb-runtimes

Source repository for the GNAT Bare Metal BSPs
Other
65 stars 51 forks source link

Porting run-time to Arduino Due (SAM3X8E) #14

Closed BrentSeidel closed 5 years ago

BrentSeidel commented 5 years ago

I am trying to create a runtime so that I can write Ada code that runs on the Arduino Due based on the instructions in the tutorial. I found the sam4s directory to use as a starting point and copied it to sam3x8e. I could get that to build. Once I removed the sam4s svd files and replaced them by sam3x8e generated files, the build failed with the following errors:

$ gprbuild -P build/BSPs/ravenscar_sfp_sam3x8e.gpr
Compile
   [Ada]          setup_pll.adb
setup_pll.adb:34:06: "Interfaces.Sam" is not a predefined library unit
setup_pll.adb:35:06: "Interfaces.Sam.Efc" is not a predefined library unit
setup_pll.adb:36:06: "Interfaces.Sam.Pmc" is not a predefined library unit
setup_pll.adb:37:06: "Interfaces.Sam.Sysc" is not a predefined library unit
gprbuild: *** compilation phase failed

Where should I look to find these?

ravenscar_sfp_sam3x8e.gpr.txt ravenscar_sfp_sam4s.gpr.txt

I've attached the gpr files for both sam4s (which worked) and sam3x8e (which causes the errors). They are mostly the same except for sam4s->sam3x8e and has floating point set to false.

Any advice would be appreciated.

thanks, brent

Fabien-Chouteau commented 5 years ago

Hi @BrentSeidel,

For the run-time you have to call svd2ada with some specific options.

Have a look at this makefile and add the sm3x8e to inside: https://github.com/AdaCore/bb-runtimes/blob/community-2018/arm/sam/svd.mk

Regards,

BrentSeidel commented 5 years ago

Hello,

What calls this makefile? I made the following change to the makefile: rm -rf /svd /svdtmp

and reran the gprbuild with the same results. So I tried to back up a step and reran the build_rts.py with the following results: $ /usr/bin/python ./build_rts.py --bsps-only --output=build --prefix=arm-eabi/lib/gnat --link sam3x8e Cannot find source dir for arm/sam/sam3x8e/svd/i-sam-efc.ads

brent

On Jan 10, 2019, at 9:54 AM, Fabien Chouteau notifications@github.com wrote:

Hi @BrentSeidel,

For the run-time you have to call svd2ada with some specific options.

Have a look at this makefile and add the sm3x8e to inside: https://github.com/AdaCore/bb-runtimes/blob/community-2018/arm/sam/svd.mk

Regards,

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.