Re: [pok-devel] Userspace arinc653 calls

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


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
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>



Compile node cpu (generated-code/cpu)
../../../send.c:28:1: error: unknown type name âBLACKBOARD_ID_TYPEâ
 BLACKBOARD_ID_TYPE blackboard;
 ^
../../../send.c: In function âuser_sendâ:
../../../send.c:41:3: warning: implicit declaration of function âCREATE_BLACKBOARDâ [-Wimplicit-function-declaration]
   CREATE_BLACKBOARD("blackboard without aadl generating arinc653 calls", 30, &blackboard, &ret);
   ^
../../../send.c:49:2: warning: implicit declaration of function âDISPLAY_BLACKBOARDâ [-Wimplicit-function-declaration]
  DISPLAY_BLACKBOARD(blackboard, "this is a test message", 30, &ret);
  ^
../../../send.c:55:2: warning: implicit declaration of function âREAD_BLACKBOARDâ [-Wimplicit-function-declaration]
  READ_BLACKBOARD (
  ^
make[2]: *** [../../../send.o] Error 1
make[1]: *** [partitions] Error 2
Code generation failed
make: *** [build] Error 1

Attachment: model.aadl
Description: Binary data

/*
 *                               POK header
 * 
 * The following file is a part of the POK project. Any modification should
 * made according to the POK licence. You CANNOT use this file or a part of
 * this file is this part of a file for your own project
 *
 * For more information on the POK licence, please see our LICENCE FILE
 *
 * Please follow the coding guidelines described in doc/CODING_GUIDELINES
 *
 *                                      Copyright (c) 2007-2009 POK team 
 *
 * Created by julien on Thu Jan 15 23:34:13 2009 
 */


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

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

BLACKBOARD_ID_TYPE blackboard;
RETURN_CODE_TYPE ret;

void user_send ()
{
	MESSAGE_ADDR_TYPE message;
	MESSAGE_SIZE_TYPE len;
	
	CREATE_BLACKBOARD("blackboard without aadl generating arinc653 calls", 30, &blackboard, &ret);
	if(ret != 0)
	{
		printf("ret error after create blackboard: %d\n", (int)ret);
	}
	
	DISPLAY_BLACKBOARD(blackboard, "this is a test message", 30, &ret); 
	if(ret != 0)
	{
		printf("ret error after display blackboard: %d\n", (int)ret);
	}
	
	READ_BLACKBOARD (
       /*in */ blackboard, 
       /*in */ 0, 
       /*out*/ message, 
       /*out*/ &len, 
       /*out*/ &ret ); 
	if(ret != 0)
	{
		printf("ret error after read blackboard: %d\n", (int)ret);
	}
}


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