radman:
Sorry I messed up here.
I compiled the same sketch several times and I compiled different sketches and they all generated files in the folder build813627593015490753.tmpWhat I did not do was exit and re-enter the IDE. When I did that build813627593015490753.tmp was deleted and a new folder with a different name was created.
Yeah, so long as you don't close the IDE you keep the same temp folder name.
Suggestion #1: Use a hash of the sketch name (or even just the sketch name...!) for the temporary files. This solves a few problems, not least of which is that the IDE isn't very good at deleting the temp folders; I've got hundreds of "buildXXXXXXXXXXXXXX.tmp"s in there.
The other way is to edit your preferences file and set the build path:
...
build.path=h:\temp\Arduino\build
radman:
So the batch file earlier crashed and burned from inadequate testing.
Still there must be some way to do it.
Mine is this, adjust paths as necessary:
disassemble_mysketch.bat
set avr=H:\program+files\arduino-0022\hardware\tools\avr\bin\avr-
set build=h:\temp\arduino\build\
rem Name of sketch goes here
set target=mysketch
%avr%objdump.exe -S %build%%target%.cpp.o >disassembly.txt
Also useful is this - to see your SRAM usage:
nm_mysketch.bat
set avr=H:\program+files\arduino-0022\hardware\tools\avr\bin\avr-
set build=h:\temp\arduino\build\
rem Name of sketch goes here
set target=mysketch
%avr%nm.exe -S %build%%target%.cpp.elf >nm_out.txt
( the stuff in SRAM starts at 0x00800100 )