Using arduino for other AVR chips

Hi guys,

I am sure what I am asking might be already covered here before, but I failed to locate all parts in one place. I request you to help me with this or point me in the right direction.
I have used UNO R3 and leonardo previously, and programming/developent is really elegant and straight forward with arduino IDE and arduino boards. However, now I wish to program a atmega32(easily available here) and I see that the leonardo is built around atmega32u4. I'm quite sure people have already done this. My questions are:

  1. Does Arduino Makers encourage using other AVR chips(those not used in ARDUINO BOARDS like mega32 ) with ARDUINO IDE?
  2. How can one build/program for these AVR( as in generating hex files). Where/What changes are required? Pin Map, Memory Map, Clock settings etc. Does one need to go deep into arduino internals for doing this ? Is there a example or tutorial?

Thats all.
Thanks in advance

The Atmega32 is more like an Atmega1284. The U in Atmega32U4 indicates USB interface.
A better starting point would be the mighty1284 files, creating a new boards.txt section, changing the signature bytes, changjng the memory size, etc. as the 32 seems to be a memory crippled version of the 1284P.

Mega1284 is a feature pack micro-controller. It surely has a pin-count & pin-out resemblance with mega32. However it doesn't has a similar memory footprint, register map, I/O map etc.. How do I account for all these differences?

Kindly provide an elaborate answer.

For the most part you don't need to; avr-gcc already has that covered. You just need to tweak boards.txt to tell the IDE what it needs to expect in terms of maximum program size.