简体   繁体   English

交叉编译到嵌入式系统

[英]Cross compilation to embedded system

I'm new in embedded systems development. 我是嵌入式系统开发的新手。 I just want to compile some C code for this system: 我只想为此系统编译一些C代码:

 uname -mrs
 Linux 2.6.32.28_stm24_0207 sh4
 machine         : STb7100 Reference board
 processor       : 0
 cpu family      : sh4
 cpu type        : STx7100
 cut             : 3.x
 cpu flags       : fpu
 cache type      : split (harvard)
 icache size     : 16KiB (2-way)
 dcache size     : 32KiB (2-way)
 address sizes   : 29 bits physical
 bogomips        : 264.19

Can anybody tell me the steps how to accomplish C compilation on my PC (Ubuntu) with GCC for that kind of system. 谁能告诉我如何使用GCC在我的PC(Ubuntu)上完成针对此类系统的C编译步骤。 I just need a little guidance. 我只需要一点指导。

A quick google search indicates that chip has an ST40 cpu core. 谷歌快速搜索表明该芯片具有ST40 cpu内核。 Another google search turned up this link which has all of the instructions you need. 另一个Google搜索打开了此链接 ,其中包含您需要的所有说明。

Building a cross compiler is not trivial. 构建交叉编译器并非易事。 Having said that, should you march down that path at the end you will know a lot more about how the gcc compiler really works, there are, very likely, a bunch of things you don't know that you don't know here. 话虽如此,如果您最终走了这条路,您将会对gcc编译器的真正工作方式有更多的了解,很可能有很多事情您可能不知道,您在这里也不知道。 Then again, @Carl Norum has the easier path. 再说一次,@ Carl Norum有更简单的方法。 Bottom line, the former path is more rewarding, the latter is easier :-) 归根结底,前者的路径更有意义,后者更容易:-)

You need a cross compiler so you can compile your app in your pc and download it to the device, the one suitable for that processor, for example the one for this : http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&ved=0CD4QFjAC&url=http%3A%2F%2Fwww.avi-plus.com%2Fdownload%2FSTb7100MB.pdf&ei=DIbyUbXZGYay9gTB_4GYDg&usg=AFQjCNHaAj1_zgFosaQPmP1htiz9e6KGCw&sig2=TCVzRlWfaqcvyAjyU1jjsw&bvm=bv.49784469,d.eWU is Altera VHDL Compiler. 您需要一个交叉编译器,以便可以在您的PC中编译您的应用并将其下载到适合该处理器的设备上,例如: http : //www.google.com/url?sa=t&rct = J&q =&ESRC = S&源=网页及CD = 3&CAD = RJA&VED = 0CD4QFjAC&URL = HTTP%3A%2F%2Fwww.avi-plus.com%2Fdownload%2FSTb7100MB.pdf&EI = DIbyUbXZGYay9gTB_4GYDg&USG = AFQjCNHaAj1_zgFosaQPmP1htiz9e6KGCw&SIG2 = TCVzRlWfaqcvyAjyU1jjsw&BVM = bv.49784469,d.eWU是Altera的VHDL编译器。 After that you could need some kind of sdk. 之后,您可能需要某种SDK。

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

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