paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] possible problems on the STM32 autopilots (Lisa) w


From: Christophe De Wagter
Subject: Re: [Paparazzi-devel] possible problems on the STM32 autopilots (Lisa) with recent gcc versions
Date: Sat, 26 Nov 2011 08:33:57 +0100


-SR1 bits trigger an IRQ.
-ISR start by reading the volatile SR1 register
-SR1 is all zero's about 1 out of 10000 times ... 
-So I start GDB and put a breakpoint in ISR on the line: if (SR1==0)
-gdb continue until "it happens again"
-plot the memory content: x/9x 0x40005800: what do we see: SR1 is NOT zero

1) is it a timing issue: ISR is triggered before the value propagates to CPU memory (or something like that)
2) is the compiler ignoring the volatile word?
3) it must be some programming error?

ISR (void)
{
  uint16_t s = regs->SR1;
  if( s == 0)
  {
    // trigger
  }
}

-Christophe 



On Fri, Nov 25, 2011 at 11:34 PM, Felix Ruess <address@hidden> wrote:
Hi all,

There seems to be a problem with things not working correctly on the
stm32 when using a recent gcc (4.5 or 4.6).
When you are compiling the ap target, the gcc version is printed.

My Experiences so far:
When building and then flashing via JTAG the ap doesn't seem to come
up again properly. Only after power
cycling it starts up again and works as normal (as far as I can tell).
Seems to work fine with gcc-4.4...

Unfortunately I could not get gcc-4.4 to build on oneiric...

I just build a new paparazzi-arm-multilib package with
gcc-linaro-4.6-2011.09-1 locally, get the same behaviour as with
gcc-4.5
Also uploaded the source package to
https://launchpad.net/~paparazzi-uav/+archive/testing, so this should
be built and available within the next hours...

Now from the simple tests I did it actually looks like if it works
properly if I change the optimization from -Os (optimizing for size)
to -O (same as -O1)!
(in conf/Makefile.stm32 line 36)

Maybe we should just not optimize for size anymore?

Ideas, test results, etc. are very welcome!!

Cheers, Felix

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


reply via email to

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