NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Everything Else » AVR simulator program for mac

February 24, 2011
by leemis
leemis's Avatar

Can anyone recommend a software simulator that works on a mac? I looked into Proteus (very cool, btw) but it is too rich for my blood being a very entry level hobbyist that's still playing with basic concepts.

I don't want to run virtual machine or similar and am looking for a straight-up mac osx software package under $100 (if possible).

Anyone find one they like?

February 25, 2011
by leemis
leemis's Avatar

Gonna have to amend this post and punt on the simulator for now. I've been looking for an AVR Studio replacement for my mac as well - this has become a high priority for me. I downloaded a bunch of files to get xcode working, but did not like how it worked and I feel it over complicated things for me quite a bit. I want something more straight forward like AVR Studio.

Can anyone recommend something? I really really really don't want to install virtual machine or similar to run WindowsAVR Studio. Any mac folks out there that have a great set of tools to point me to?

I'd really appreciate the help.

THANKS!

February 26, 2011
by leemis
leemis's Avatar

Just wanted to update this thread... I tried eclipse but the programmer is not supported. Anyone out there use eclipse and find a work around?

February 26, 2011
by Ralphxyz
Ralphxyz's Avatar

I use XCODE on my mac and find it relatively easy to use as long as you ignore everything xcode tries to do for you.

I do not use the xcode project or try to load the program onto the mcu from xcode.

When you asked for a simulator I thought you were looking for something like the simulator in AVR Studio that you run a debugger in, now it seems you are looking for a IDE.

Anyway xcode for just developing the C code and loading the mcu using Terminal and Screen works well for me. Then of course I am not a programmer so I do know how to handle to much sophistication.

Ralph

February 26, 2011
by leemis
leemis's Avatar

Originally, the plan was to find a simulator but I redirected my post since I found a more critical source of frustration. I am still interested in finding one for my Mac but I needed an IDE since I grew very tired of just using a text editor and guessing what was wrong as my code became more complex.

I will give xCode another shot. All the extra stuff it created was a bit daunting to me. If I ignore what it sets up and use the terminal to load onto the mcu, maybe it won't be so bad.

Thanks for the advice. I will try xCode again. If you can recommend a simulator, I'd be interested in that as well.

February 26, 2011
by Ralphxyz
Ralphxyz's Avatar

Just what do you mean by a simulator?

ATmel appears to be a Windows shop, so all of their applications are Windows focused.

Like I said, pay no attention to all of the crap that xcode tries to impose on you and you will be free.

Ralph

February 26, 2011
by leemis
leemis's Avatar

This is what I ended up finding during a search to help me find a debugger and what I was referring to as a simulator. It seems like serious overkill but neat nonetheless. http://www.labcenter.com/products/avr.cfm

Do you recall what steps you took to set up xCode? I have crosspack and macavr installed. I followed the instructions from this site. http://kshdeo.blogspot.com/2010/06/avr-development-on-osx-with-xcode.html and looked at a couple of others but they all want me to set up the make files and are not for the atmel168 chipset I got with my NK kit.

I might have my terminology messed up. I would like to use xCode like you advised. I want to write my code in xCode and build it in xCode to verify I did everything correct. I would like to just stick with executing make in the terminal which works fine for me.

I have been struggling with this since I got my Mac - using textedit and terminal. I am just eager to starting playing with components again and not be messing around on the web compounding my issues with improper and/or confusing information. Running switch statements and for loops gets really hard to debug on textedit. I want to insert breakpoints and stuff to track things down.

Again thanks for the help.

February 27, 2011
by Ralphxyz
Ralphxyz's Avatar

Sorry, I have never taken the time to figure out how to use xcode to build a project in order to run the debugger.

I use xcode similar to how you are using TextEdit. Xcode at least does C code syntax highlighting and bracket tracing.

First thing you would have to get xcode to use the AVR-GCC compiler.

Then you would have to setup xcode to use the AVR-GCC debugger.

I believe xcode uses the GCC compiler so there "should/must" be away to use AVR-GCC.

Once you started speaking of running a debugger I understood your use of "Simulator" which is what AVR Studio uses to run ATmel's debugger.

Wow, that Proteus VSM for Atmel AVR is cool, but definitely overkill plus as you say it does not directly support the ATmega 168 or 328P micros.

This has really peaked my interest, it would be really neat to run a debugger in xcode.

Please keep us posted of your progress, especially if you get something to work.

I've got so many things going on but I'll keep this in the back of my mind to look at now and then.

Ralph

February 28, 2011
by Ralphxyz
Ralphxyz's Avatar

I just could not leave this alone.

Changing the Compiler Xcode Uses to Build Your Project

When you create a project in Xcode 2 that uses C, C++, or Objective C, the project is set to use gcc 4.0 as the compiler. 
If you want to build your project so it will run on Intel Macs, you must use gcc 4.0. But gcc 4.0 can cause you problems, 
especially for C++ programs. The C++ library changed from a static library to a dynamic library in gcc 4.0. Mac OS X 10.3.9 
is the first version of Mac OS X that shipped with the dynamic C++ library. C++ programs compiled with gcc 4.0 will not run 
on versions of Mac OS X earlier than 10.3.9.

If you want your C++ programs to run on Mac OS X 10.3, you must tell Xcode to build your project with an earlier version of gcc.

Select the name of your project from the Groups and Files list.
Click the Info button in the project window toolbar to open the project's information panel.
Click the Build tab in the information panel.
Choose Customized Settings from the Collection pop-up menu.
Click the + button to add a build setting.
Give your new build setting the name GCC_VERSION_ppc and the value of the gcc version you want to use. To use gcc 3.3, give the build setting the value 3.3.
What you have just done is tell Xcode to compile the PowerPC version of your program with gcc 3.3. There currently is no need to change the Intel gcc version 
because Intel Mac apps must be compiled with gcc 4. But if you need to change the Intel gcc version in the future, the build setting GCC_VERSION_i386 specfies 
the gcc version to use for Intel Mac apps.

This is from: http://www.meandmark.com/xcodetips.html

This was from a Google search of "change Xcode compiler" now to see if it works with OSX 10.6 and then to add the debugger.

Ralph

Post a Reply

Please log in to post a reply.

Did you know that a piezoelectric buzzer can be used in reverse as a microphone? Learn more...