Skip to content

type declaration error when using Arinc 653 Blackboard with POK #16

@etienne-zante

Description

@etienne-zante

When using intra partition communication with Pok, ocarina-backends-pok_c-deployment.adb check wether ARINC 653 is used or not but in both case the final type used is uint8_t. In fact in case of using ARINC653, BLACK_BOARD_ID_TYPE is a 32 bits integer and not a 8 bits. This will not result in a compilation error but probably in an execution error (misaligned address for example).

To correct this problem, I suggest to change lines 2306 to 2309 of ocarina-backends-pok_c-deployment.adb :

CTU.Make_Variable_Declaration
                         (Defining_Identifier =>
                            CTU.Make_Defining_Identifier (Map_Port_Var (F)),
                          Used_Type => RE (RE_Uint8_T));

by :

CTU.Make_Variable_Declaration
                         (Defining_Identifier =>
                            CTU.Make_Defining_Identifier (Map_Port_Var (F)),
                          Used_Type => Type_Used);

I also suggest to change "RH_Types" line 644 of ocarina-backends-pok_c-runtime.ads by "RH_Blackboard" in order to add the correct header

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions