如何在 ARM Cortex M3 板上运行 linux?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6636830/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 05:01:30  来源:igfitidea点击:

How do I run linux on an ARM Cortex M3 board?

linuxarmbootloadercortex-m3

提问by wooster

I have a Luminary LM3s8962 ARM Cortex M3 development board, and while I've been able to program for it using the Keil RTOS, I'd much prefer to develop on top of linux and an embedded libc. What I would like to know is how can I actually get a linux kernel and my application and depdencies on my board? It has a SD slot, can I create some sort of filesystem image and just program the board with a bootloader? Would I have to write the bootloader myself? I have absolutely no clue where to start on any of this. I've looked into the yocto project, but I'm still at a loss of how to actually deal with the multi-megabyte kernel and filesystem image files and get my board to run them.

我有一个 Luminary LM3s8962 ARM Cortex M3 开发板,虽然我已经能够使用 Keil RTOS 为它编程,但我更喜欢在 linux 和嵌入式 libc 之上进行开发。我想知道的是我如何才能在我的板上实际获得 linux 内核以及我的应用程序和依赖项?它有一个 SD 插槽,我可以创建某种文件系统映像并使用引导加载程序对电路板进行编程吗?我必须自己编写引导加载程序吗?我完全不知道从哪里开始。我已经研究了 yocto 项目,但我仍然不知道如何实际处理多兆字节的内核和文件系统映像文件并让我的主板运行它们。

回答by ruhalde

Have you tried Embedded Compact .NET? (I can hear the BOOO BOO!! from here, lol) If you are familiar with Visual Studio coding its piece of cake.

您是否尝试过嵌入式紧凑型 .NET?(我可以从这里听到 BOOO BOO!!,大声笑)如果您熟悉 Visual Studio 编码它的小菜一碟。

I've tried long time ago in a Cortex M7 STM32 processor but was not good for my tight timing requirements. Check it out at http://msdn.microsoft.com/en-us/netframework/bb267253

我很久以前在 Cortex M7 STM32 处理器中尝试过,但不适合我严格的时序要求。在http://msdn.microsoft.com/en-us/netframework/bb267253查看

回答by RushPL

I am writing a graphical-GUI application on Cortex-M3 and I must say I do not miss Linux-host even a little. My program starts with main(), I have malloc from libc, SDCARD runs on FATS and works literally like fopen(), fread().

我正在 Cortex-M3 上编写图形 GUI 应用程序,我必须说我一点也不怀念 Linux 主机。我的程序从 main() 开始,我有来自 libc 的 malloc,SDCARD 在 FATS 上运行并且工作起来像fopen(), fread()

Sure you have to know your stuff, but Linux even if it ran it would eat all your resources and give you little to no advantage. If you do not need to run several apps in parallel (threads) and do not need advanced scheduling, you are much better starting from int main()and using libc.

当然你必须了解你的东西,但是即使 Linux 运行它也会消耗你所有的资源并且给你带来很少甚至没有优势。如果你不需要做并行运行几个应用程序(线程),并且不需要先进的调度,你要好得多,从开始int main()使用libc

回答by Tim Bird gaccount

A port of Linux to the M3 was done by Catalin Marinas of ARM.

Linux 到 M3 的移植是由 ARM 的 Catalin Marinas 完成的。

You can find information about it here: http://www.linux-arm.org/LinuxKernel/LinuxM3

您可以在此处找到有关它的信息:http: //www.linux-arm.org/LinuxKernel/LinuxM3

回答by ScienceProg

I wouldn't bother on trying to run Linux on ARM Cortex-M3, unless for learning things. Better grab board with MMU. If you are looking OS for Cortex M3, I would stick with some sort of RTOS.

我不会费心尝试在 ARM Cortex-M3 上运行 Linux,除非是为了学习。使用 MMU 更好地抓板。如果您正在寻找 Cortex M3 的操作系统,我会坚持使用某种 RTOS。