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

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

Re: [avr-gcc-list] Reusing code and variables from bootloader in main pr


From: Stefan Ernst
Subject: Re: [avr-gcc-list] Reusing code and variables from bootloader in main program
Date: Sun, 27 Jun 2010 00:28:14 +0200
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)

Lars Noschinski schrieb:

Then you can use the --defsym option to the linker to tell the main
program where to find those entry points.

As alternative you can simply type cast a constant into a function
pointer and dereference it. This way no special build procedure is
needed.

typedef void(*func_type)();

#define func ((func_type)0x1234)

    func();


PS: 0x1234 must be the word address of the table entry.



reply via email to

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