3
\$\begingroup\$

Another question I have asked made me ask this question.. The previous question was about fitting Linux into Cortex M3. A few well answers proved that it is not feasible. SOmebody suggested ucLinux. I have been researching uClinux as an alternative.

I have one critical question, the footprint of uClinux. I have looked around to find a breakdown of requirements, there is no nice info on the net. The modules under interest are:

  • Core kernel
  • TCPIP stack
  • Serial Driver
  • DHCP
  • WiFi Support (any of the stack from vendors is ok)

I am looking for RAM/Flash breakdown. I don't need a filesystem however there is a chance that I need it due to the driver model of Linux.

Bonus question: - Porting drivers from Linux to uClinux. I know the memory architecture is different. Considering driver doesn't do anything special wrt memory, could I just recompile the driver and expect it to work under uClinux?

\$\endgroup\$
3
  • \$\begingroup\$ I have found some info on STM32 forums that the compressed image is about 300Kb and uncompressed about 600Kb. Ram requirement is unclear.. \$\endgroup\$
    – Frank
    Commented Jul 24, 2011 at 14:40
  • \$\begingroup\$ The exact numbers will depend on your compiler. What are you using? GCC? \$\endgroup\$ Commented Jul 25, 2011 at 2:28
  • \$\begingroup\$ @Kevin-vermeer yes, I do use GCC. Actually, I can use Keil or something else.. However, for the purposes of this discussion, we can assume gcc. \$\endgroup\$
    – Frank
    Commented Jul 25, 2011 at 4:41

1 Answer 1

1
\$\begingroup\$

Note that uClinux closely related to Linux; kernel-wise, it's just a patch against the standard Linux source tree.

As of version 2.6.26, The patch adds machine support for some of the m68k boards, as well as some changes to a few drivers, relevant to those boards. However, for ARM platforms, the uClinux patch probably won't give you any benefit, as it doesn't touch any ARM code.

So, the figures given for a standard Linux kernel apply to uClinux too.

You'll find exactly the same drivers available as the standard Linux kernel, so you won't need to do any porting.

Bonus bonus answer: if you're not accessing an external storage device (and have your root filesystem built-in to the kernel image), you won't need a filesystem.

\$\endgroup\$
3
  • \$\begingroup\$ thanks very much. The idea is to use existing Linux drivers and don't bother with porting to RTOS we use. That is why I am fiddling with Linux. However it seems the size of uClinux is prohibitive with on chip resources of Cortex M3. \$\endgroup\$
    – Frank
    Commented Jul 25, 2011 at 4:43
  • \$\begingroup\$ @Frank - Yeah, Cortex M3 is not designed for Linux, and Linux is not designed for Cortex M3. Any special reason you're real attached to this class of chips? It seems a little small for your application.... \$\endgroup\$ Commented Jul 25, 2011 at 4:48
  • \$\begingroup\$ @Kevin-vermeer, basically two reasons I like these chips. The ADC on them is really good, 12bit, 2Msamples/sec. I couldn't find a decent cost arm9 for my app. The ADC was really the driving factor. I am using STM32F2. However, I have to port a WiFi driver to this platform and it turns out it is a pain in the back. I am looking for an easy exit. Hence I am fiddling with ucLinux because all those drivers are available on Linux and porting them to rtos will take time. \$\endgroup\$
    – Frank
    Commented Jul 25, 2011 at 4:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.