This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to write GCC plugin for avr-gcc


Hi guys,

I have a plugin which works for my simple test programs. And, I load
the plugin as

g++ -fplugin=path_to_plugin_so/plugin.so -c test_prog.c

However, the end goal of my plugin is to work with avr-gcc for
embedded programs.

Basically, the typical compilation step of a simple embedded program
(lets say em_prog.c) is

avr-gcc -mmcu=atmega8 em_prog.c

where atmega8 is the host micro-controller name.

My question is - how do I now make my plugin work with '-mmcu=atmega8'
option and with avr-gcc?

I tried

g++ -fplugin=path_to_plugin_so/plugin.so -mmcu=atmega8 -c test_prog.c

and

avr-gcc -fplugin=path_to_plugin_so/plugin.so -mmcu=atmega8 -c test_prog.c

But none of these work.

Can someone please help me with it? I am badly stuck at this point.

Thanks and regards,
Sandeep.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]