avr-chat
[Top][All Lists]
Advanced

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

Re: [avr-chat] issues with custom bootloader and ATMega32


From: Joerg Wunsch
Subject: Re: [avr-chat] issues with custom bootloader and ATMega32
Date: Wed, 30 Oct 2013 08:57:46 +0100 (MET)

Alexander Krause <address@hidden> wrote:

> This raises the question if I can short the bootloaders interrupt
> table somehow?

> Can't I simply tell GCC to not use/generate such a table since
> there'll be no IRQ anyway.

This is not GCC's business.  The vector table comes from the startup
code which is supplied by the library.

There's always the option of telling the compiler to not use the
default startup code with the option -nostartfiles.  Then, you are
responsible for all the startup activities yourself, in particular:

.. setup the vector table as needed,

.. initialize stack pointer and __zero_reg__,

.. initialize global/static variables as needed (zero out .bss, copy
  over .data values from flash, usually located behind the regular
  .text contents there),

.. jump to main() (by default, it's rather a call to main(), with the
  result being then passed to exit(), as that's what the C standard
  mandates)

-- 
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)



reply via email to

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