build hello_world with cross compiler
download cross compiler
Go to Texas Instruments webside to download SDK and Toolchains:
Processor SDK AM335X
Toolchain for AM335X Download
AM335x SDK Download
untar Toolchain with command:
tar -xvf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz
Export cross-compliter to enviromment variable $CC
export CC=/mnt/d/wsl_export/TI_Source/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf/bin
hello_world program
C hello world program:
#include <stdio.h>
void main()
{
printf("hello world\r\n");
}
build program:
$CC/arm-none-linux-gnueabihf-gcc main.c -o hello_world
No comments:
Post a Comment