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.
You need to use uClinux and not directly Linux, because the Cortex M3 doess not have a Memory Management Unit (MMU) and only a Memory Protection Unit (MPU). This can bring some interesting software development challenges such as (apparently random) kernel panics, the lack of fork, memory fragmentation and more.
To begin, the initial hardware needed to run Linux on an Arm Cortex-A15 processor must be identified. This should include the core, memory, and a UART.
The other tabs contain Linux kernel images, patches and utilities to run Linux on ARM processors and ARM Versatile platforms. Linux is the version of Linux running on processors with a Memory Management Unit (MMU). Processors without MMU can run a modified version of Linux called uClinux.
"Linux can not run in the confined flash and ram of cortex-M0 and cortex-M4 ARM processors." It depends entirely on how much RAM and flash those parts have. Many of these Cortex-M processors support the use of external RAM and flash.
A port of Linux to the M3 was done by Catalin Marinas of ARM.
You can find information about it here: http://www.linux-arm.org/LinuxKernel/LinuxM3
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()
.
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With