Re: [pok-devel] Userspace arinc653 calls

[ Thread Index | Date Index | More lists.tuxfamily.org/pok-devel Archives ]


Hello,

Thanks for the suggestion. It didn't quite work but what I've found is that some arinc653 functions behave like this and others don't e.g. the arinc653/partition are call-able. I still haven't quite found what's the difference between the partition calls and the blackboard calls so that the blackboard calls are not able to be called.

Apart from the POK_NEEDS and POK_CONFIG defines, are there any other configurations that I'm overlooking?

Thanks,
Janek


On Tue, Jun 24, 2014 at 9:56 AM, <Herve.Peignelin@xxxxxxxxxxxxxxxxxxx> wrote:
Hello everybody,

I'm not expert in POK (I've just looked at it, but still didn't find the time to really try it), but I'm familiar with C and compile-time customization, and I think your problems comes from the fact that you define your POK_CONFIG_* and POK_NEEDS_* configuration constant AFTER including POK header files. Try to define it BEFORE #includes, it should compile better.

The usual way for such configuration defines is to put them all in a single file (named "pok_config.h" for example), and to include it before any other header file.

So you'll have a pok_config.h file that says:

#define POK_CONFIG_NB_BLACKBOARDS 1
#define POK_NEEDS_BLACKBOARDS 1
#define POK_NEEDS_MIDDLEWARE 1
#define POK_NEEDS_ARINC653_BLACKBOARDS 1

And your send.c file will start with:

#include "pok_config.h"
#include <types.h>
#include <libc/stdio.h>
#include <arinc653/blackboard.h>
#include <arinc653/types.h>

It should compile better.

Hervé Peignelin.



Janek van Oirschot <janekvoirschot@xxxxxxxxx>
Envoyé par : teejayyy@xxxxxxxxx

23/06/2014 23:39

Veuillez répondre à
pok-devel@xxxxxxxxxxxxxxxxxxx

A
pok-devel@xxxxxxxxxxxxxxxxxxx
cc
Objet
Re: [pok-devel] Userspace arinc653 calls





That might indeed explain it better, so I have now added the current files I use for my tests as attachment. I'm also well aware that the user_send function gets called every 1s as configured in the model..aadl but since my priority is getting the project to compile I don't think it matters that much.

Thanks,
Janek


On Mon, Jun 23, 2014 at 9:53 PM, Gedare Bloom <gedare@xxxxxxxxx> wrote:
Perhaps it will be helpful if you provide the example application you
are trying to build/run, and the exact error messages you are
receiving?

-gedare

On Mon, Jun 23, 2014 at 3:46 PM, Janek van Oirschot

<janekvoirschot@xxxxxxxxx> wrote:
> Hello,
>
> Thanks for your response. I have tried your suggestion but it doesn't solve
> the previous problems of arinc653/blackboard.h which isn't unexpected
> because then the errors would've suggested that i was making undefined
> references to pok_create_blackboard instead of arinc653's CREATE_BLACKBOARD.
>
> Are libpok includes hidden/obscured from including on the .c source files
> for POK?
>
> Thanks,
> Janek
>
>
> On Mon, Jun 23, 2014 at 9:01 PM, Julien Delange <
julien@xxxxxxxxx> wrote:
>>
>> Hi,
>>
>> Look at
>>
https://github.com/pok-kernel/pok/blob/master/libpok/include/middleware/blackboard.h
>> This will define what you need to include the content. Likely, you need to
>> define at least the following macro:
>>
>> POK_NEEDS_MIDDLEWARE
>> POK_NEEDS_BLACKBOARDS
>>
>>
>>
>>
>>
>> On Mon, Jun 23, 2014 at 2:54 PM, Janek van Oirschot
>> <
janekvoirschot@xxxxxxxxx> wrote:
>>>
>>> Sorry for being a bit vague about my problem.
>>> I think it's best explained using an example. Take the following
>>> (condensed) .c file:
>>>
>>> #include <arinc653/blackboard.h>
>>> #define POK_NEEDS_ARINC653_BLACKBOARD 1
>>>
>>> void arinc653_example()
>>> {
>>>     BLACKBOARD_ID_TYPE blackboard;
>>>     RETURN_CODE_TYPE     ret;
>>>
>>>     CREATE_BLACKBOARD("RTEMS blackboard", 15, &blackboard, &ret);
>>> }
>>>
>>>
>>> When trying to compile using a makefile that has build option --arinc653
>>> and a model.aadl that's linked to the arinc653_example function it gives
>>> errors that suggest that the #include of arinc653/blackboard.h failed (i.e.
>>> unknown type BLACKBOARD_ID_TYPE and implicit declaration of function
>>> CREATE_BLACKBOARD).
>>>
>>> Thanks,
>>> Janek
>>>
>>>
>>> On Thu, Jun 19, 2014 at 12:41 PM, Julien Delange <
julien@xxxxxxxxx>
>>> wrote:
>>>>
>>>> What do you mean by "no5 able to call"? Can you compile the code? If
>>>> yes, what is the error at runtime? Did you configure the blackboards?
>>>> The best approach would be to see the generated code from Ocarina and
>>>> mimic it.
>>>>
>>>>
>>>> On Thu, Jun 19, 2014 at 4:06 AM, Janek van Oirschot
>>>> <
janekvoirschot@xxxxxxxxx> wrote:
>>>>>
>>>>> Thanks for the response, Julien.
>>>>>
>>>>> I'm sorry but I think I have phrased my question wrong. I am working
>>>>> for RTEMS to get arinc653 calls from POK working on RTEMS.
>>>>> I'm trying to use arinc653 calls on POK (without anything RTEMS
>>>>> included). When trying to include one of the arinc653 header files (e.g.
>>>>> arinc653/blackboard.h) I still am not able to call any of the the blackboard
>>>>> APEX calls.
>>>>>
>>>>> Is it actually possible to call any of the arinc653 calls on userspace?
>>>>>
>>>>>
>>>>> On Wed, Jun 18, 2014 at 8:57 PM, Julien Delange <
julien@xxxxxxxxx>
>>>>> wrote:
>>>>>>
>>>>>> Dear Janek,
>>>>>>
>>>>>> Actually, the interface with RTEMS is not (yet) integrated in the main
>>>>>> branch of POK.
>>>>>> I would recommend to contact the authors of the virtualizer project.
>>>>>>
>>>>>> Julien.
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Jun 16, 2014 at 11:21 AM, Janek van Oirschot
>>>>>> <
janekvoirschot@xxxxxxxxx> wrote:
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I am trying to get arinc653 calls working on the RTEMS<->POK
>>>>>>> virtualizer project. I, however, am having trouble with getting arinc653
>>>>>>> calls working within rtems.
>>>>>>>
>>>>>>> So my question is whether it is actually possible to make arinc653
>>>>>>> calls in (non-generated) user code? I have seen that arinc653 code is
>>>>>>> generated using the .aadl models but none of the arinc653 calls are actually
>>>>>>> called in userspace code. So could it be possible?
>>>>>>>
>>>>>>> Thanks in advance,
>>>>>>> Janek
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>


[pièce jointe "error.txt" supprimée par Herve Peignelin/D7/PLAISIR/IN/BAIRSYST/ZODIAC] [pièce jointe "model.aadl" supprimée par Herve Peignelin/D7/PLAISIR/IN/BAIRSYST/ZODIAC] [pièce jointe "send.c" supprimée par Herve Peignelin/D7/PLAISIR/IN/BAIRSYST/ZODIAC]



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/