pok icon indicating copy to clipboard operation
pok copied to clipboard

Failed running the example arinc653-buffer

Open github615 opened this issue 6 years ago • 0 comments

When I run Makefile for the examples arinc653-blackboard and arinc653-buffer, I get below messages: /usr/local/src/pok/libpok/libpok.a(core.lo): In function pok_event_wait': /usr/local/src/pok/libpok/core/eventwait.c:32: undefined reference to pok_time_gettick' /usr/local/src/pok/libpok/libpok.a(arinc653.lo): In function TIMED_WAIT': /usr/local/src/pok/libpok/arinc653/time.c:33: undefined reference to __udivdi3' /usr/local/src/pok/libpok/arinc653/time.c:34: undefined reference to pok_thread_sleep' /usr/local/src/pok/libpok/libpok.a(arinc653.lo): In function GET_TIME': /usr/local/src/pok/libpok/arinc653/time.c:49: undefined reference to `pok_time_get' make[2]: *** [part1.elf] Error 1 make[1]: *** [partitions] Error 2 Code generation failed

I fixed the above errors by below action:

  1. Regarding to the file pok/libpok/core/timeget.c, I replaced the below line #if ( (! defined (POK_CONFIG_OPTIMIZE_FOR_GENERATED_CODE )) || ( defined (POK_NEEDS_FUNCTION_TIME_GET))) with #if ( (! defined (POK_CONFIG_OPTIMIZE_FOR_GENERATED_CODE )) || ( defined (POK_NEEDS_FUNCTION_TIME_GET))) || defined (POK_NEEDS_BUFFERS) || defined (POK_NEEDS_BLACKBOARDS)

  2. Regarding to the file pok/libpok/core/threadsleep.c, I replaced the below line #ifdef POK_NEEDS_THREADS with #if defined(POK_NEEDS_THREADS) || defined (POK_NEEDS_BUFFERS) || defined (POK_NEEDS_BLACKBOARDS)

  3. Regarding to the file pok/libpok/Makefile, I added ../kernel/libc/libc.lo as below: LO_DEPS= arch/arch.lo
    core/core.lo
    drivers/drivers.lo
    middleware/middleware.lo
    arinc653/arinc653.lo
    libm/libm.lo
    protocols/protocols.lo
    libc/libc.lo
    ../kernel/libc/libc.lo

I think the above action is just a temporary solution.

Now It works well when I run "make run" for the example arinc653-blackboard. But when I run "make run" for the example arinc653-buffer, only the below messages are displayed on the QEMU screen: Booting 'Poly ORBKernel'

root (hd0, 0) Filesystem type is fat, partition type 0x6 kernel /pok.elf [Multiboot-elf, <0x100000:0x1e502:0x0), shtab=0x11f280, entry=0x101f98]

github615 avatar Feb 19 '19 07:02 github615