Arduino Nano Sketch compile for Atmega32 Error

hi Guys
i have working code on Arduino nano i want to move it to Atmega32 because of more pins needed
when i compile it for mighty core Atmega32A it gives me errors

Arduino: 1.8.9 (Windows 10), Board: "ATmega32, Yes (UART0), EEPROM retained, Default, Standard pinout, BOD 2.7V, LTO enabled, External 16 MHz"

Build options changed, rebuilding all
In file included from D:\Work\Projects\Recent\HiLife\HiLife44thEdition\HiLife44thEdition.ino:11:0:

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h: In member function 'void TimerOne::setPwmDuty(char, unsigned int)':

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:242:13: error: 'TIMER1_A_PIN' was not declared in this scope

if (pin == TIMER1_A_PIN) OCR1A = dutyCycle;

         ^~~~~~~~~~~~

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:242:13: note: suggested alternative: 'TIMER1A'

if (pin == TIMER1_A_PIN) OCR1A = dutyCycle;

         ^~~~~~~~~~~~

         TIMER1A

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h: In member function 'void TimerOne::pwm(char, unsigned int)':

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:251:13: error: 'TIMER1_A_PIN' was not declared in this scope

if (pin == TIMER1_A_PIN) { pinMode(TIMER1_A_PIN, OUTPUT); TCCR1A |= _BV(COM1A1); }

         ^~~~~~~~~~~~

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:251:13: note: suggested alternative: 'TIMER1A'

if (pin == TIMER1_A_PIN) { pinMode(TIMER1_A_PIN, OUTPUT); TCCR1A |= _BV(COM1A1); }

         ^~~~~~~~~~~~

         TIMER1A

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h: In member function 'void TimerOne::disablePwm(char)':

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:266:13: error: 'TIMER1_A_PIN' was not declared in this scope

if (pin == TIMER1_A_PIN) TCCR1A &= ~_BV(COM1A1);

         ^~~~~~~~~~~~

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:266:13: note: suggested alternative: 'TIMER1A'

if (pin == TIMER1_A_PIN) TCCR1A &= ~_BV(COM1A1);

         ^~~~~~~~~~~~

         TIMER1A

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h: In member function 'void TimerOne::attachInterrupt(void (*)())':

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:281:2: error: 'TIMSK1' was not declared in this scope

TIMSK1 = _BV(TOIE1);

^~~~~~

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:281:2: note: suggested alternative: 'TIMSK'

TIMSK1 = _BV(TOIE1);

^~~~~~

TIMSK

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h: In member function 'void TimerOne::detachInterrupt()':

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:288:2: error: 'TIMSK1' was not declared in this scope

TIMSK1 = 0;

^~~~~~

C:\Users\Johnny\Documents\Arduino\libraries\TimerOne/TimerOne.h:288:2: note: suggested alternative: 'TIMSK'

TIMSK1 = 0;

^~~~~~

TIMSK

exit status 1
Error compiling for board ATmega32.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

it looks like the Atmega32 not supported by Timerone library

any better solution ?

thanks

As your topic does not relate directly to the installation or operation of the IDE it has been moved to the Programming category of the forum

When posting errors always use code tags

It looks like the Timer1 library is not compatible with the Atmega32 dues to port names being different on that chip

The ATmega32 is an older processor than the ATmega328. (It's more of a "big ATmega8") As such, it has different names for a lot of the peripheral bits, including those for Timer1. (eg in the m8/m32 timeframe, the interupt masks for all the timers were lumped together in the TIMSK register, while in the m88/m168/m328 there is a separate interrupt mask register for each timer.)

And that's the end result.

For a 40pin DIP chip that is more compatible with the m328p, you could look at the ATmega644 or ATmega1284.