hello world program

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

hello world program

1,287 次查看
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,281 次查看
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,272 次查看
rashmikj
Contributor III

Hi,

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

0 项奖励
回复

1,258 次查看
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 项奖励
回复