Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#4543 closed task (worksforme)

cannot build multiprocessor application on eclipse

Reported by: mohamedosama94 Owned by:
Priority: high Milestone: 6.1
Component: arch/aarch64 Version: 6
Severity: critical Keywords:
Cc: Blocked By:
Blocking:

Description

Hi,

hope my mail finds you well, i have an issue as i am using rtems6 for zinq a53_lp64 i downloaded the source and installed the toolchain aarch64-rtems6 and i built the bsp successfully by using waf and i used the qemu to run the test samples exe files successfully , so i installed the eclipse and added rtems plugin to it and i built the sample rtems example successfully but when i try to build an application task has test_begin() or test_end() the make is uncomplete and error (.text.Init+0x50): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rtems_test_begin' always appear i tried open declaration and i found the reference prototype
int rtems_test_begin(const char* name, const RTEMS_TEST_STATE state);

on test-info.h so eclipse refuse to build as cannot see the source code of the function and this also for rtems_test_end so what i have to do to make the eclipse build the rtems-application, kindly check the logs

/home/mohamed/quick-starts/rtems/6/lib/gcc/aarch64-rtems6/10.3.1/../../../../aarch64-rtems6/bin/ld: o-optimize/init.o: in function `Init':
/home/mohamed/eclipse-ground/rtems/rtems-appinit.c:64: undefined reference to `rtems_test_begin'
/home/mohamed/eclipse-ground/rtems/rtems-app
init.c:64:(.text.Init+0x50): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rtems_test_begin'
/home/mohamed/quick-starts/rtems/6/lib/gcc/aarch64-rtems6/10.3.1/../../../../aarch64-rtems6/bin/ld: /home/mohamed/eclipse-ground/rtems/rtems-appinit.c:66: undefined reference to `locked_print_initialize'
/home/mohamed/eclipse-ground/rtems/rtems-app
init.c:66:(.text.Init+0x54): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `locked_print_initialize'
/home/mohamed/quick-starts/rtems/6/lib/gcc/aarch64-rtems6/10.3.1/../../../../aarch64-rtems6/bin/ld: o-optimize/init.o: in function `success':
/home/mohamed/eclipse-ground/rtems/rtems-appinit.c:31: undefined reference to `rtems_test_end'
/home/mohamed/eclipse-ground/rtems/rtems-app
init.c:31:(.text.Init+0x5c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rtems_test_end'
/home/mohamed/quick-starts/rtems/6/lib/gcc/aarch64-rtems6/10.3.1/../../../../aarch64-rtems6/bin/ld: /home/mohamed/eclipse-ground/rtems/rtems-appinit.c:32: undefined reference to `rtems_test_exit'
/home/mohamed/eclipse-ground/rtems/rtems-app
init.c:32:(.text.Init+0x64): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rtems_test_exit'
/home/mohamed/quick-starts/rtems/6/lib/gcc/aarch64-rtems6/10.3.1/../../../../aarch64-rtems6/bin/ld: o-optimize/init.o:(.rodata._User_extensions_Initial_extensions+0x80): undefined reference to `rtems_test_fatal_extension'
collect2: error: ld returned 1 exit status

best regards,
Mohamed

Change History (4)

comment:1 Changed on 11/03/21 at 16:11:38 by Joel Sherrill

Those symbols are part of the RTEMS test support and would not have been included in whatever test directory you copied. They may be in a test support library. I don't know if it is installed.

I hope you mean SMP and not multiprocessor. Those are different configurations in RTEMS terminology.

Which test did you copy?

comment:2 in reply to:  1 Changed on 11/04/21 at 10:43:20 by mohamedosama94

Replying to Joel Sherrill:

Those symbols are part of the RTEMS test support and would not have been included in whatever test directory you copied. They may be in a test support library. I don't know if it is installed.

I hope you mean SMP and not multiprocessor. Those are different configurations in RTEMS terminology.

Which test did you copy?

Dear Joel Sherrill,

thanks for your reply, yes I mean SMP, and this issue happens when I use any test suites samples that have test_begin() and test_end() functions like: "base_mp "test, "base_sp" test but test like "hello" that doesn't have these functions build normally on eclipse so how can I install the support library and make the eclipse can reach them

comment:3 Changed on 11/04/21 at 13:29:30 by Joel Sherrill

Replace test_begin() and test_end() with a print to denote beginning and end of the test.

base_mp is for the distributed multiprocessing model in RTEMS. You want to build with SMP not multiprocessing (confusing I know). And I don't think there is an SMP sample. You may have to look at one of the tests smptest directory. These all use test support functions also but smpschedaffinity01 and smpschedaffinity01 are not large and show how to do affinity. smpthreadpin01 shows pinning but is a bit more complicated than just demonstrating that a collection of threads were properly assigned to the desired core.

comment:4 Changed on 12/16/21 at 15:38:53 by Joel Sherrill

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.