ʹÓÃEclipse¾ÙÐÐEmbedded Linux¿ª·¢µÄ»ù±¾ÉèÖÃÖ¸ÄÏ
ʹÓÃeclipse¾ÙÐÐembedded linux¿ª·¢µÄ»ù±¾ÉèÖÃÖ¸ÄÏ
СÐò£º
Ëæ×ÅǶÈëʽϵͳµÄÈÕÒæÉú³¤ºÍÆÕ±éÓ¦Óã¬Ç¶ÈëʽLinux²Ù×÷ϵͳµÄ¿ª·¢Ò²±äµÃÔ½À´Ô½Ö÷Òª¡£Eclipse×÷ΪһÖÖÇ¿Ê¢ÇÒ¿ª·ÅÔ´´úÂëµÄ¼¯³É¿ª·¢ÇéÐΣ¨IDE£©£¬Äܹ»ÌṩǶÈëʽLinux¿ª·¢ËùÐèµÄÖÖÖÖ¹¤¾ßºÍ²å¼þ£¬×ÊÖú¿ª·¢Ö°Ô±¸ü¸ßЧµØ¾ÙÐÐǶÈëʽLinux¿ª·¢¡£±¾ÎĽ«ÏÈÈÝÔõÑùÔÚEclipseÖÐÉèÖÿª·¢ÇéÐΣ¬²¢ÑÝʾÔõÑùʹÓÃEclipse¾ÙÐÐEmbedded Linux¿ª·¢¡£
Ò»¡¢×°ÖÃEclipseºÍÐëÒªµÄ²å¼þ
Ê×ÏÈ£¬´Ó¹Ù·½ÍøÕ¾£¨https://www.eclipse.org£©ÏÂÔز¢×°ÖÃ×îа汾µÄEclipse IDE¡£È»ºó£¬Í¨¹ýÒÔÏ°취װÖÃÐëÒªµÄ²å¼þ£º
·¿ªEclipse²¢µ¼º½ÖÁ²Ëµ¥À¸µÄ¡°Help¡±>¡°Eclipse Marketplace¡±¡£
ÔÚEclipse MarketplaceËÑË÷¿òÖÐÊäÈë¡°C/C++ Development Tools¡±£¬µã»÷¡°Go¡±¡£
ÔÚËÑË÷Ч¹ûÖÐÕÒµ½¡°C/C++ Development Tools¡±²¢µã»÷¡°Go¡±°´Å¥ÅԱߵġ°Install¡±°´Å¥¡£
ƾ֤ÌáÐÑÍê³É²å¼þµÄ×°Öá£
¶þ¡¢½¨ÉèÒ»¸öC/C++ÏîÄ¿
ÔÚEclipseÖн¨ÉèC/C++ÏîÄ¿ÊÇ×îÏÈEmbedded Linux¿ª·¢µÄµÚÒ»²½¡£Çëƾ֤ÒÔÏ°취½¨ÉèÒ»¸öÐÂÏîÄ¿£º
·¿ªEclipse£¬²¢µã»÷²Ëµ¥À¸µÄ¡°File¡±>¡°New¡±>¡°C/C++ Project¡±¡£
ÔÚ¡°Project type¡±ÏÂÀ²Ëµ¥ÖÐÑ¡Ôñ¡°Executable¡±¡£
ÔÚ¡°Toolchain¡±ÏÂÀ²Ëµ¥ÖÐÑ¡ÔñÊʺÏÄãµÄ¿ª·¢Æ½Ì¨µÄ½»Ö¯±àÒ빤¾ßÁ´¡£ÈôÊÇûÓкÏÊʵŤ¾ßÁ´£¬Çë²Î¿¼¹¤¾ßÁ´ÌṩÉ̵ÄÎĵµÀ´ÉèÖù¤¾ßÁ´¡£
µã»÷¡°Next¡±£¬È»ºóÊäÈëÏîÄ¿µÄÃû³ÆºÍ·¾¶¡£
ÔÚ¡°Build configurations¡±¶Ô»°¿òÖУ¬Äã¿ÉÒÔÑ¡ÔñÊÇ·ñ½¨Éè¡°Debug¡±ºÍ¡°Release¡±ÉèÖá£Æ¾Ö¤ÐèҪѡÔñÒ»¸ö»òÁ½¸öÉèÖá£
µã»÷¡°Finish¡±À´Íê³ÉC/C++ÏîÄ¿µÄ½¨Éè¡£
Èý¡¢ÉèÖÃÏîÄ¿ÊôÐÔ
ΪÁËʹEclipseÄÜ׼ȷµØ±àÒëºÍµ÷ÊÔÎÒÃǵÄǶÈëʽLinuxÓ¦ÓóÌÐò£¬ÎÒÃÇÐèÒªÉèÖÃÏîÄ¿µÄÊôÐÔ¡£Çëƾ֤ÒÔÏ°취ÉèÖÃÏîÄ¿ÊôÐÔ£º
ÓÒ¼üµã»÷ÏîÄ¿Ãû³Æ£¬È»ºóÑ¡Ôñ¡°Properties¡±¡£
ÔÚ×ó²àµÄµ¼º½À¸ÖÐÑ¡Ôñ¡°C/C++ Build¡±>¡°Settings¡±¡£
ÔÚÓÒ²àµÄ¡°Tool Settings¡±Ñ¡ÏÖУ¬Äã¿ÉÒÔÉèÖñàÒëÆ÷¡¢Á´½ÓÆ÷ºÍµ÷ÊÔÆ÷µÈÉèÖá£Æ¾Ö¤ÄãµÄǶÈëʽLinux¿ª·¢Æ½Ì¨µÄÏêϸҪÇó¾ÙÐÐÉèÖá£
µã»÷¡°OK¡±ÉúÑÄÉèÖá£
ËÄ¡¢½¨Éè±àÒëÉèÖÃ
ÔÚEclipseÖУ¬ÎÒÃÇ¿ÉÒÔ½¨Éè¶à¸ö±àÒëÉèÖÃÀ´Ë³Ó¦²î±ðµÄ¿ª·¢ÐèÇó¡£Çëƾ֤ÒÔÏ°취½¨ÉèÒ»¸öеıàÒëÉèÖãº
ÓÒ»÷ÏîÄ¿£¬Ñ¡Ôñ¡°Properties¡±¡£
ÔÚ×ó²àµÄµ¼º½À¸ÖÐÑ¡Ôñ¡°C/C++ Build¡±>¡°Configurations¡±¡£
µã»÷¡°New¡±°´Å¥½¨ÉèÒ»¸öеıàÒëÉèÖá£
ÊäÈëÒ»¸öÃû³Æ£¬È»ºóµã»÷¡°OK¡±¡£
ÔÚн¨ÉèµÄ±àÒëÉèÖÃÏ£¬Äã¿ÉÒÔ×Ô½ç˵±àÒëÆ÷ºÍÁ´½ÓÆ÷µÈÉèÖá£Æ¾Ö¤ÄãµÄÐèÇó¾ÙÐÐÉèÖá£
Îå¡¢±àдºÍµ÷ÊÔ´úÂë
ÏÖÔÚ£¬ÎÒÃÇ¿ÉÒÔÔÚEclipseÖбàдºÍµ÷ÊÔǶÈëʽLinuxÓ¦ÓóÌÐò¡£Çëƾ֤ÒÔÏ°취¾ÙÐвÙ×÷£º
ÔÚEclipseµÄ¡°Project Explorer¡±ÊÓͼÖÐÕÒµ½ÄãµÄÏîÄ¿£¬²¢Õö¿ªËü¡£
ÓÒ¼üµã»÷¡°src¡±Îļþ¼Ð£¬Ñ¡Ôñ¡°New¡±>¡°Source File¡±¡£
ÊäÈëÎļþÃû£¬ÀýÈç¡°main.cpp¡±£¬È»ºóµã»÷¡°Finish¡±À´½¨ÉèÒ»¸öÔ´Îļþ¡£
ÔÚÔ´ÎļþÖбàдÄãµÄ´úÂ룬²¢ÉúÑÄÎļþ¡£
±àÒë²¢µ÷ÊÔ´úÂ룺
ÔÚÏîÄ¿ÖеÄÔ´ÎļþÉÏÓÒ»÷£¬Ñ¡Ôñ¡°Build Configurations¡±>¡°Set Active¡±À´Ñ¡ÔñÐèÒªµÄ±àÒëÉèÖá£
µã»÷²Ëµ¥À¸µÄ¡°Project¡±>¡°Build Project¡±À´±àÒëÏîÄ¿¡£
µã»÷²Ëµ¥À¸µÄ¡°Run¡±>¡°Debug¡±À´ÔËÐк͵÷ÊÔÏîÄ¿¡£
Áù¡¢×ܽá
±¾ÎÄÏÈÈÝÁËÔÚEclipseÖоÙÐÐǶÈëʽLinux¿ª·¢µÄ»ù±¾ÉèÖÃÖ¸ÄÏ£¬²¢ÑÝʾÁËÔõÑù½¨ÉèÏîÄ¿¡¢ÉèÖÃÊôÐÔ¡¢½¨Éè±àÒëÉèÖÃÒÔ¼°±àдºÍµ÷ÊÔ´úÂ롣ͨ¹ýʹÓÃEclipse×÷Ϊ¿ª·¢¹¤¾ß£¬¿ª·¢Ö°Ô±¿ÉÒÔÔ½·¢¸ßЧµØ¾ÙÐÐǶÈëʽLinux¿ª·¢¡£
ͨ¹ýÒÔÉÏ°ì·¨ºÍ´úÂëʾÀý£¬Äú½«Äܹ»¿ìËÙÈëÃŲ¢×îÏÈʹÓÃEclipse¾ÙÐÐǶÈëʽLinux¿ª·¢¡£×£ÄãÔÚǶÈëʽLinux¿ª·¢µÄÂóÌÖÐÈ¡µÃÀֳɣ¡
ÒÔÉϾÍÊÇʹÓÃEclipse¾ÙÐÐEmbedded Linux¿ª·¢µÄ»ù±¾ÉèÖÃÖ¸ÄϵÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡