Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: How can one view the assembly code output from the Arduino IDE? on: January 30, 2011, 11:35:27 am
westfw:  You said...

Quote
Ah.  Sorry.  Do give it its OWN directory for the build.

Yes, that does work.  But I was worried that Arduino will delete all the files after a verify or upload function.

What I have found is that Arduino does delete all the files in the build directory, but only on exit, so if I keep the IDE open, the output files can be examined.  In particular, it is possible to apply objdump -S against the .elf file.  And the output from that is exactly what I was looking for.

Thanks for all the help.


2  Using Arduino / Programming Questions / Re: How can one view the assembly code output from the Arduino IDE? on: January 30, 2011, 02:34:21 am
westfw:

I will try that, but I am not optimistic --- the   delete *.*   behavior is likely to still be in effect, so I will have no output files to work with in any case.
3  Using Arduino / Programming Questions / Re: How can one view the assembly code output from the Arduino IDE? on: January 30, 2011, 02:02:49 am
WARNING   WARNING

I tried the suggestion to put "build.path = <someplace known>" in my preferences.txt file for Arduino.  I set the path to my desktop (I'm running Snow Leopard) --- big mistake !!!

What happened is that Arduino did (apparently) use my desktop as a place to store its intermediate files, but when it was done, it performed a  delete *.*  in that directory and erased my desktop and everything that was laying on it.

Fortunately I was using Carbonite and was able to recover the desktop contents (the Arduino delete did not move the deleted files to Trash) without a great deal of effort: just time.
4  Using Arduino / Programming Questions / Re: How can one view the assembly code output from the Arduino IDE? on: January 28, 2011, 03:05:07 pm
stimmer and westfw:

Thanks again for your useful comments.

I am using Snow Leopard on a MacBook Air. 

For some reason, I can find no vestiges of compiling a sketch anywhere on my harddrive.  Arduino seems to sweep up all crumbs, that makes it impossible to apply any of the disassembly tools.

I will try invoking avr-gcc -S in a Terminal window to see what I get.

Actually, this is not very important as I can find most of what I want by examining the core code.

I appreciate the Arduino IDE philosophy as outlined by stimmer, but I still wish that were a possibility to get a little deeper into things without having to change to a different environment completely.  There isn't much of a path for the developing programmer to spread his wings as he gains confidence.  On the other hand, any such options could easily become a source of confusion for the beginner.  On the whole, I feel that Arduino has it right.
5  Using Arduino / Programming Questions / Re: How can one view the assembly code output from the Arduino IDE? on: January 28, 2011, 10:53:28 am
westfw:

Where would one place the  "avr-objdump  -S" line?

I am used to imbedding things like 

      #pragma  stuffForCompiler

in the code.  Can this be done with Arduino to induce an assembly listing?  I'd really like to see an assembly listing interspersed with the C code.  I guess since the avr toolset is being used that I should investigate on the avr site as well.
6  Using Arduino / Sensors / Re: Problem with temperature from SCP1000 sensor (SPI) on: January 27, 2011, 11:14:40 pm
I'm deeply suspicious that the temperature sensor on the SCP1000 is not meant to be use for measuring ambient temperature.

Instead, I think it is there for measuring the die temperature and the value is used to compensate the pressure sensor readings --- it's then given to us as a freebie.  I agree that the chip doesn't draw much current so one wouldn't expect much self heating, but I have noticed that the temp reading can be affected by how often you read the device, so something is going on there.

This is just a guess; I don't mean to malign the device because it is a very good pressure sensor.  I have have measured pressure noise (which determines resolution) of as low as 1.1 Pascal.
7  Using Arduino / Programming Questions / Re: How can one view the assembly code output from the Arduino IDE? on: January 27, 2011, 11:01:31 pm
stimmer:

Is there a way to tell Arduino IDE to use the -S option?

It looks rather burdensome (and error prone) to copy and modify the rather long list of commands that are executed to compile a program.

Thanks for your help in this matter.  It was useful to see what Arduino is doing.

Bob
8  Using Arduino / Programming Questions / Re: How can one view the assembly code output from the Arduino IDE? on: January 27, 2011, 07:37:32 pm
I don't consider the hex output to be assembly code --- however, I have seen reference to a utility that can produce assembly code from hex, although I expect that a great deal of readability would be lost.

As to why? --- I just like to peek under the skirts to see how things are done.  And sometimes for performance reasons I might feel a need to depart momentarily from the Arduino library calls and it can be useful to see how the C code (that works) does things; this can be used as a guide to in-line assembly coding.

Thanks for the response.
9  Using Arduino / Programming Questions / How can one view the assembly code output from the Arduino IDE? on: January 27, 2011, 07:24:37 pm
Well, the subject line tells it all, but I will add that I have searched the forum and cannot find a way to view the assembly code output from the Arduino IDE.  In fact, I cannot find any output files from running Arduino.  It looks as though there are no "tracks" left behind from uploading a sketch to a board.
10  Forum 2005-2010 (read only) / Development / Re: Where are files like <Wire.h> kept? on: January 21, 2011, 08:34:16 pm
@PaulS

Thank you very much.  That was very helpful.

I am also new to the Mac world.  I had expected that SpotLight would have been able to peek into an app and find the files (resources) imbedded there, but apparently it is not capable of doing that, hence my earlier question.
11  Forum 2005-2010 (read only) / Development / Where are files like <Wire.h> kept? on: January 21, 2011, 07:43:40 pm
I'm just getting started with the Arduino environment.  I have download and installed 0022 on a MacBook Air running Snow Leopard with no problems.

The curious thing is that a demo program has an include of Wire.h and compiles without error, so that file must exist somewhere, but when I search for that file filename on my harddrive, it does not show up.  It must be somehow encoded into the Arduino 0022 application.

I hoping that someone can confirm that so that I can quit worrying about it.
Pages: [1]