Author Topic: blinky example LCP1768  (Read 5260 times)

nda

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
    • Email
blinky example LCP1768
« 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.

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: blinky example LCP1768
« Reply #1 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
Embedded Systems Academy, Inc.
support at esacademy dot com

nda

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
    • Email
Re: blinky example LCP1768
« Reply #2 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.

nda

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
    • Email
Re: blinky example LCP1768
« Reply #3 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.