Porting troubles on two new boards


Following your Porting Guide (btw, I check every day for updates :wink: ), we tried to port MF to a couple of our ARM boards.

The first one is a LPC2148 based ARM-KIT board by MCU123.com.

We first used GCC building environment: we managed to build both “Solutions/PCM023” projects (targeted to LPC22xx microcontrollers) and “Solutions/EA_LPC2478” projects.

After that, we tried to flash TinyBooterDecompressor.bin with a JTAG debugger/programmer (Segger J-Link 8, using J-Flash tool); we erased chip, then we programmed bin file (btw, J-Flash asked whether to correct the wrong checksum of .bin file: should we allow the tool to correct it?) and restarted device.

Then, we connected a PC to COM1 board port (using TeraTerm, at 9600bps), launched MFDeploy, choosed to connect via Serial Port, selected the right COM port on PC (COM2, on our case), clicked to “Ping” and…we get a sad “Pinging… Error: No response from device”; even after having connected (F5 on MFDeploy), we got “Connecting to COM2…Connected
Pinging… NoConnection”.

Then, we tried to use FlashMagic, after having erased once again whole chip (via J-Flash JTAG tool) and tried to activate “autobaud” feature of LPC microcontrollers. But we didn’t succeeded: we never got “Synchronized” feedback one entered “?” character. Of course, FlashMagic didn’t work for same reason.

Then we tried to redo everything from start using MDK 4.1 (which embeds RealView 4.1 compiler) for same PCM023 solution. Building went fine, but once again flashing TinyBooterDecompressor.bin didn’t give us any positive feedback. To build we used MDK_3.80a “setenv” batch file.

Then we tried to redo everything from start building EA_LPC2478 solution. With GCC all went fine, but after flashing nothing changed (MFDeploy gave us “No response from device” at ping request). With MDK/RV, this time, we didn’t managed to build solution, since we got these 5 errors:

“c:\MicroFrameworkPK_v4_1\Solutions\EA_LPC2478\dotnetmf.proj” (build target) (1
) →
“c:\MicroFrameworkPK_v4_1\Solutions\EA_LPC2478\TinyCLR\TinyCLR.proj” (Build tar
get) (88) →
(BuildAXF target) →
EXEC : error : L6220E: Load region LR_IFLASH size (772756 bytes) exceeds limi
t (380928 bytes). [c:\MicroFrameworkPK_v4_1\Solutions\EA_LPC2478\TinyCLR\TinyCL
EXEC : error : L6220E: Execution region ER_IFLASH size (772756 bytes) exceeds
limit (380928 bytes). [c:\MicroFrameworkPK_v4_1\Solutions\EA_LPC2478\TinyCLR\T
EXEC : error : L6220E: Load region LR_DAT size (163644 bytes) exceeds limit (
131072 bytes). [c:\MicroFrameworkPK_v4_1\Solutions\EA_LPC2478\TinyCLR\TinyCLR.p
EXEC : error : L6220E: Execution region ER_DAT size (163644 bytes) exceeds li
mit (131072 bytes). [c:\MicroFrameworkPK_v4_1\Solutions\EA_LPC2478\TinyCLR\Tiny

Then we tried to redo everything from start using another board, an ET-2103 based on LPC2103 micro.

This time we succeeded in activating autobaud feature and flashing TinyBooterDecompressor (both via JTAG and via FlashMagic), but once again…no response from device using MFDeploy.

Could you please help us?

Thanks very much!

P.S. Since we aim to port MF to LPC2387, is EA_LPC2478 solution suitable for that? Does it support display/presentation features via parallel interface?

There are many ports in the PK in which I never worked on. GHI only works on the “GHI” port so we really do not know with other ports.

What you need to do is start with a port that is used/tested by the porting ebook, follow the ebook to the exact, to make sure all is good, then you can move on to other ports after you are familiar with the porting kit.

It will be a bit easier once the book is all complete. You may want to also try to reach Microsoft directly through the forums on http://www.netmf.com/

Look at the error messages

[quote]Load region LR_IFLASH size (772756 bytes) exceeds limit (380928 bytes)

Execution region ER_IFLASH size (772756 bytes) exceeds limit (380928 bytes)

I can think of a couple of things, check the way you have declared the memory for the project and ensure the device you are using has sufficient ROM.

Check the settings on the IDE or your scatter files.

What Gus says is correct. Try what is in the porting ebook first. Once you succeed on that you can move on to another processor.

I still haven’t gotten to the memory layout chapter. Maybe when ti is done you ill be able to understand what is going on better.

Gus, actually EA_LPC2478 is one of 2 porting solution the guide talks about, the one cloned to target FEZ-Panda board. Am I wrong?


The device has never been programmed, since 5 errors I talk about raise at build time. What about “the right way” to declare memory? Do you manage in building EA_LPC2478 solution “as is”? In my case, using GCC I can build it, but using MDK4.1/RV4.1 compiler gives me those “memory errors”…

Do you know what I should take a look to to better understand scatter files?

One of 2 porting solutions used was the one Gus (or better, the porting guide) used for FEZ-Panda board.

Are you using the full version of MDK4.1 or the 32K limited ?

Panda uses the LPC2387 but the NETMF that ships on it is from years of development by GHI. It is not a simple port of LPC2478 code.

Yes, of course. I was talking about open-source firmware edition for FEZ-Panda, i.e. “FEZOpen” (aka USBizi_OpenSource).

Such solution is cloned by EA_LPC2478 one, but is targeted to LPC2387, so I wonder whether it could be used even on a LPC2148 or LPC2103 boards.

Same story for PCM023 porting, which is targeted to LPC22xx microcontrollers.

Is there any people who ever tried to use one of pre-built porting solutions on a LPC microcontroller?

Yes EA_LPC2478 is the one we will be cloning to make the FEZ Open firmware so you just have to wait for the book to get completed.

Note GHI has its own port though not that port.