Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Code Block
This is perhaps one of the most frequently asked questions about uClinux on Cortex-M.

First thing to say is that external RAM is a must for uClinux. However small a Linux configuration, it still requires at least several MBytes of RAM to run from. All Cortex-M devices Emcraft is aware of limit they internal SRAM to hundreds KBytes at best. There is no way uClinux can be run from a single-chip Cortex-M design, as of this writing.

...

The kernel configuration of this project is minimalistic, for instance, the TCP/IP stack is disabled. At the application level, this is really a single-process configuration. Specifically, instead of the standard Linux init, the project runs a custom application called hello. The following are relevant snippets from the hello.intramfs specification file that illustrate how the custom application is installed on the target instead of init.

Code Block
file /bin/hello ${INSTALL_ROOT}/projects/${SAMPLE}/hello/hello 755 0 0

...


slink /init /bin/hello 777 0 0

The application itself is a simple endless-loop Hello, world C program, except that before entering the loop it prints the content of /proc/meminfo to stdout (which is the Linux serial console in this specific configuration). The meminfo printout gives information on how much memory is available when the application is running.

The application source can be found in projects/hello/hello/hello.c. For the sake of completeness, here is the full source of that program:

...

The bootable Linux image ready for installation to non-volatile storage (SD Card) of the i.MX RT10XX (hello.uImage) is ~3.3 MBytes in size. This is a multi-file Image: ~3.2 MBytes is the kernel Image itself, and ~11.5 KBytes is the Device Tree Blob file.

...