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

Failed running the example arinc653-buffer #16

Open
github615 opened this issue Feb 19, 2019 · 0 comments
Open

Failed running the example arinc653-buffer #16

github615 opened this issue Feb 19, 2019 · 0 comments

Comments

@github615
Copy link

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 github615 reopened this Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant