Problem with example of ethernet bootloader for LPC2300

Started by maximb, January 12, 2011, 09:00:02 AM

Previous topic - Next topic

maximb

Hi, all.

Recently I downloaded the latest version of FlashMagic tool (version 5.74.2160) with secondary Ethernet bootloader example for LPC2300 included.
The provided example of bootloader code is for LPC2364 and the example application (Blinky) is for LPC2378.

My custom board is based on LPC2368 and my final intention is to allow in-field firmware upgrade using Ethernet link, when the secondary bootloader will be invoked from application level using an IAP call.
Now, before trying to run the examples provided with FlashMagic installation, I changed them as follows:
- In 'Options for Target'->'Device' I picked the LPC2368.
- In 'Options for Target'->'Target' I set the IROM1 size to 0x80000
- In the sbl_config.h file I enabled the 'Ethernet Debug' mode and disabled the 'Activity Indication Led'
- Instead of using a led for bootloader activity indication, I put a several printf calls right after init_serial() in the Blinky's main routine.

After both projects were re-built (using Keil compiler), I loaded the bootloader HEX file using FlashMagic tool via serial connection. When finished, I re-powered the board and then loaded the Blinky's HEX via Ethernet connection, which gave me an indication that the secondary ethernet bootloader is functioning.
Later, I re-powered the target board again in hope to see any indication of Blinky's application activity , but got nothing. The HyperTerminal seems to be configured correctly - accordingly to how the UART is configured by the application. I do not see the any printouts on the HyperTerminal window.

Please advise what I miss. My main concern is why the application loaded using the secondary bootloader does not start.

Thanking you in advance.
mb

Andy Ayre

The examples should work "out of the box" with no changes - we've tested them here.

The quickest and most effective debugging method is using JTAG, for example the ULink2 from Keil.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

maximb

Andy, thanks for response.

Are the provided examples supposed to work 'as-is', even taking into account that my target
board is based on LPC2368, while the example projects are for LPC2364 and LPC2378?

I will try to run the provided examples without changing a bit in their configuration.

Thanks for your time.
maximb

Andy Ayre

Changing the device only affects the memory available, and the memory requirements for the bootloader and blinky are small. I believe we tested the project "as is" using an LPC2388 on a Keil MCB2300 board.

Just make sure that the .map files generated for the two projects are ok for your particular device.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

maximb

Hi, Andy.

Now, I compiled and launched the Ethernet bootloader and Blinky examples with a small change - I removed the parts of code that are MCB2300-specific and I think I got it working.
As a next step, I'll try to load my application instead of the Blinky. Have to note, that my application is compiled using GCC and not using Keil's compiler.
Are there any hidden stones in such an approach ?

Huge thanks again.
maximb

maximb

Hi, again.

Until now I have the Blinky application working with changes I have made to it. Namely, I removed the LCD, timer and UART-related parts and inserted a simple loop instead. The loop increments value of a counter variable and turns a on-board LED red or green depending on the counter value.

However, the original Blinky sample application, provided along with installation package of Flash Magic tool 5.74 does not work on my board.
In particular, the timer and UART interrupts are not working.

I have to note, that after the Blinky application has been re-built using a GCC compiler, I re-checked the .map file to ensure appropriate addressing of the application software.
However, it looks like the interrupts are stay in the Flash memory instead of being mapped to on-chip SRAM.

What I miss? Please advise.
maximb

Andy Ayre

I wouldn't recommend mixing a bootloader compiled with Keil RealView and an application compiled with GCC. I'm not sure of the implications of doing that.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com