270 Commits

Author SHA1 Message Date
Pat Rogers
7a726b49a5 Merge pull request #109 from godunko/master
Add option to use `No_Elaboration_Code_All` pragma.
2025-02-13 16:09:05 -06:00
Pat Rogers
ab0b7afb7f Merge pull request #85 from filip-gajowniczek-adacore/hotfix/remove-unused-packages
Removed unused packages
2025-02-13 15:56:15 -06:00
Pat Rogers
c16858559c Merge pull request #108 from simonjwright/fix/ci+dimensioned-regs
Fix CI; add dimensioned register fields
2025-02-05 16:20:57 -06:00
Vadim Godunko
576884b646 Add option to use No_Elaboration_Code_All pragma. 2024-11-30 18:50:37 +04:00
Simon Wright
4e4228af54 Fix style warnings.
Warnings reported in CI by GCC 14.2.1 on Ubuntu, but not locally on
macOS.

  * src/descriptors-field.adb:
      descriptors-field.adb:302:19: warning: "Addition" is not modified
      descriptors-field.adb:303:19: warning: "Index" is not modified
      descriptors-field.adb:304:19: warning: "LSB" is not modified
      descriptors-field.adb:305:19: warning: "MSB" is not modified
      descriptors-field.adb:310:25: warning: "Percent_S" is not modified
      descriptors-field.adb:313:25: (style) "exit Substitute" required
      descriptors-field.adb:372:07: warning: "Full_Fields" is not modified
2024-09-03 14:44:19 +01:00
Simon Wright
4c0d576bfd Update manifest to 0.1.1.
* alire.toml (version): updated to 0.1.1.
    (xmlada): updated to ">=22.0.0" (we're presently on 24.0.0).
2024-09-03 14:31:17 +01:00
Simon Wright
a0f8942eaa Process dimensioned record fields.
From the SVD, field components have an optional <dimElementGroup>:
  <dim> specifies the number of array elements,
  <dimIncrement> specifies the address (?bit) offset between consecutive
    array elements,
  (optional) <dimIndex> specifies "a comma seperated list of
    strings being used for identifying each element in the array",
    but we only see r'[0-9]+\-[0-9]+'.

We will produce <dim> fields, where %s in the Name translates to the
first component of <dimIndex> incremented by 1 for each field, and
LSB, MSB are incremented by <dimIncrement>.

  * src/descriptors-field.ads
    (Field_T): added components
      Dimensions: contents of the <dim> field in the SVD,
      Increment: contents of the <dimIncrement> field in the SVD,
      Index: the first component of the <dimIndex> field in the SVD.
    (Null_Field): added values for the new components, using associations.
  * src/descriptors-field.adb:
    (context): with Ada.Strings.Fixed, so we can pick out which Trim is
      required.
    (Read_Field): initialize new fields in Result. In particular, Dimensions
      will be set to 1. If present, process tags dim, dimIncrement, dimIndex.
    (Dump): add new function Insert_Dimensioned_Fields. Call this function
      on the input Reg_Fields, and then run the rest of Dump on the result.
    (Insert_Dimensioned_Fields): new. For each Field in the original, insert
      as many copies as indicated by its Dimensions, updating the Name, LSB
      and MSB. Note that if the original field from the SVD had no <dim>
      component, Dimensions will have been set to 1 by Read_Field, so this
      process will be done just once (resulting in no change).
2024-09-03 14:21:03 +01:00
Simon Wright
11e0aa11d9 Fix warning: "variable is assigned but never read".
This warning (treated as error) causes build failure in CI on at least
Ubuntu.

  * src/ada_gen.adb (Get_Boolean): rename Dead, Dead2 to Dummy, Dummy2,
      so GNAT won't report unused warnings.
2024-09-03 14:17:32 +01:00
Simon Wright
2873046bae Install schema, SVDs.
* svd2ada.gpr (Install): new.
2024-09-03 14:07:34 +01:00
Simon Wright
1c854eab4d CI runs on latest OSs
* .github/workflows/main.yml:
    (gnat_version): removed.
    (gprbuild_version): removed.
    (actions/checkout): v3.
    (project/setup-alire): v3.
    (toolchain): specify gnat_native before gprbuild, to avoid picking
      mismatched versions.
2024-09-03 14:04:46 +01:00
Pat Rogers
1ef42c7f85 Merge pull request #101 from Irvise/fix-msb
Fix MSB before LSB
2024-02-06 09:46:05 -06:00
Fernando Oleo Blanco
167aa9ee52 Fix scope of new variable 2023-01-05 21:46:02 +01:00
Fernando Oleo Blanco
74c72ff99e Allow MSB to be set before LSB 2023-01-05 21:21:15 +01:00
aiunderstand
c7327830c8 Added nrf52833 SVD used in MicrobitV2 2022-12-12 10:51:55 +01:00
Fabien Chouteau
6eb0b591bf Add GitHub CI workflow 2022-02-28 18:23:52 +01:00
Fabien Chouteau
5c88c0f696 Fix style issues 2022-02-28 18:23:52 +01:00
Fabien Chouteau
6c57edf0b6 Make svd2ada buildable with Alire 2022-02-28 18:23:52 +01:00
Pat Rogers
56a3e6034f Merge pull request #87 from elbric0/master
Removed unused packages
2021-12-06 15:59:01 -06:00
elbric0
34b86c482a Removed unused packages 2021-09-12 18:09:25 -04:00
Filip Gajowniczek
d221674460 Removed unused packages which cause release compilation to fail due to warnings as errors compilation switch 2021-04-27 13:30:51 -05:00
Pat Rogers
861c829c99 Merge pull request #82 from JeremyGrosser/rp2040
Raspberry Pi RP2040
2021-02-11 09:43:01 -06:00
Jeremy Grosser
11c19839ec rp2040: Add UART groupName 2021-02-10 12:24:54 -08:00
Jeremy Grosser
b571aa8dc7 Merge pull request #1 from Fabien-Chouteau/rp2040
rp2040: Add 'groupName' to SPI and I2C periph
2021-02-10 05:56:45 -05:00
Fabien Chouteau
bfb4a3f671 rp2040: Add 'groupName' to SPI and I2C periph
This will make svd2ada produce only one package for each type of device,
but with multiple instances in the package.
2021-02-10 11:22:25 +01:00
Jeremy Grosser
9557bc5437 Check bounds before comparing "STM32" 2021-01-28 21:20:17 -08:00