hello world program

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

hello world program

1,259件の閲覧回数
rashmikj
Contributor III

Hi, 

I am using LS1046ardb Kit. Iam able to compile a sample hello world example in Ubuntu 18 using cross compiler aarch64-linux-gnu-gcc and tranfer the object files to the kit using serial port kermit. When i run the file in the kit , nothing get displayed on the kit console. how do i print messages in the console.

Kindly help.

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

1,253件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Please try whether the attached elf file can be executed to print "Hello World" successfully on your target board.

1. On your host PC create test.c as the following.

#include <stdio.h>

void main()
{
printf("Hello World!");
}

2. Cross compile test.c.

aarch64-linux-gnu-gcc test.c -o test.out

3. Copy test.out to ls1046ardb target board.

root@TinyDistro ~]$ ./test.out
Hello World![root@TinyDistro ~]

0 件の賞賛
返信

1,244件の閲覧回数
rashmikj
Contributor III

Hi,

Thank for the solution. How to transfer the file to the kit? Which protocol is supported?

0 件の賞賛
返信

1,230件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

You could copy the file to USB storage device. Or setting up networking environment, and use "scp" command to copy the file from the PC to the target board.

0 件の賞賛
返信