11
votes

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.

4
You're not the first person to attempt this: mail-archive.com/[email protected]/msg39238.htmlBen Voigt
I am guessing it would need to be a uclinux, I dont think there is a cortex-m with an mmu. Also I dont know if there are any with more than 64Kbytes. I have a thumb simulator you can try, look for thumbulator at github. 32 bit addressing so you can have gigabytes if you like. qemu is not a bad choice, they have thumb2 support, modify a stellaris target to have more memory.old_timer

4 Answers

8
votes

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

7
votes

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.

1
votes

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.

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

-1
votes

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.