ตัวอย่างนี้จะแสดงถึงวิธีการพัฒนาเบื้องต้น
โดยจะใช้ arm-elf-gcc ในการ Compile
การติดตั้ง arm-efl-gcc สำหรับ uClinux
โดยจะใช้ arm-elf-gcc ในการ Compile
การติดตั้ง arm-efl-gcc สำหรับ uClinux
- Download ตัวติดตั้งได้เช่นกัน ที่ ucLinux ARM cross compiler
- จากนั้นเลือก Binary ไฟล์ (นามสกุล .sh) มายังเครื่องแล้วทำตามขั้นตอนดังนี้
- [_shell_] chmod a+x arm-elf-tools-xxxxxxxx.sh
- [_shell_] sudo ./arm-elf-tools-xxxxxxxx.sh (กรณีทดลองบน Ubuntu)
- Coding ไฟล์ตัวอย่าง hello.c
- Compile ด้วย arm-elf-gcc แล้วเราจะได้ Binary ไฟล์ที่พร้อมทำงานบน Embedded Linux
#include <stdio.h>
int main(void) {
printf("Hello, embedded linux!\n");
return 0;
}
$>arm-elf-gcc -Wl,-elf2flt -o hello hello.c
ไม่มีความคิดเห็น:
แสดงความคิดเห็น