avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] bootloader problem


From: Yannick PODGORSKI
Subject: Re: [avr-gcc-list] bootloader problem
Date: Thu, 27 Jan 2005 16:46:38 +0100

Hi again,
I think that can be your interrupt but
you put asm volatile("cli"::); so they must be stop.
Are you sure that your code is well writing on flash ?
Someone said me to try to put:
        asm volatile("jmp app_start"); in code
and
        LDFLAGS += -Wl,--defsym=app_start=0 in Makefile
Try with a small code and see what can make problem.
Sorry.
Yannick Podgorski
www.kuantic.com 

  ----- Original Message ----- 
  From: =?EUC-KR?B??= 
  To: Yannick Podgorski 
  Sent: Thursday, January 27, 2005 1:18 PM
  Subject: Re: [avr-gcc-list] bootloader problem


  Hi Yannick,

  Thank you for your reply.

  I have already disabled the watchdog,
  and before I jump to the app. I printed a 'J' to
  see the timing of the actual jmp instruction executed.
  It seems normal to me.

  I use 3 interrupt sources in my bootloader.
  Will that be the cause?

  Terry.
  TSC systems.


  Yannick PODGORSKI wrote:
  Hi Terry,
  I'd got the same problem few weeks ago.
  When the BOOTRST is programmed, the problem that is your mega128
  resets when it jumps to the app. So, bootloader section starts again.
  For me, that was the watchdog that resets the mega128 because I'd got
  a tempo without wdt_reset().

  In fact, when you make a jump, all configurations are kept. So see what
  can reset your mega128 and stop it before your jump or do it at start
  of your app.

  I think your code is good.

  Hope that help.


  Yannick Podgorski
  www.kuantic.com

  ----- Original Message ----- 
  From: "Lee Terry" 
  To: 
  Sent: Thursday, January 27, 2005 3:07 AM
  Subject: [avr-gcc-list] bootloader problem


  > Hi, all.
  >
  > I wrote a bootloader for mega128, and here are the problems.
  >
  > 1. BOOTRST programmed
  > I upload an application, then jump to 0x0, bootloader section starts 
  > again.
  > Below is the code I use when jumping to the app.
  >
  > boot_spm_busy_wait();
  > __boot_rww_enable();
  > MCUCR = (1<> MCUCR = (0<> asm volatile("cli"::);
  > asm volatile("jmp 0x0000" ::);
  >
  >
  > 2. BOOTRST unprogrammed
  > After uploading an application, I jump to the app. section using the 
  > same code I wrote above, the application starts normally. But when I want 
  > to jump to the bootload section from the app. section, my bootloader 
  > program keeps restarting. And it seems running slowly.
  > I changed the clock setting to/from external/internal clock, but it is 
  > same.
  >
  > Below is the code that I use to jump from app. to bootloader.
  > MCUCR = BIT(IVCE);
  > MCUCR = BIT(IVSEL);
  > __disable_interrupt();
  > asm("jmp 0x1E000"); // jump to bootloader-reset-vec
  >
  >
  >
  > Please tell me what I do wrong....
  >
  > Terry.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]