Re: arm-elf-gcc building erroneous code for ISR (long posting)

From: Andras Tantos (andras_tantos_at_yahoo.com)
Date: 06/14/04


Date: Mon, 14 Jun 2004 14:03:51 -0700

You can download a newer (actually two: 3.3.1 and 3.4.0) GCC from my
webpage. I know they've fixed a serious ARM bugs in their IRQ handling
around 3.3.0. You might be hitting it.

--
Regards,
Andras Tantos
<http://andrast.tantos.homedns.org>
"Jens Hildebrandt" <jens.hildebrandt@remove_this.etechnik.uni-rostock.de>
wrote in message news:40cd60da@news.uni-rostock.de...
> Hello group,
>
> I'm curently trying to get familiar with the ARM7 by building some
> example-projects for a LPC2106-controller. One such project is the
blinky_irq
> example from Keil which should demonstrate the use of interrupts and of
the
> LPC2xxx vectored interrupt controller. I'm using gcc-3.2.1 with binutils
3.13.1
> and newlib 1.11.0 . So far I had no problems with these tools and I was
able to
> build and succesfully run some small demonstrator programs (without
interrupts)
> on my LPC2106 board. For the blinky_irq example program I use the linker
script
> and startup.s files (with adjustment for the Flash and RAM sizes of the
LPC2106)
> that came with the source code from Keil's download area. Since the
program
> didn't work I stripped it from all unnecessary functionality (main() is
> essentially an empty loop now) and simply let the timer ISR toggle a LED
on
> GPIO24. That worked initially, but after some time (~ 3 minutes) the LED
stopped
> toggling. I suspected that somwhere I'm loosing memory such that after
some time
> I'm out of RAM. Hence, I took a look at the disassembled code and saw that
the
> ISR is messing up the IRQ-mode stack pointer, loosing seven words each
time the
> ISR is invoked.
> Since the ISR entry and exit codes are automatically generated by the
compiler I
> suspect a bug in gcc. On the other hand, since this would be a very severe
> failure other users should have come across it, too. Does anybody of you
know
> that error (i.e. should I change to another gcc version) or am I missing
> something (e.g. gcc options)?
> Below you'll find the build commands used, the sources of the program and
the
> disassembled ISR code.
>
> TIA,
> Jens
>


Relevant Pages

  • Re: arm-elf-gcc building erroneous code for ISR (long posting)
    ... You can download a newer GCC from my ... > essentially an empty loop now) and simply let the timer ISR toggle a LED ... why is pc stored on the stack anyway and why is ip with it's new ...
    (comp.arch.embedded)
  • Re: Linux distro request
    ... if you click LiveCD and then "download" (it ... Bootable CD, current GCC, ... else are separate packages from the "base" gcc package (they're all ...
    (alt.lang.asm)
  • Re: Number lock on?
    ... > Is there a way of making sure the number lock turns on automatically in ... If you don't have the gcc (Gnu Compiler Collection) which includes the C ... Download this very small program: ...
    (Fedora)
  • RE: Building gcc and NS-2 Problems
    ... There may not be enough space to have included all of gcc. ... The Fedora 10 DVD does in fact include the gcc package. ... What I don't get is why you can download the source code, ... Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines ...
    (Fedora)
  • Re: use of backward single quote in procedure names, was: DST (summer time) offset
    ... there are complexities *before* you start - and before you can even begin ... Follow that excellent advice for How to Get Started in C and download GCC. ... isn't on a cover disc so search and the likeliest page from a Google of RISC ...
    (comp.sys.acorn.programmer)