UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Reply

Error while creating an application on XilKernel BSP

Highlighted
Observer
Posts: 20
Registered: ‎10-06-2016

Error while creating an application on XilKernel BSP

Hallo,

I've a MPSoC with four MBs and just first MB has RS232_UART as standard I/O.  I want now  to run XilKernel on each MB. I can create XilKernel BSPs for every MB without any problem but only the application for 1. MB can be created or the .elf file can be generated. For other three application of MBs 2, 3 and 4 I get the error (please see attachments). 

I've attached only the MHS and MSS files for the 2. MB but the problem and configuration is also the same for MB 3 and 4. As you can see on attached files, there is no reson to get such an error during compilation of application, so that the linker have not to include any bibliothek that uses I/O functions which cause this error. 
There is no problem during the creation of  XilKernel BSPs, the error comes when I try to create application for MB 2,3 and 4. 

 

What could be the problem? Is it possible that the compiler or linker try to include some default libraries and I need to change some parameters of gcc linker or gcc compiler in SDK? If yes, than which parameters?

 

Please help! I did my project using Standalone BSPs and now I have to rebuild it using XilKernel and I have only one week time. 

 

Best regards 
Usam

xil_kernel_error.png
mhs_xilkernel.png
mss_xilkernel.png
Moderator
Posts: 334
Registered: ‎09-12-2007

Re: Error while creating an application on XilKernel BSP

in your code you are using a printf statement, but you have the stdin/out set to none. so either remove the printff from your code, or set the stdin/out in the bsp to your uart

Observer
Posts: 20
Registered: ‎10-06-2016

Re: Error while creating an application on XilKernel BSP

But there no statement im code that would try to print. 
I created just one source file main.c with the following source code and it causes the decribed error above. 

#include "xmk.h"
#include "os_config.h"
#include <pthread.h>


void *my_thread(void *dummy)
{

}

 

int main()
{

 

xilkernel_main();

return 0;


}

 

In MSS-file I also explicitly deactivated the debugging options: 

PARAMETER config_debug_support = false
PARAMETER verbose = false

 

But I still have the same error: 

 

'Building file: ../src/main.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -D __XMK__ -I../../xilkernel_mb1/microblaze_1/include -mno-xl-reorder -mcpu=v8.50.b -mxl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/main.d" -MT"src/main.d" -o "src/main.o" "../src/main.c"
'Finished building: ../src/main.c'
' '
'Building target: mb1_xilkernel.elf'
'Invoking: MicroBlaze gcc linker'
mb-gcc -Wl,-T -Wl,../src/lscript.ld -L../../xilkernel_mb1/microblaze_1/lib -mcpu=v8.50.b -mxl-soft-mul -Wl,--no-relax -Wl,--gc-sections -o "mb1_xilkernel.elf" ./src/main.o -lxilkernel
../../xilkernel_mb1/microblaze_1/lib\libxil.a(xil_printf.o): In function `padding':
/gnu/mb_gnu/src/newlib/libgloss/microblaze/xil_printf.c:50: undefined reference to `outbyte'
../../xilkernel_mb1/microblaze_1/lib\libxil.a(xil_printf.o): In function `outnum':
/gnu/mb_gnu/src/newlib/libgloss/microblaze/xil_printf.c:112: undefined reference to `outbyte'
../../xilkernel_mb1/microblaze_1/lib\libxil.a(xil_printf.o): In function `xil_printf':
/gnu/mb_gnu/src/newlib/libgloss/microblaze/xil_printf.c:168: undefined reference to `outbyte'
../../xilkernel_mb1/microblaze_1/lib\libxil.a(xil_printf.o): In function `outs':
/gnu/mb_gnu/src/newlib/libgloss/microblaze/xil_printf.c:66: undefined reference to `outbyte'
../../xilkernel_mb1/microblaze_1/lib\libxil.a(xil_printf.o): In function `xil_printf':
/gnu/mb_gnu/src/newlib/libgloss/microblaze/xil_printf.c:229: undefined reference to `outbyte'
../../xilkernel_mb1/microblaze_1/lib\libxil.a(xil_printf.o):/gnu/mb_gnu/src/newlib/libgloss/microblaze/xil_printf.c:238: more undefined references to `outbyte' follow
collect2: ld returned 1 exit status
make: *** [mb1_xilkernel.elf] Fehler 1

 

 

As you see the error comes after compiling and invoking the linker. Is it possible that the linker includes some libraries and some modules of this libraries some print statements by default?

 

Best regards
Usam

 

 

Moderator
Posts: 2,753
Registered: ‎08-02-2007

Re: Error while creating an application on XilKernel BSP

hi,

 

would that be possible to share the HDF of this design?

 

--hs

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------