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?
Best Answer
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:
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.
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.
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.