怎么样把arduino的bootloader和.ino合成一个.hex的文件,一次性烧进空白芯片中? 如何烧录 arduino 的 bootloader
\u5982\u4f55\u7ed9Arduino\u82af\u7247\u70e7\u5165bootloader\u8fd9\u91cc\u6709\u4e24\u79cd\u70e7\u5199bootloader\u7684\u65b9\u5f0f
1\uff0e \u7528\u4e00\u5757arduino\u677f\u7ed9\u53e6\u4e00\u5757\u70e7bootloader\uff1a
\u76f4\u63a5\u4e0a\u63a5\u7ebf\u56fe\uff1a
\u5176\u63a5\u7ebf\u65b9\u5f0f\u5c31\u662f\uff1a
Programmer Being programmed
Vcc ------> Vcc
GND ------> GND
Pin 10 ------> pin 1 (RESET)
Pin 11 ------> pin 11(MOSI)
Pin 12 ------> pin 12(MISO)
Pin 13 ------> pin 13(SCK)
\u63a5\u597d\u7ebf\u4e4b\u540e\u5c06\u4f5c\u4e3aProgrammer\u7684\u90a3\u5757\u677f\u8fde\u63a5\u7535\u8111\uff0c\u7136\u540e\u6253\u5f00Arduino\u7684IDE\uff08\u4e00\u822c\u75281.0\u4ee5\u4e0a\u7684\u7248\u672c\u5c31\u53ef\u4ee5\u4e86\uff09\uff1a
(1). \u6253\u5f00Arduino\u7684\u793a\u4f8b\u6587\u4ef6ArduinoISP\u5c06\u5176\u4e0a\u4f20\u5230\u4f5c\u4e3aProgrammer\u7684\u90a3\u5757\u677f\uff08\u5047\u8bbe\u4f60\u5df2\u7ecf\u77e5\u9053\u600e\u4e48\u4e0a\u4f20\u4e86\uff09\uff1b
(2). \u4e0a\u4f20\u5b8c\u6bd5\u540e\uff0c\u9009\u62e9\u5de5\u5177 --> \u7a0b\u5e8f\u5458--> Arduino as ISP\uff0c\u56e0\u4e3a\u7528\u7684\u662f\u4e2d\u6587\u7248\uff0c\u7a0b\u5e8f\u5458\u9009\u9879\u5c31\u662f\u5de5\u5177\u680f\u4e2d\u5012\u6570\u7b2c\u4e8c\u4e2a\uff0c\u6700\u540e\u70b9\u51fb\u5de5\u5177\u680f\u4e2d\u6700\u540e\u4e00\u4e2a\u9009\u9879\u201d\u70e7\u5f55\u5f15\u5bfc\u7a0b\u5e8f\u201d\uff0c\u7136\u540e\u7b49\u5f85\u70e7\u5f55\u5b8c\u6210\u5c31\u597d\u4e86\uff0c\u5982\u679c\u987a\u5229\u7684\u8bdd\u3002
2. \u76f4\u63a5\u7528\u4e00\u4e2a\u4e32\u53e3\u9002\u914d\u5668\u6765\u70e7\uff1a
\u8fd9\u4e2a\u65b9\u6cd5\u662fAduino\u5b98\u7f51\u4e0a\u63d0\u4f9b\u7684\uff0c\u63a5\u7ebf\u5c31\u50cf\u8fd9\u6837\uff1a
\u90a3\u4e2a\u4e32\u53e3\u9002\u914d\u5668\u7684\u63a5\u53e3\u5c31\u662f\u8fd9\u6837\uff1a
\u8fde\u63a5\u597d\u7ebf\u8def\uff0c\u4e4b\u540e\u7684\u64cd\u4f5c\u65b9\u6cd5\u4e0e\u65b9\u6cd5\u4e00\u6709\u70b9\u7c7b\u4f3c\uff0c\u4e0d\u8fc7\u8fd9\u91cc\u4e0d\u7528\u8fd9\u91cc\u4e0d\u7528\u4e0a\u4f20ArduinoISP\u7a0b\u5e8f\uff0c\u76f4\u63a5\u9009\u62e9\u597d\u8981\u70e7\u5f55\u7684\u677f\u548c\u82af\u7247\u7684\u7c7b\u578b\uff0c\u5728\u5de5\u5177\u680f\u91cc\u7684\u7a0b\u5e8f\u5458\u9879\u4e2d
\u9009\u62e9USBasp\u9009\u9879\uff0c\u4e4b\u540e\u70b9\u51fb\u70e7\u5f55\u5f15\u5bfc\u7a0b\u5e8f\u9009\u9879\uff0c\u7b49\u5f85\u70e7\u5f55\u5b8c\u6bd5\u3002
\u53ef\u80fd\u51fa\u73b0\u7684\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6cd5\uff1a
\u8981\u662f\u51fa\u73b0\u70e7\u5f55\u4e0d\u6210\u529f\u7684\u60c5\u51b5\u7684\u8bdd\uff0c\u5148\u68c0\u67e5\u4e00\u4e0b\u662f\u4e0d\u662f\u677f\u4ec0\u4e48\u9009\u9519\u4e86\uff0c\u8981\u662f\u89c9\u5f97\u677f\u6ca1\u9519\uff0c\u5c31\u770b\u770b\u4f60\u7684\u82af\u7247\uff0c\u5047\u5982\u4f60\u5728IDE\u4e2d\u9009\u62e9\u7684\u82af\u7247ATmega328\uff0c\u8981\u662f\u4f60\u5b9e\u9645\u4f7f\u7528\u7684
\u82af\u7247\u662fATmega328-PU\uff0c\u90a3\u4e48\u4f60\u53ef\u4ee5\u8fd9\u4e48\u529e\uff1a
\u8fdb\u5165Arduino IDE\u7684\u5b89\u88c5\u6587\u4ef6\u5907\u4efd\u5176\u4e2d\u7684avrdude.conf\u6587\u4ef6\uff1b
\u7528\u8bb0\u4e8b\u672c\u6253\u5f00avrdude.conf\u6587\u4ef6\uff1b
\u627e\u5230\u5176\u4e2d\u7684\u201d0x1e 0x95 0x0F\u201d\u8fd9\u4e00\u884c\uff0c\u5c06\u5176\u66ff\u6362\u4e3a\u201d0x1e 0x95 0x14\u201d;
\u4fdd\u5b58\u66f4\u6539\uff0c\u91cd\u542fIDE\uff0c\u518d\u70e7\u4e00\u6b21\u3002
\u4e3a\u4e86\u6062\u590dArduino\u7684\u529f\u80fd\uff0c\u5fc5\u987b\u5f97\u91cd\u65b0\u7ed9ATMega328P\u5355\u7247\u673a\u91cc\u70e7\u5199bootloader\uff08\u5176\u5b9eArduino\u5c31\u662f\u5728AVR\u5355\u7247\u673a\u4e2d\u9884\u7f6e\u4e86\u4e00\u4e2abootloader\u7a0b\u5e8f\uff0c\u8fd9\u6837\u518d\u914d\u5408Arduino\u5f00\u53d1\u73af\u5883\u5c31\u662f\u6240\u8c13\u7684Arduino\u4e86\uff0c\u4f46Arduino\u8fd9\u4e2a\u8bcd\u672c\u8eab\u53ea\u7559\u7ed9\u5b98\u65b9\u4f7f\u7528\uff09\u3002\u5f53\u7136\u5728\u6dd8\u5b9d\u4e0a\u4e5f\u80fd\u4e70\u5230\u5df2\u7ecf\u70e7\u5199\u597d\u7684AVR\u5355\u7247\u673a\uff0c\u53ea\u662f\u81ea\u5df1\u624b\u4e0a\u5df2\u7ecf\u6709\u4e86AVR\u5355\u7247\u673a\uff0c\u5c31\u6ca1\u5fc5\u8981\u53bb\u82b1\u90a3\u51a4\u6789\u94b1\u4e86\u3002
\u4e8e\u662f\u9a6c\u4e0a\u6253\u5f00\u4e07\u80fd\u7684\u767e\u5ea6\uff0c\u8f93\u5165\u5173\u952e\u5b57\u201cArduino bootloader\u201d\u679c\u7136\uff0c\u4e00\u5927\u5806\u4e71\u4e03\u516b\u7cdf\u76f8\u5173\u7684\u95ee\u9898\u5c31\u51fa\u6765\u4e86\uff0c\u7ecf\u8fc7\u4e00\u8f6e\u7684\u7b5b\u9009\uff0c\u53d1\u73b0\u8bb8\u591a\u8bf4\u7684\u4e5f\u5e76\u4e0d\u662f\u5f88\u6e05\u6670\uff0c\u4e0d\u8fc7\u8ba9\u6211\u660e\u767d\u4e86\u4e2a\u5927\u6982\uff1a\u4e00\u4e2a\u666e\u901a\u7684AVR\u5355\u7247\u673a\u786e\u5b9e\u80fd\u70e7\u5199bootloader\u4e4b\u540e\u4f5c\u4e3aArduino\u4f7f\u7528\u3002\u90a3\u4e48\u95ee\u9898\u6765\u4e86\uff0c\u5982\u4f55\u628abootloader\u70e7\u5f55\u5230AVR\u5355\u7247\u673a\u4e2d\u53bb\u4e86\uff1f\u8fd9\u7684\u786e\u662f\u4e2a\u95ee\u9898\uff0c\u53cd\u6b63\u5bf9\u4e8e\u4e0d\u61c2AVR\u5f00\u53d1\u7684\u6211\u6765\u8bf4\u662f\u4e2a\u95ee\u9898\u3002\u4e0d\u8fc7\u8fd8\u597d\u4e4b\u524d\u5728\u6dd8\u5b9d\u4e0a\u4e70\u4e86\u4e00\u4e2aUSBASP\u4e0b\u8f7d\u5668\uff0c\u8ddf\u4e4b\u524d\u64e6\u9664bootloader\u4e00\u6837\uff0c\u4e5f\u8981\u7528\u5230progisp\u8f6f\u4ef6\uff08\u56e0\u4e3a\u6b64\u65f6\u7684ATMega328P\u53ea\u662f\u4e00\u4e2a\u666e\u901a\u7684AVR\u5355\u7247\u673a\uff0c\u7528Arduino\u5f00\u53d1\u8f6f\u4ef6\u662f\u70e7\u5199\u4e0d\u8fdb\u53bb\u7684\uff09\u3002
\u65e2\u7136\u8981\u70e7\u5f55bootloader\uff0c\u90a3\u4e48\u4ec0\u4e48\u662fbootloader\u5462\uff1f\u6b63\u5982\u4f60\u6240\u60f3\uff0cbootloader\u5f53\u7136\u662f\u4e00\u4e2a\u7a0b\u5e8f\uff0c\u65e2\u7136\u8981\u70e7\u5f55\u5230\u5355\u7247\u673a\u4e2d\u53bb\uff0c\u5e94\u8be5\u662f\u4e00\u4e2a.HEX\u4e4b\u7c7b\u7684\u6587\u4ef6\u3002\u4f46\u662f\uff0cbootloader\u6587\u4ef6\u4ece\u54ea\u6765\u5462\uff1f\u7ee7\u7eed\u767e\u5ea6\u3002\u3002\u3002\u627e\u5230\u4e86\uff0c\u5728Arduino\u8f6f\u4ef6\u5b89\u88c5\u76ee\u5f55\u4e2d\u7684hardware\arduino\u4e2d\u3002\u6b64\u6587\u4ef6\u5939\u4e0b\u7684\u201cboards.txt\u201d\u6587\u4ef6\u5f88\u91cd\u8981\uff0c\u662f\u5f88\u91cd\u8981\uff0c\u5176\u4ed6\u7684\u6216\u8bb8\u90fd\u53ef\u4ee5\u5728\u767e\u5ea6\u4e0a\u627e\u5230\uff0c\u4f46\u56e0\u4e3a\u8fd9\u4e2a\u6587\u4ef6\u6298\u817e\u4e86\u6211\u5927\u534a\u4e2a\u665a\u4e0a\uff0c\u767e\u5ea6\u4e0a\u4e5f\u6ca1\u6709\u660e\u786e\u7684\u8bf4\u660e\u3002\u6253\u5f00\u6587\u4ef6\uff0c\u627e\u5230\u81ea\u5df1\u5bf9\u5e94\u7684Arduino\u7248\u672c\uff0c\u56e0\u4e3a\u6211\u7684\u662f\u201cArduino Uno\u201d\uff0c\u4e8e\u662f\u9501\u5b9a\u201cuno.name=Arduino Uno\u201d\u533a\u57df\u7684\u8bf4\u660e\uff0c\u56e0\u4e3a\u770b\u4e0a\u53bb\u5f88\u4e71\uff0c\u4e00\u5b9a\u8981\u4ed4\u7ec6\u53bb\u770b\u3002\u627e\u5230\u201cuno.bootloader.low_fuses=0xff"\u6307\u7f16\u7a0b\u7194\u4e1d\u4f4e\u4f4d\u4e3aFF\uff0c\u201duno.bootloader.high_fuses=0xde\u201c\u6307\u7f16\u7a0b\u7194\u4e1d\u9ad8\u4f4d\u4e3aDE\uff0c\u201duno.bootloader.extended_fuses=0x05\u201c\u6307\u6269\u5c55\u4f4d\u4e3a05\u3002\u8fd9\u4e09\u4e2a\u503c\u975e\u5e38\u91cd\u8981\uff0c\u662f\u51b3\u5b9a\u4f60\u70e7\u5f55bootloader\u6210\u529f\u7684\u5173\u952e\u3002\u81f3\u4e8e\u8fd9\u4e09\u4e2a\u503c\u5177\u4f53\u662f\u4ec0\u4e48\u610f\u601d\uff0c\u6211\u4e5f\u4e0d\u662f\u5f88\u4e0d\u6e05\u695a\uff0c\u4f46AVR\u5355\u7247\u673a\u7684\u70e7\u5f55\u65f6\u9700\u8981\u8bbe\u7f6e\u7194\u4e1d\u4f4d\uff0c\u800c\u4e14\u4e0d\u80fd\u4e71\u8bbe\u7f6e\uff0c\u8fd9\u4e5f\u662fAVR\u8ddf51\u5355\u7247\u673a\u7684\u4e0d\u540c\u4e4b\u5904\u3002
\u7528progisp\u8f6f\u4ef6\u628a\u8fd9\u4e09\u4e2a\u7194\u4e1d\u4f4d\u7684\u503c\u5199\u5165\u5230AVR\u5355\u7247\u673a\u4e2d\uff0c\u7136\u540e\u7ee7\u7eed\u6d4f\u89c8\u201dboards.txt\u201c\u6587\u4ef6\u5f80\u4e0b\u770b\uff0c\u627e\u5230\u201duno.bootloader.path=optiboot\u201c\u8fd9\u5c31\u662f\u8bf4\u8981\u70e7\u5f55\u7684bootloader\u6587\u4ef6\u5728bootloaders\option\u6587\u4ef6\u5939\u4e2d\uff0c\u201cuno.bootloader.file=optiboot_atmega328.hex\u201d\u6587\u4ef6\u540d\u5c31\u662foptiboot_atmega328.hex\uff0c\u8fd9\u5c31\u662f\u63a5\u4e0b\u6765\u9700\u8981\u70e7\u5f55\u5230AVR\u5355\u7247\u673a\u4e2d\u7684\u7a0b\u5e8f\u3002\u7528progisp\u8f6f\u4ef6\u8c03\u5165\u6b64\u6587\u4ef6\uff0c\u7136\u540e\u76f4\u63a5\u5199\u5165\u5230AVR\u5355\u7247\u673a\u4e2d\u5c31\u884c\u4e86\uff0c\u4e00\u4e2a\u652f\u6301Arduino\u7684AVR\u5c31\u505a\u597d\u4e86\u3002\u3002\u3002
\u5176\u5b9e\u8fd9\u4e2a\u95ee\u9898\u672c\u8eab\u4e0d\u96be\uff0c\u4f46\u5bf9\u4e8e\u6ca1\u63a5\u89e6\u8fc7AVR\u7684\u4eba\u6765\u8bf4\uff0c\u8fd8\u662f\u8981\u82b1\u8bb8\u591a\u65f6\u95f4\u7684\uff0c\u4e2d\u95f4\u4e5f\u4f1a\u5b58\u5728\u8bb8\u8bb8\u591a\u591a\u5404\u79cd\u5404\u6837\u7684\u95ee\u9898\u3002\u81f3\u4e8eprogisp\u7684\u4f7f\u7528\u65b9\u6cd5\u5f88\u7b80\u5355\uff0c\u767e\u5ea6\u4e0a\u7684\u6559\u7a0b\u4e5f\u5f88\u591a\uff0c\u8fd8\u6709\u624b\u4e0a\u5fc5\u987b\u6709\u4e00\u5757\u53ef\u4ee5\u70e7\u5f55AVR\u5355\u7247\u673a\u7684\u4e0b\u8f7d\u5668\u3002\u6211\u5f53\u65f6\u5c31\u662f\u5ffd\u7565\u4e86\u90a3\u4e09\u4e2a\u7194\u4e1d\u4f4d\u7684\u503c\uff0c\u6240\u4ee5\u53cd\u53cd\u590d\u590d\u4e5f\u6ca1\u6709\u6210\u529f\uff0c\u767e\u5ea6\u4e0a\u9762\u4e5f\u6ca1\u6709\u5bf9\u201dboards.txt\u201c\u6587\u4ef6\u505a\u8be6\u7ec6\u7684\u89e3\u91ca\u3002\u6ca1\u8bbe\u7f6e\u7194\u4e1d\u4f4d\u7a0b\u5e8f\u662f\u53ef\u4ee5\u6b63\u5e38\u7684\u70e7\u5f55\u8fdb\u53bb\uff0c\u4f46Arduino\u662f\u4e0d\u80fd\u7528\u7684\uff0c\u6240\u4ee5\u5fc5\u987b\u8981\u6309\u7167\u5b98\u7f51\u7ed9\u51fa\u7684\u8bf4\u660e\u64cd\u4f5c\u3002\u6211\u5f53\u65f6\u5927\u591a\u6570\u65f6\u95f4\u4e3b\u8981\u82b1\u5728\u4e24\u4e2a\u95ee\u9898\u4e0a\uff0c\u4e00\u4e2a\u662f.HEX\u6587\u4ef6\u5177\u4f53\u4f4d\u7f6e\uff0c\u56e0\u4e3aArduino\u6709\u4e0d\u540c\u7684\u7248\u672c\uff0c\u6240\u4ee5.HEX\u6587\u4ef6\u4e5f\u4e0d\u540c\uff0c\u8fd8\u6709\u4e00\u4e2a\u5c31\u662f\u7194\u4e1d\u4f4d\u4e0a\u3002
放弃arduino,直接编写AVR程序
需要帮你做设计吗
绛旓細booloader涔熸槸寮婧愮殑銆俛tmega16U2鐨勪綔鐢ㄥ彧鏄痷sb 杞 uart 閫氬父浣跨敤鏂瑰紡灏辨槸鐩存帴Usb鎺ヤ笂灏卞彲浠ョ儳鍐欑▼搴忋傚洜姝わ紝涓鑸 arduino涓婃槸鏈 涓や釜鐩稿綋浜嶣ootloader鐨勭▼搴忥紝涓涓湪 atmega16U2 涓婏紝涓涓槸avr涓娿傚浜庤繖涓や釜鏈鏈鍩虹鐨勭▼搴忔槸鏃犳硶鐩存帴鐑у啓鐨勶紝杩欐椂鍊欐墠鐖遍渶瑕佷綘璇寸殑 usb isp鐑у啓鍣ㄣ備綘鍙互鑷繁鐑у啓锛...
绛旓細booloader涔熸槸寮婧愮殑銆俛tmega16U2鐨勪綔鐢ㄥ彧鏄痷sb杞瑄art閫氬父浣跨敤鏂瑰紡灏辨槸鐩存帴Usb鎺ヤ笂灏卞彲浠ョ儳鍐欑▼搴忋傚洜姝わ紝涓鑸arduino涓婃槸鏈変袱涓浉褰撲簬Bootloader鐨勭▼搴忥紝涓涓湪atmega16U2涓婏紝涓涓槸avr涓娿傚浜庤繖涓や釜鏈鏈鍩虹鐨勭▼搴忔槸鏃犳硶鐩存帴鐑у啓鐨