ARM7_LPC2368_Eclipse Demo

james038 wrote on Wednesday, April 02, 2008:

Hi All,

I’m trying to get this port to work on my Ver3.0 MCB2300 with Rev - LPC2368
I’ve obtained the Eclipse IDE and the GNU tools from the YAGARTO site.

I’m having the same problem reported by others - After building the project in Eclipse (choosing the correct configPINSEL2_VALUE), and then writing the resultant hex file to flash using Flash Magic, I get no response - no LED activity or LCD display.

I am not using an OpenOCD compatible JTAG device, I have a Lauterbach.  If I flash the elf file using it, I get the same result - no response.

I have tried the Rowley version (ARM7_LPC2368_Rowley) and this has a specific target for the bootable version of the demo - this works fine when flashed using either the Lauterbach or Flash Magic.

As I want to use Eclipse and the GNU toolchain for development, I want to solve this problem.

When debugging the Eclipse version of the demo, it crashes as soon as the PLL registers are changed in the prvSetupHardware function called from main.
Comparing the Rowley version of the demo, it performs the PLL setup in the reset vector before main is called.

Is this difference between the projects intentional ?


davedoors wrote on Thursday, April 03, 2008:

Dont try stepping over the line that changes the clock speed. Most jtag interfaces cannot cope with this. Instead step over the whole function that changes the clock speed, then continue to step until you find where the problem is.

Most people find that the Eclipse version that comes with Yagarto is problematic when building the FreeRTOS code as it does not recognize that its not a managed project. Although it sounds like you have got over this problem as you have a successful build.

james038 wrote on Monday, April 07, 2008:

Hi, I found the problem.

In the linker file lpc2368.ld, the .bss section is incorrectly including the memory spaces for the USB and ethernet.
The _bss_end__ and __bss_end__ need to be moved to the line after the align i.e.

/* Align here to ensure that the .bss section occupies space up to
    _end.  Align after .bss to ensure correct alignment even if the
    .bss section disappears because there are no input sections.  */
    . = ALIGN(32 / 8);
    _bss_end__ = . ; __bss_end__ = . ;

Within the startup assembly code in boot.s, the bss segment is initially cleared, and because the main ram and the USB and ethernet ram are not contiguous, the code performing the clear is writing to a huge reserved memory area, causing a data abort.

This change may not be the best way to fix the problem, but it works.

Thanks go to the developers for developing a really useful RTOS.


sandip1181 wrote on Friday, July 27, 2012:

Dear James,

- I am able to compile the  “ARM7_LPC2368_Rowley” But when I lot in to MCB2300 Then Not getting anything on LCD….   What could be the problem……

- As you mention your ARM7_LPC2368_Rowley code is working fine with MCB2300 board , so have you done any changes ? DO I need to do any configuration to run this Free RTOS demo code?

- Waiting for your valuable reply.