AdaCore / Ada_Drivers_Library

Ada source code and complete sample GNAT projects for selected bare-board platforms supported by GNAT.
BSD 3-Clause "New" or "Revised" License
236 stars 141 forks source link

Enable simple text IO in HiFive1_rev_B board? #359

Closed rod-chapman closed 3 years ago

rod-chapman commented 3 years ago

Could we change the default runtime in HiFive1_rev_B from "zfp-rv32imc" to "zfp-hifive1"? The latter implements System.Text_IO using UART0, and thus support GNAT.IO and Ada.Text_IO properly.

I think this just requires a change to scripts/config/boards.py to change the value of Runtime_Name_Suffix and then a rebuild of al the other auto-generated files.

Can anyone from AdaCore confirm that this is correct?

Fabien-Chouteau commented 3 years ago

Hi @rod-chapman,

The problem is that the HiFive1 rev B doesn't have as much ROM as the rev A, so using the the zfp-hifive1 run-time can lead to more problems.

You can use fe310-uart.ads to send text on the UART.

rod-chapman commented 3 years ago

On 01/09/2020 13:38, Fabien Chouteau wrote:

Closed #359 https://github.com/AdaCore/Ada_Drivers_Library/issues/359.

Indeed - I have a port of GNAT.IO working that uses FE310.UART and it seems to work well...

 Thanks,

  Rod

pat-rogers commented 3 years ago

On 01-Sep-20 8:06 AM, Roderick Chapman wrote:

On 01/09/2020 13:38, Fabien Chouteau wrote:

Closed #359 https://github.com/AdaCore/Ada_Drivers_Library/issues/359.

Indeed - I have a port of GNAT.IO working that uses FE310.UART and it seems to work well...

Can you share these, and all the other setup changes you've made?

rod-chapman commented 3 years ago

On 08/09/2020 15:23, Pat Rogers wrote:

Can you share these, and all the other setup changes you've made?

Sure... I am also working on getting access to the RV32 "cycle" and "instret" performance counters to get more accurate timing data.  Do I have permission(s) to open a Pull Request on the Ada_Drivers_Library repo?

 - Rod

Fabien-Chouteau commented 3 years ago

Hi @rod-chapman, anyone has permission to open Pull Request form a fork of the repo.

rod-chapman commented 3 years ago

OK... see new Issue #362 for the performance counters topic.