[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

What's required to run Linux on a 32-bit microcontroller?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 23
Thread images: 2

File: STM32F3DISCOVERY-3.jpg (123KB, 914x686px) Image search: [Google]
STM32F3DISCOVERY-3.jpg
123KB, 914x686px
What's required to run Linux on a 32-bit microcontroller? I assume you'd have to somehow interface some more RAM and control that, but what else would you have to do?
t. CS pleb who should've EE
>>
https://github.com/torvalds/linux/tree/master/arch
>>
>>56987564
Don't you mean CE
>>
>>56987594
So lets say I get a 32-bit ARM MCU, what do I need to do next?

>>56987604
That's just the lame portions of both programs, at least at my school
>>
>>56987564
Microcontroller? Assuming there is port for it already... Enough RAM, a way to load the kernel, and drivers for whatever built-in devices you want to use, so probably UART (serial for console) and SPI bus (for storage).
>>
>tfw /g/ is too full of consumer tech retardation to talk about anything cool
>>
You'll need more memory than most microcontrollers have onboard for RAM. So getting something that has external SRAM capabilities would be good. I have been able to run uCLinux on an STM32F429 with some external SRAM, I think it had about 8MB. But developing software for it wasn't exactly the same but close enough. Was able to run nash and get Ethernet with a full TCP/IP stack running.
>>
>>56987697

Oh yeah, one thing you have to remember most of these microcontrollers do not have any sort of proper MMU meaning all the application and kernel memory is in the same memory mapped space, meaning if you run three application each 1 MB a piece and then close the second one you started you end up with a 1MB hole in your RAM that if you wanted to try and run an application requesting > 1MB of space it won't be able to fit it continuously in that spot.

If you are interesting in just having a POSIX like development experience on a micro controller, I would recommend looking at NuttX it has a file and driver system you'll be familiar with and is also properly designed to work on many microcontrollers.
>>
OP, Why do you want to run linux on a uC?
>>
>>56987697
How to you hookup external RAM to that? I've never used a micro that had that capability, just atmel, xtensa. And those can't afaik.
>>
>>56987564
You really want a microcontroller? If you want to run linux on it, maybe you want a SoC.
>>
File: 1474224703131.png (1MB, 800x600px) Image search: [Google]
1474224703131.png
1MB, 800x600px
>>56987748
What can I read to further my knowledge about uC and linux?In college I just used uC as anembedded system to interface with some sensors and actuator.We used the tiva TMC4C123GH6PM.Now, I want to explore more about the inners of the systems.
>>
>>56987776

Some microcontroller include the ability to connect to extra SRAM, which you can then map during initial start up for you application.

Example of one is the STM32F429. I was building a custom design for a customer, but I believe the dev kit from ST-Micro include the SRAM on it.

http://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-eval-tools/stm32-mcu-eval-tools/stm32-mcu-discovery-kits/32f429idiscovery.html

Yup looks like they but a ton of memory, 64MB, on their development kit.

Check out this guys website, don't pay for his build chain, you can download the available one for his other kit and then just tweak some memory mapping values.

http://www.emcraft.com/stm32f429discovery
>>
>linux on a mc
uhhhh
uhhhhhhhh
I think that's a tad too much bloat
>>
>>56987834
That's way more than just a microcontroller though, at that point it's basically a raspberry pi
>>
>>56987845

Actually it doesn't take much to run, it's just a bit odd. Only use case I ever ran into that made sense was a customer had built some hardware and software around an expensive SoC, similar to a raspi, and didn't want to have to port their code/drivers and a bunch of other stuff to a microcontroller specific deployment. So utilizing uCLinux was able to get them 99% to a cheaper product with very little effort.
>>
>>56987834
Sweet! Thanks.
>>
>>56987564
Linux bad for microcontrollers

No interrupts = bad time

Also the one in your pic doesnt have a crystal clock (for the processor) so good luck rewriting your digital code to work on shotty PWM
3/10 2powerhungry4me
>>
Why would one NEED to run Linux like this? I can't think of a purpose other than "just because"

RPis and other tiny cheap systems exist
>>
>>56988089
Just because is a great reason for a personal project.
>>
>>56988317

Once again if you are just looking for a POSIX like environment to develop in for a micro controller I would highly recommend using NuttX over uCLinux. You'll feel right at home developing C code in it and it's much more useful on a micro than linux. It even has a shell you can run in a serial terminal.

http://nuttx.org/
>>
There are ways, like the other anons have said, but if you just want an OS on a MCU use a RTOS instead. You can do a lot without an operating system anyway; I think that not using an OS is more in the spirit of embedded development.
>>
>>56987693
>trying to run linux on a device with, at best, 4MB of memory is fun
Thread posts: 23
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.