English 中文(简体)
第十期“自动取款”交叉编
原标题:problems with arm-elf-gcc cross compiler on OS X

I m 试图汇编我的首个轴心ARM hello世界方案,当我复制并操作双向我的 target球板(Llinuxstamp Atmel arm 9g20) 我获得“法律指导”。

我正在从港口从SOS X上运行军机。 我正在使用Eclipse for and IDE。 它更像建筑一样,只靠非职业介绍方案,而代之以在轴心用户空间运行。 难道有人会把我指向正确的方向? 感谢。

法典:

#include<stdio.h>

int main(){
    printf("hello world
");
    return 0;
}

<><><>>>> 为项目“军备试验”建立配置**

make all Building target: ArmTest.elf Invoking: ARM Mac OS X GCC C Linker /opt/local/bin/arm-elf-gcc-4.6 -nostartfiles -Wl,-Map,ArmTest.map -mcpu=arm920 -mthumb -o"ArmTest.elf" ./main.o
/opt/local/lib/gcc/arm-elf/4.6.0/../../../../arm-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000008000 Finished building target: ArmTest.elf

Invoking: ARM Mac OS X GNU Create Flash Image /opt/local/bin/arm-elf-objcopy -O binary ArmTest.elf "ArmTest.hex" Finished building: ArmTest.hex

Invoking: ARM Mac OS X GNU Create Listing /opt/local/bin/arm-elf-objdump -h -S ArmTest.elf >"ArmTest.lst" Finished building: ArmTest.lst

Invoking: ARM Mac OS X GNU Print Size /opt/local/bin/arm-elf-size --format=berkeley ArmTest.elf text data bss dec hex filename 8112 2104 232 10448 28d0 ArmTest.elf Finished building: ArmTest.siz

最佳回答

I am running arm-elf-gcc-4.6 on OS X from macports [...] It looks like the build is more for a stand alone non OS program rather then code to run in linux user space.

Indeed, this is for embedded ARM devices without Linux OS. The Linux variant of gcc as cross compiler for ARM should have "linux" somewhere in its name like "arm-linux-gcc".

问题回答

暂无回答




相关问题
arm7 usb programming

we are developing a sendor device, with a arm7(current: LPC2368) . this device samples a mv signal,A/D, and need to send this signal data to the PC.(continusly) at the same time, PC need send ...

Fast sine/cosine for ARMv7+NEON: looking for testers…

Could somebody with access to an iPhone 3GS or a Pandora please test the following assembly routine I just wrote? It is supposed to compute sines and cosines really really fast on the NEON vector FPU....

Steps to read data from ARM microcontroller port

I am having trouble reading serial data from ARM LPC2378 microcontroller. Will I have to use UART or any GPIO port can be used?? is ayone having c code for it??

Linux user-space ELF loader

I need to do a rather unusual thing: manually execute an elf executable. I.e. load all sections into right places, query main() and call it (and cleanup then). Executable will be statically linked, so ...

Sample Android BSP(Source) for ARM

I am looking for a ARM processor version of Android BSP to port it for one of my experimental boards. Where can I download this?

热门标签