简体   繁体   English

如何执行使用arm-none-eabi-gcc编译的文件

[英]How to execute a file compiled using arm-none-eabi-gcc

I've written a hello world program in C on a Linux machine. 我已经在Linux机器上用C编写了一个hello world程序。 The compilation was done using a toolchain arm-none-eabi-gcc (that I will later use for cross compilation). 编译是使用工具链arm-none-eabi-gcc (稍后将用于交叉编译)完成的。 But I would like to test the execution of this application on the same machine before advancing any further. 但是我想在进一步进行测试之前在同一台机器上测试该应用程序的执行情况。 However, when the executable is created after the compilation, I try to execute using ./hello but I receive the error 但是,在编译后创建可执行文件时,我尝试使用./hello执行,但收到​​错误

bash: ./hello: cannot execute binary file

How do I execute then an executable that was compiled with the aformentioned toolchain? 然后如何执行使用上述工具链编译的可执行文件?

Copy the executable to the machine which runs the arm-none-eabi-gcc compiler and execute it . 将可执行文件复制到运行arm-none-eabi-gcc编译器的计算机上并执行它。 Or in the emulators . 还是在模拟器中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM