Cidl (for CANOpen Interface Description Language) is a simple IDL for describing CANOpen dictionaries.
This is designed to be used in conjunction with ivory-tower-canopen.
Cidl has a type language which permits the user to define types using the following primitives:
- Atomic types:
- Signed integers of 8, 16, 32, 64 bit width
- Unsigned integers of 8, 16, 32, 64 bit width
- IEEE 754 single and double precision floating point numbers
- Boolean values
- User-defined Enum types:
- Pairs of names and values, where names and values must have a one-to-one correspondence
- User specified representation width (8, 16, 32, or 64 bits)
- User-defined Newtypes:
- Wraps an existing atomic or enum type with a new type
- User-defined Records:
- Set of named fields. Corresponds to a record or a C struct.
- Fields may be of any other user-defined type
Cidl requires the stack
build tool; it will download and
configure appropriate versions of Haskell tools automatically.
In order to build the code generated by the the Ivory and Tower backends, we require the Ivory, Tower, and ivory-tower-stm32 repositories. These should also be found, by default, in the parent directory, but alternate locations can be specified when running Cidl.
git clone https://github.com/galoisinc/ivory
git clone https://github.com/galoisinc/tower
git clone https://github.com/galoisinc/ivory-tower-stm32
The stack.yaml
file assumes you have checked out this repository as
a submodule of distrap-build
. For a
standalone build, edit the relative paths for the prerequisite
packages in stack.yaml
.
The default target builds the cidl library. You can then use stack exec cidl -- <OPTIONS>
to run the code generator. Use the --help
option to get usage information.
Cidl was created for DistRap project by Richard Marko.
Cidl was inspired by Gidl by Pat Hickey, with help from Getty Ritter and Trevor Elliott, as part of the SMACCMPilot project.