Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
etienne-zante opened this issue Sep 9, 2014 · 3 comments
Closed
Assignees
Labels

Comments

@etienne-zante
Copy link

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

@yoogx
Copy link
Contributor

yoogx commented Oct 1, 2014

Two questions: do you have a reproducer for these issues that exhibits wrong behavior?
I sent your questions to pok-devel to know whether this is OK

@juli1
Copy link
Contributor

juli1 commented Oct 8, 2014

Is this patch/change tested and validated? I am wondering if the code compiles with such changes.

yoogx added a commit that referenced this issue Dec 10, 2014
@yoogx yoogx added the bug label Dec 10, 2014
@yoogx
Copy link
Contributor

yoogx commented Dec 10, 2014

Patch has been approved through discussion on pok-devel. Closing the ticket

@yoogx yoogx closed this as completed Dec 10, 2014
@yoogx yoogx self-assigned this Feb 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants