Flash Magic Forum

In-System Programming Support => ARM Cortex => Topic started by: nda on March 09, 2015, 12:35:39 PM

Title: blinky example LCP1768
Post by: nda on March 09, 2015, 12:35:39 PM
Hello friends.

I am trying to use ethernet bootloader for LPC1768. Examples for LPC1700 written for Keil works good. I dont want to use Keil. I tried to compile blinky example in CooCox with free compiler(Sourcery_CodeBench_Lite_for_ARM_EABI). Startup files  are different. In Coocox it is written in c, and  in Keil it is written in asm. Example in coocox doesnot work. I dont know why. When i program it at 0x0000 - it works well. When i programm it throuh Flashmagic - it doesnot start. I dont know what to do. Please help.
Title: Re: blinky example LCP1768
Post by: Andy Ayre on March 10, 2015, 02:27:37 AM
First get your code working without using the Ethernet bootloader - i.e. using the on-chip UART bootloader.

If it works there but not with the ethernet bootloader then the cause is likely to be:

  - incorrect relocation of interrupt vectors
  - assuming the state of the timers/clocks/registers (don't assume anything)

Andy
Title: Re: blinky example LCP1768
Post by: nda on March 10, 2015, 10:19:26 AM
If i will use onboard bootloader it will work. Becase i will compile the programm to start from 0x0000. It doesnot wotk when i compile it to start from 0x2000 and bootlodear begins to execute it.
Title: Re: blinky example LCP1768
Post by: nda on March 11, 2015, 03:28:35 AM
Problem is solved. Bootloader should start loaded program from address of default_reset_handler. Dont know, how example for keil worked. It is started from wrong address.