Change mcu in a existing project

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, i have a problem.. i download from a project page a project for atmega32..

now i want compile and try this code on atmega16 mcu...

what can i do to change in avr studio the mcu model????

i try in project menu and then Configuration Option

well in the window that appears there is the mcu setting and the clock frequency in Hz..

i set change the mcu in atmmega16 and i write 16000000 Hz frequency and i save the project but in the bottom of avrstudio main windows i still read Atmega32...

What should I do?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You have to change it in TWO places. What you have done so far is to change the model that the code is built for by avr-gcc.

The model number shown in the status bar at the bottom of the screen is the one that will be used during simulation or debugging. To change that one go to the Debug menu and use "Select platform and device" and change it there.

(in fact one of the common errors in Studio is when the model being built for and the model being debug/simulated are not the same - so it's always as well to check that they match - shame Atmel never thought of doing this automatically but I guess Studio 4 is dead now so it'll never change)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

fantastic! thank you very mutch!!! :)