tag:blogger.com,1999:blog-5983110881018172452.post1421669160224186648..comments2023-03-25T02:55:49.760-06:00Comments on Bot Thoughts: AVR Programming on MacMike Shimniokhttp://www.blogger.com/profile/17602015624941667574noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-5983110881018172452.post-26715713538778917992015-10-22T08:19:23.589-06:002015-10-22T08:19:23.589-06:00XCode is good and everything, and you are right, i...XCode is good and everything, and you are right, it "works" but then again, if you use a Makefile and the command like you can decide wether you want to link, compile, link and compile, program or even link compile and program. With XCode you still need to use AVRFuses software to upload the generated .hex file into the chip. Or even use avrdude from the terminal. Maybe I am mistaken here, I don't know much about makefiles. Is there a way to have the Makefile in XCode automatically program the device after compilation?<br />Aldanis Vigohttps://www.blogger.com/profile/15217824693854295937noreply@blogger.comtag:blogger.com,1999:blog-5983110881018172452.post-47241907701700949482009-07-01T07:37:16.235-06:002009-07-01T07:37:16.235-06:00Sorry it has taken so long to get back to you. It...Sorry it has taken so long to get back to you. It's been a busy year!! Did you ever get this compile/link process working? If not, can you get in touch with me via the 'contact me' link on the website here? Hard to discuss via the comment page :) --MichaelMike Shimniokhttps://www.blogger.com/profile/17602015624941667574noreply@blogger.comtag:blogger.com,1999:blog-5983110881018172452.post-53571993071225746702009-03-11T14:32:00.000-06:002009-03-11T14:32:00.000-06:00dbg - when I get a few minutes I'll take a closer ...dbg - when I get a few minutes I'll take a closer look at your post and see if I can recommend anything.Mike Shimniokhttps://www.blogger.com/profile/17602015624941667574noreply@blogger.comtag:blogger.com,1999:blog-5983110881018172452.post-22933832503155099802009-03-11T12:21:00.000-06:002009-03-11T12:21:00.000-06:00I read the source of the demo program, and indeed ...I read the source of the demo program, and indeed the behaviors I wondered about are normal, so I can indeed program the chip with a proper hex file as was provided in the demo. I also tried WinAVR and AVR Studio in XP via Parallels, and there the demo does compile correctly and produces the right hex file. However, I can't get the Pololu programmer to be recognized! But I can copy the hex file to the Mac file system, and use avrdude there. <BR/>But I really want to get the compile/link process described here to work. Where can I find help with diagnosing the problem? I'm guessing some little thing has been changed so an option somewhere needs to be set differently, but how to isolate the problem? Some clues from file sizes:<BR/>The .elf file sizes match, though their contents are very different (both unreadable by me, not text) but the .lss, .map, and .o files are less than half the size they should be.Unknownhttps://www.blogger.com/profile/13297974217817974661noreply@blogger.comtag:blogger.com,1999:blog-5983110881018172452.post-71727705502368497252009-03-09T14:48:00.000-06:002009-03-09T14:48:00.000-06:00Thanks for your guide to getting started. It seems...Thanks for your guide to getting started. It seems like just what I need, but I've been unable to get it working.<BR/>First problem was the Pololu library was missing, so I downloaded and installed that by hand.<BR/>Now the process appears to work, but the result is:<BR/>David-Gustavsons-Mac-Pro:OrangutanSV168Demo dbg$ make<BR/>/opt/local/bin/avr-gcc -mmcu=atmega168 -Wall -Os -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT OrangutanSV168Demo.o -MF dep/OrangutanSV168Demo.o.d -c OrangutanSV168Demo.c<BR/>/opt/local/bin/avr-gcc -mmcu=atmega168 -Wl,-gc-sections -Wl,-Map=OrangutanSV168Demo.map OrangutanSV168Demo.o -lpololu -o OrangutanSV168Demo.elf<BR/>avr-objcopy -O ihex -R .eeprom OrangutanSV168Demo.elf OrangutanSV168Demo.hex<BR/>avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex OrangutanSV168Demo.elf OrangutanSV168Demo.eep || exit 0<BR/>avr-objdump -h -S OrangutanSV168Demo.elf > OrangutanSV168Demo.lss<BR/><BR/> text data bss dec hex filename<BR/> 0 0 0 0 0 OrangutanSV168Demo.elf<BR/><BR/>and not surprizingly the hex file has only one byte in it or perhaps it means zero, not sure, and loading it into the OrangutanSV disables the Orangutan.<BR/><BR/>For kicks I loaded the hex provided in the demo program onto the chip, and it seems to run, but with two anomalies: the User I/O display walks a zero along the display but the second zero from the right is stuck at 0 always; and the motor test shows a red LED for both F and R of one motor, but the LED for the other motor lights only for F, not R. But either or both of these might be normal. I haven't found documentation yet to see what is expected from the demo program.Unknownhttps://www.blogger.com/profile/13297974217817974661noreply@blogger.comtag:blogger.com,1999:blog-5983110881018172452.post-16445826783907714282008-09-11T16:01:00.000-06:002008-09-11T16:01:00.000-06:00Sorry about that, I added the following link to th...Sorry about that, I added the following link to the article. The programs are in the middle of the page (demo project #1 - #4)<BR/><BR/>http://www.pololu.com/catalog/product/775/resourcesMike Shimniokhttps://www.blogger.com/profile/17602015624941667574noreply@blogger.comtag:blogger.com,1999:blog-5983110881018172452.post-39965443360155605602008-09-11T10:00:00.000-06:002008-09-11T10:00:00.000-06:00I've been searching for a while and i cant find th...I've been searching for a while and i cant find the "four demo programs" you've been talking about.<BR/>Any chance of a link?<BR/><BR/>MarcusUnknownhttps://www.blogger.com/profile/04693830262344608848noreply@blogger.comtag:blogger.com,1999:blog-5983110881018172452.post-68836710793578917002008-03-16T07:51:00.000-06:002008-03-16T07:51:00.000-06:00Just a few extensions to the tutorial above. Perha...Just a few extensions to the tutorial above. Perhaps they may be helpful for folk programming outside pololu.<BR/>There is an excellent guidance about setting osx for AVR-programming on<BR/>http://www.osx-avr.org/OSX-AVR/Introduction/Main<BR/>I did it with the 'january 2007' version, but a 'december 2007' version is also present. Compiled versions of the files are available.<BR/>In the same package there is a snippet to install a template into Xcode. <BR/>This is very easy to use. I can program and debug my files in C and move them to the controller with the 'build' command of Xcode without the need of terminal commands. I am currently on 10.5.1 and Xcode 2.5, but it also works on Ycode 3 as the author told me.<BR/>Link to the author:<BR/>Nick Lott, nick.lott@gmail.com, <BR/>http://www.brokentoaster.com/butterflymp3/index.html<BR/>There is also a simulator, 'simulavr', but I didn't test it yet.Urs Bischofbergerhttps://www.blogger.com/profile/13618250148199871476noreply@blogger.com