I have a question about a way to call a "C" function that is in a ROM, looking for a way to do this without involving link-time changes.
For example, we know the "C" function:
int my_func(int a);
is located at address 0xFFFF_AAAA;
so we try:
type ROM_my_func is access function (a : Interfaces.C.int) return Interfaces.C.int;
pragma Convention (C, ROM_my_func);
ADA_my_func : ROM_my_func := 16#FFFF_AAAA#;
The error I can't get around is the assignment of ADA_my_func, unsure if there is a typecast, and an attempt at using System.Address_To_Access_Conversions did not prove successful either.
Any pointer(s) to examples and/or help would be greatly appreciated.