Michael,
Thanks for the response. Could you please me how to set
-mprolog-function and -mno-long-calls options in commnad line?
Maybe
$ gcc -mno-prolog-function
somthing like above (well above option does not work....)
Thanks.
Michael Meissner wrote:
On Tue, Jun 02, 2009 at 10:02:08PM +0900, Vijay Holimath wrote:
Dear Sir,
I am using gcc compiler for v850e cpu. When I use the
arrtribute: __attribute__ ((interrupt_handler)) or __attribute__
((interrupt); for interrupt function, say for example
void swnmi() __attribute__ ((interrupt_handler));
void swnmi()
{
...
..
}
main()
{
..
..
}
I am getting following error messages when I compile:
main.o (.text+0xea): In function 'swnmi': undefined reference to '__ep'
main.o (.text+0xee): In function 'swnmi': undefined reference to '__ep'
collect2: Id returned 1 exit status
I will be grateful to you if you could help me to get rid of these error
messages. Probably I have to link some libraries?
I worked on the V850 many years ago and added the initial ep support, but I
haven't touched it for quite some time.
The symbol __ep is expected to be the address to be loaded into the ep (r30)
register, which is used in smaller instructions. As you may or may not know,
the V850 has a small data area that ep points to, and when the compiler is
optimizing to use ep for other purposes, it needs to restore it after its done.
The gnu linker creates __ep in the file scripttempl/v850.sc at the beginning of
the .tdata section (.tdata is for tiny data).
The reference to __ep is generated in callt_return_interrupt, and is done if
you use the -mprolog-function and -mno-long-calls options (or they are set by
default).