How arduino IDE works?
test.ino
void setup() { pinMode(13,OUTPUT); } void loop() { digitalWrite(13,HIGH); delay(500); digitalWrite(13,LOW); delay(500); }
Arduino IDE console output(for easy read , I formated)
#step 1
E:\Arduino\arduino-1.7.10/hardware/tools/avr/bin/avr-g++ -c # just process , complie , assembl e , not link , so it generate object file -g # for debug -Os # optimize for size -w # suppress all warning -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=107010 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -IE:\Arduino\arduino-1.7.10\hardware\arduino\avr\cores\arduino -IE:\Arduino\arduino-1.7.10\hardware\arduino\avr\variants\eightanaloginputs C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp\test.cpp -o
C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp\test.cpp.o
#step2 使用已经编译的文件:C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp\hooks.c.o 使用已经编译的文件:C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp\WInterrupts.c.o 使用已经编译的文件:C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp\wiring.c.o 使用已经编译的文件:C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp\wiring_analog.c.o 使用已经编译的文件:C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp\wiring_digital.c.o 使用已经编译的文件:C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp\wiring_pulse.c.o 使用已经编译的文件:C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp\wiring_shift.c.o 使用已经编译的文件:C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp\abi.cpp.o 使用已经编译的文件:C:\Users\xxx\ AppData\Local\Temp\build4353357245568764721.tmp\CDC.cpp.o 使用已经编译的文件:C:\Users\xxx\ AppData\Local\Temp\build4353357245568764721.tmp\HardwareSerial.cpp.o 使用已经编译的文件:C:\Users\xxx\ AppData\Local\Temp\build4353357245568764721.tmp\HardwareSerial0.cpp.o 使用已经编译的文件:C:\Users\xxx\ AppData\Local\Temp\build4353357245568764721.tmp\HardwareSerial1.cpp.o 使用已经编译的文件:C:\Users\xxx\ AppData\Local\Temp\build4353357245568764721.tmp\HardwareSerial2.cpp.o 使用已经编译的文件:C:\Users\xxx\ AppData\Local\Temp\build4353357245568764721.tmp\HardwareSerial3.cpp.o 使用已经编译的文件:C:\Users\xxx\ AppData\Local\Temp\build4353357245568764721.tmp\HID.cpp.o 使用已经编译的文件:C:\Users\xxx\ AppData\Local\Temp\build4353357245568764721.tmp\IPAddress.cpp.o 使用已经编译的文件:C:\Users\xxx\ AppData\Local\Temp\build4353357245568764721.tmp\main.cpp.o 使用已经编译的文件:C:\Users\xxx\ AppData\Local\Temp\build4353357245568764721.tmp\new.cpp.o 使用已经编译的文件:C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp\Print.cpp.o 使用已经编译的文件:C:\Users\xxx\ AppData\Local\Temp\build4353357245568764721.tmp\Stream.cpp.o 使用已经编译的文件:C:\Users\xxx\ AppData\Local\Temp\build4353357245568764721.tmp\Tone.cpp.o 使用已经编译的文件:C:\Users\xxx\ AppData\Local\Temp\build4353357245568764721.tmp\USBCore.cpp.o 使用已经编译的文件:C:\Users\xxx\ AppData\Local\Temp\build4353357245568764721.tmp\WMath.cpp.o 使用已经编译的文件:C:\Users\xxx\ AppData\Local\Temp\build4353357245568764721.tmp\WString.cpp.o 使用已经编译的文件:C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp\core.a
#step 3 E:\Arduino\arduino-1.7.10/hardware/tools/avr/bin/avr-gcc
-w
-Os
-Wl,
--gc-sections
-mmcu=atmega328p
-o C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp/test.cpp.elf
C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp\test.cpp.o
C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp/core.a
-L C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp -lm
E:\Arduino\arduino-1.7.10/hardware/tools/avr/bin/avr-objcopy
-O ihex
-j .eeprom --set-section-flags=.eeprom=alloc,load
--no-change-warnings
--change-section-lma .eeprom=0
C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp/test.cpp.elf
C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp/test.cpp.eep
E:\Arduino\arduino-1.7.10/hardware/tools/avr/bin/avr-objcopy
-O ihex
-R .eeprom
C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp/test.cpp.elf
C:\Users\xxx\AppData\Local\Temp\build4353357245568764721.tmp/test.cpp.hex
procedure map(I guss)
作者:lulipro-代码钢琴家
出处:http://www.cnblogs.com/lulipro/
本文版权归作者和博客园共有,欢迎转载。限于本人水平,如果文章和代码有表述不当之处,还请不吝赐教。