comp.lang.ada
 help / color / mirror / Atom feed
* Packed array problem
@ 2016-03-02 17:26 Simon Wright
  2016-03-05 15:07 ` rrr.eee.27
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Simon Wright @ 2016-03-02 17:26 UTC (permalink / raw)


Investigating the SVD2Ada program[1], for converting an ARM System View
Description[2] into bindings, I got this message when compiling against
my STM32F429I runtime:

   stm32f429x-rcc.ads:149:09: packing of 3-bit components not supported
   by configuration

which is the same as in this little example:

     1. package Checks is
     2.    type Uint3 is mod 8 with Size => 3;
     3.    type Arry is array (0 .. 1) of Uint3
                |
        >>> packing of 3-bit components not supported by configuration

     4.    with Component_Size => 3, Size => 6;
     5. end Checks;

This code compiles perfectly happily against AdaCore's ravenscar-sfp
runtime.

The error message comes from freeze.adb:2721 in the compiler:

            if Is_Constrained (Arr)
              and then Is_Bit_Packed_Array (Arr)
              and then Present (Packed_Array_Impl_Type (Arr))
              and then Is_Array_Type (Packed_Array_Impl_Type (Arr))
            then
               declare
                  CS : constant Uint  := Component_Size (Arr);
                  RE : constant RE_Id := Get_Id (UI_To_Int (CS));

               begin
                  if RE /= RE_Null
                    and then not RTE_Available (RE)
                  then
                     Error_Msg_CRT
                       ("packing of " & UI_Image (CS) & "-bit components",
                        First_Subtype (Etype (Arr)));

and it would seem after much delving that the compiler is checking (in
rtsfind) for System.Pack_03, which isn't present in my runtime. If I
copy the spec from GCC 5.2.0 (not 4.9 - the interface has changed) then
check.ads compiles OK (I should say I normally use GCC 5.2.0, but this
problem is the same with GNAT GPL 2015).

BUT there is no s-pack03.ad? in AdaCore's arm-eabi runtimes! And when
compiling against the AdaCore runtimes there's no reference in the
generated binary to s-pack03!

SO has anyone got any idea as to what the compiler could be looking for
and finding in AdaCore's RTS but not in mine?

[1] https://github.com/AdaCore/svd2ada
[2] http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-27  1:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-02 17:26 Packed array problem Simon Wright
2016-03-05 15:07 ` rrr.eee.27
2016-03-05 15:42   ` Simon Wright
2016-03-06 22:55 ` Simon Wright
2016-03-27  1:12 ` rieachus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox