From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Packed array problem Date: Sun, 06 Mar 2016 22:55:27 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="900e1437335c90c92a3116ad49605f53"; logging-data="9217"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18hCJj5mfMgrq8CgVhCyYpL4/cE4Mrgz2s=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:DBRagCDI8pqaIJQFNJQh+ZNMaiY= sha1:ya6goyYYwpSLOovUv9s/TetmJZg= Xref: news.eternal-september.org comp.lang.ada:29689 Date: 2016-03-06T22:55:27+00:00 List-Id: Simon Wright writes: > 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. Solved. I had pragma Normalize_Scalars in package System; removed this, now all OK. I don't quite see why Normalize_Scalars should affect matters, since the compiler is quite capable of generating access-3-bits code directly in all normal cases! Normalize_Scalars came from the Ada Bare Bones tutorial at http://wiki.osdev.org/Ada_Bare_bones.