6
\$\begingroup\$

Right now I have ported an application from LPC2478 to Cortex M3 (LPC1788) and things are working fine at 120MHz.

I am thinking of porting uCLinux to my LPC1788 custom board.

The board consists of around 4 MB of NAND flash and around 32 MB of RAM. Is this enough?

Frankly, I don't have much idea of how to port uClinux onto Cortex m3. Where do I begin? I think the first step is the bootloader, then compile uCLinux and my application: am I right?

\$\endgroup\$
3
  • 3
    \$\begingroup\$ I don't think 4 millibit will be enough to run Linux. \$\endgroup\$
    – stevenvh
    Commented Jun 29, 2012 at 10:46
  • 2
    \$\begingroup\$ Lol! Stevenvh! sorry for my typo 4MB of NAND flash and 32 MB of RAM \$\endgroup\$
    – badz
    Commented Jun 29, 2012 at 11:18
  • \$\begingroup\$ @stevenvh but linux is tight code! \$\endgroup\$
    – kenny
    Commented Jun 29, 2012 at 12:33

2 Answers 2

2
\$\begingroup\$

First try to build uClinux from source to get a feel for it (toolchain, memory consumption etc.). Then look at the tips for porting uClinux. The quick rundown:

  1. Architecture: Check whether your architecture is supported or not. Create a new branch in linux/arch/ if needed. That step involves creating/modifying 20-30 files to handle CPU-specific instructions.

  2. Platform: Your processor is already supported by an existing linux/arch branch, but has differences that impact the kernel and peripherals. Create a new branch in linux/arch//platform/. This step creates traps, vector inits and interrupt handlers and involves 6 files.

  3. Board: Your architecture is very close to exiting platforms and only minor changes have to be made to the kernel (e.g. memory description/layout, external peripeherals).

Usually you have to adjust the Makefiles and then fix all the complaints until it builds.

\$\endgroup\$
0
\$\begingroup\$

Emcraft Systems (www.emcraft.com) supports a uClinux BSP for the LPC1788. It sells for $99 and comes with 6 months of email support. If you are serious about using uClinux on your custom LPC1788 board, this would probably be the easiest way for you to get started.

In addition to selling the above BSP, Emcraft provides their U-boot and uClinux ports at github.com for free download. This includes support for the LPC1788, among other Cortex-M3/M4 MCUs.

32MB of RAM is plenty enough to run uClinux on the LPC1788.

\$\endgroup\$

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.