ãããšäžŠè¡ããŠãå人ã以åã«ãã€ã¯ãã³ã³ãããŒã©ãŒã«åºäŒã£ãããšããªãããïŒãã¹ãã¢ã§ArduinoãèŠãããšããèšèããïŒãã©ã®ã¢ã»ã³ããªèŠçŽ ãäœã®ããã«å¿ èŠã§ããããããã³ãããã®èŠçŽ ãçžäºäœçšããæ¹æ³ã詳现ã«èª¬æããå¿ èŠããããŸããã
ãã®è³æã¯ãåå¿è ããã°ããåé¡ãªããã€ã¯ãã³ã³ãããŒã©ãŒãæäœããããã®å®å šã«ç¡æã®ã€ã³ãã©ã¹ãã©ã¯ãã£ãã»ããã¢ããããæçµçãªãã€ããªãã¡ã€ã«ãã©ã®ããã«çµã¿ç«ãŠãããããç解ããããšãç®çãšããŠããŸãã ãã®ã€ã³ãã©ã¹ãã©ã¯ãã£ãã»ããã¢ãããã段éã§ã¯ããã€ã¯ãã³ã³ãããŒã©ãŒã®ã¡ãŒã«ãŒãšã¢ãã«ã¯éèŠã§ã¯ãããŸããã äž»ãªããšã¯ãARMã³ã¢ã«åºã¥ããŠããããšã§ãã
ç®æ¬¡
- åé¡ã®å£°æã
- ãœãããŠã§ã¢å®è£ ã®éžæã
- Eclipse Neon 3ãé
眮ããŸãã
- Eclipseã€ã³ã¹ããŒã©ãŒãããŠã³ããŒãããŸãã
- JREãã€ã³ã¹ããŒã«ããŸãã
- Eclipseãã€ã³ã¹ããŒã«ããŸãã
- Eclipseã«GNU ARM Eclipseãã©ã°ã€ã³ãã€ã³ã¹ããŒã«ããŸãã
- JREã«ããããåœãŠãŸãïŒãã©ã°ã€ã³ã®ã€ã³ã¹ããŒã«æã«ãšã©ãŒãçºçããå ŽåïŒã
- GNU ARM Eclipse Windowsãã«ãããŒã«ãã€ã³ã¹ããŒã«ããŸãã
- GNU ARM Embedded ToolchainãããŠã³ããŒãããŠã€ã³ã¹ããŒã«ããŸãã
- OpenOCDãã€ã³ã¹ããŒã«ããŸãã
- st-link v2ãžã®ãã©ã€ããŒã®ã€ã³ã¹ããŒã«ã
- ãã¹ãŠãã©ã®ããã«æ©èœããããç解ããŠããŸãã
- ãããã«
åé¡ã®å£°æ
次ã®ããšãã§ããããã«ãæãæ§æããå¿ èŠããããŸãã- CïŒC99ïŒãCPPïŒC ++ 14ïŒããã³ASMãã¡ã€ã«ã§æ§æããããããžã§ã¯ããã³ã³ãã€ã«ããŸãã
- ã³ã³ãã€ã«ããããã¡ã€ã«ããåäžã®ãã¡ãŒã ãŠã§ã¢ãã¡ã€ã«ãã¢ã»ã³ãã«ããŸãïŒã.elfããå¿ èŠã«å¿ããŠã.hexããããã³äŸ¿å©ãªã¢ã»ã³ããªåæçšã®ã.mapããã¡ã€ã«ïŒã
ãœãããŠã§ã¢å®è£ ã®éžæ
ã¿ã¹ã¯ã解決ããã«ã¯ã次ã®ãœãããŠã§ã¢è£œåãå¿ èŠã§ãã- Eclipse Neon 3 for C / C ++ïŒå·çæç¹ã®ææ°ããŒãžã§ã³ïŒã ããã¯ãIDEïŒäŸ¿å©ãªèªåè£å®æ©èœ+ãããã°ããŒã«ãšã®å¯Ÿè©±ã«äŸ¿å©ãªããã¹ããšãã£ã¿ãŒïŒãšããŠäœ¿çšãããã³ãŒããèšè¿°ããŸãã
- JREïŒå·çæç¹ã§ã¯ãææ°ããŒãžã§ã³ã¯1.8.0ã§ãïŒã ããããªããšãEclipseã€ã³ã¹ããŒã©ãŒïŒãŸããEclipseèªäœïŒã¯èµ·åããŸããã
- GNU ARM Embedded ToolchainïŒå·çæç¹ã§ã¯ãææ°ããŒãžã§ã³ã¯5_4-2016q3-20160926ã§ããïŒã ããã¯ãå¿ èŠãªãœãããŠã§ã¢ãœãªã¥ãŒã·ã§ã³ã®è€éãªãã®ã§ãïŒãgccãã³ãŒãã®Cã³ã³ãã€ã©ããg ++ãã³ãŒãã®C ++ããªã³ã«ãŒ-ãldããæçµãã¡ãŒã ãŠã§ã¢ãããŒãããã³ãããã°ããããã®ããŒã«-ãgdbããªã©ïŒããœãŒã¹ã³ãŒãã解å床ãã.elfãã®ãã¡ã€ã«ãããã¯ãã€ããªãã€ã¯ãã³ã³ãããŒã©ãŒãã¡ãŒã ãŠã§ã¢ãã¡ã€ã«ã§ããã®åŸãã€ã¯ãã³ã³ãããŒã©ãŒã«ããŠã³ããŒããããŸãïŒè©³çŽ°ã¯ä»¥äžãåç §ïŒã
- OpenOCD 0.10.0ã ããã䜿çšããŠãããelfãããã°ã©ã ãã¡ã€ã«ããã€ã¯ãã³ã³ãããŒã©ãŒã«ããŒãããŸãïŒå®éãOpenOCDã¯äžèšã®ããŒã«ãã§ãŒã³ããã®gdbãšãããã¬ãŒã®éã®ãªã³ã¯ãæäŸããŸãïŒã
Eclipse Neon 3ãé 眮ããŸãã
åè¿°ã®ããã«ãã³ãŒããæžãããã«ã¯ãæžãã®ã«äŸ¿å©ãªããã¹ããšãã£ã¿ãŒãå¿ èŠã§ãïŒèªåè£å®ããããžã§ã¯ãæ€çŽ¢ããã¡ã€ã«ããã²ãŒã·ã§ã³ãªã©ã®ããŸããŸãªæ¹æ³ïŒã ãããŠãã³ãŒããèšè¿°ããåŸãã³ã³ãã€ã«ãã¢ã»ã³ããªãããã³å®è¡ãããŒããŒãã·ã§ãŒãã«ããïŒãŸãã¯ããŠã¹ã¯ãªãã¯ã誰ã«ãšã£ãŠã䟿å©ïŒã®åé¡ã§ãããšäŸ¿å©ã§ãããããã®ç®çã®ããã«ãç§ã¯Eclipseã䜿çšããŸãã ãšãã£ã¿ãŒã«å ããŠãéçºè ã®ç掻ãå€§å¹ ã«ç°¡çŽ åããããŸããŸãªæ¡åŒµæ©èœãæ¥ç¶ããæ©èœãæäŸãããã¹ãŠã®ã«ãŒãã³äœæ¥ïŒã¢ã»ã³ããªããªã³ã¯ãã³ã³ãããŒã©ãŒãžã®ããã°ã©ã ã®ããŒãïŒãæ°åã®ã¯ãªãã¯/ã¯ãªãã¯ã«æžãããŸãã
Eclipseã€ã³ã¹ããŒã©ãŒãããŠã³ããŒããã
- å ¬åŒãŠã§ããµã€ãã«è¡ã
- å³äžã®[ããŠã³ããŒã]ãã¯ãªãã¯ããŸãã
- å·ŠåŽã«è¡šç€ºããããŠã£ã³ããŠã§ãããŠã³ããŒããéžæããŸãïŒx64 / x32ãèªåçã«éžæãããŸãïŒã
- ããŠãäžå€®ã®[ããŠã³ããŒã]ãã¯ãªãã¯ãããšãããŠã³ããŒããéå§ãããŸãã ãåžæã®å Žåã¯ãIDEã®äœæè ãåŸæŽããããšãã§ããŸã...
ããèŠèŠçãªããŠã³ããŒãããã»ã¹ã次ã«ç€ºããŸãã
JREãã€ã³ã¹ããŒã«ãã
ã€ã³ã¹ããŒã©ãŒãå®è¡ããã«ã¯ãæåã«JREãã€ã³ã¹ããŒã«ããå¿ èŠããããŸãã å·çæç¹ã§ã®ææ°ããŒãžã§ã³ã¯1.8.0ã§ãã- ããŠã³ããŒãããã€ã³ã¹ããŒã©ãŒãèµ·åããŸãã JREããªããšãããšã©ãŒã衚瀺ãããŸãã
- ããããããã¯ãªãã¯ããŠããµã€ããžã®ç§»è¡ãåŸ ã¡ãŸãã
- ãµã€ãã§ãã¢ã€ãã ãOracle JRE 1.8.0ããéžæããŸãã
- ãã©ã€ã»ã³ã¹å¥çŽã«åæããããéžæããŸãã
- Windowsã®ããã深床ã«å¿ããŠããªãã©ã€ã³ããŒãžã§ã³ãããŠã³ããŒãããŸãã
- ããŠã³ããŒããããã¡ã€ã«ãå®è¡ããŸãã ããã«ã€ã³ã¹ããŒã«ããŠãåé¡ã¯çºçããŸããã
èŠèŠçãªããŠã³ããŒããšã€ã³ã¹ããŒã«ã®ããã»ã¹ã次ã«ç€ºããŸãã
Eclipseãã€ã³ã¹ããŒã«ãã
- ããŠã³ããŒãããã€ã³ã¹ããŒã©ãŒãèµ·åããŸãã
- C / C ++ã®ããŒãžã§ã³ãéžæããŸãã
- ã€ã³ã¹ããŒã«ãã¹ãæå®ããŸãïŒããã©ã«ãã§æ®ããŸããããã¢ããã€ã¹ããŸãïŒã
- åæããŸãã
- ã€ã³ã¹ããŒã«ãå®äºããã®ãåŸ ã£ãŠããŸãã
- ãèµ·åããæŒããŠç°å¢ãèµ·åããŸãã
- Eclipseãããã©ã«ãã§ãããžã§ã¯ãã«äœ¿çšãããã¹ãæå®ãïŒããã©ã«ãã§ãã®ãŸãŸã«ããŸãïŒããã®ãŠã£ã³ããŠãåã³è¡šç€ºãããªãããã«ããã¯ã¹ããªã³ã«ããŸãã
- IDEãèµ·åããããšã確èªããŠãéããŸãã
- çµäºæã«ãèŠåãŠã£ã³ããŠã衚瀺ãããªãããã«ããã¯ã¹ããã§ãã¯ã§ããŸãã
èŠèŠçãªã€ã³ã¹ããŒã«ããã»ã¹ã次ã«ç€ºããŸãã
Eclipseã«GNU ARM Eclipseãã©ã°ã€ã³ãã€ã³ã¹ããŒã«ãã
åè¿°ã®ããã«ãEclipseã䜿çšãããšãéçºè ã®ç掻ãç°¡çŽ åããããŸããŸãªãã©ã°ã€ã³ãæ¥ç¶ã§ããŸãã ãã®ãããªãã©ã°ã€ã³ã®1ã€ãGNU ARM Eclipseã§ãã 圌ã®ãããã§ãã³ã³ãããŒã©ãŒã®æ°ãããããžã§ã¯ããäœæãããšãã«äœ¿çšãããã¹ãŠã®ãœãããŠã§ã¢ã³ã³ããŒãã³ããç°¡åã«æ¥ç¶ã§ããããã«ãªããŸãïŒãããè¡ãæ¹æ³ã«ã€ããŠã¯ä»¥äžã§èª¬æããŸãïŒã- å ¬åŒãŠã§ããµã€ãã«ã¢ã¯ã»ã¹ããŠãã ãã ã
- å³åŽã®åã®ãããŠã³ããŒããè¡ã®äžã§ãããã©ã°ã€ã³ããéžæããŸãã
- 次ã«ããGNU ARM Eclipseãã©ã°ã€ã³æŽæ°ãµã€ãã®URLã¯ãŸã SourceForgeïŒã«ãããŸãããšããè¡ã®äžã«ããã©ã°ã€ã³ãžã®ãªã³ã¯ãã³ããŒããŸãã å·çæç¹ã§ã¯ãããã¯
http://gnuarmeclipse.sourceforge.net/updates
ã§ããã - EclipseãéããŸãã
- [ãã«ã]-> [æ°ãããœãããŠã§ã¢ã®ã€ã³ã¹ããŒã«...]ã«ç§»åããŸãã
- éãããŠã£ã³ããŠã§ããè¿œå ...ããã¯ãªãã¯ããŸãã
- éãããå¥ã®ãŠã£ã³ããŠã®ãååïŒãã»ã¯ã·ã§ã³ã«ãããšãã°ãARMããšå ¥åãïŒååã¯éèŠã§ã¯ãããŸããïŒããå ŽæïŒãè¡ã«ãµã€ãããã³ããŒãããªã³ã¯ãæ¿å ¥ããŸãã
- OKãã¯ãªãã¯
- ãŠã£ã³ããŠãéããè¡ã®ãªã¹ãã«ãPending ...ããšããç¢æã®ãã空ã®ãã§ãã¯ããã¯ã¹ã衚瀺ãããŸãã
ããã«ã以äžã«ç€ºããšã©ãŒãçºçããå Žåã¯ãããããJREãã«é²ã¿ãæ»ã£ãŠæé 4ãããã¹ãŠãç¹°ãè¿ããŸãã
Unable to read repository at http://gnuarmeclipse.sourceforge.net/updates/content.xml.
Unable to read repository at http://gnuarmeclipse.sourceforge.net/updates/content.xml.
Received fatal alert: handshake_failure
ãšã©ãŒãçºçããªãã£ããããã§ã«ä¿®æ£ããŠããå Žåã¯ãç¶è¡ããŠãã ããã - ãGNU ARM C / C ++ Cross Development Toolsããšããè¡ã衚瀺ãããããå·ŠåŽã®ãã§ãã¯ããã¯ã¹ãéžæããŠã次ãžããã¯ãªãã¯ããå¿ èŠããããŸãã
- ããäžåºŠãã次ãžãã
- 次ã«ãã©ã€ã»ã³ã¹å¥çŽã«åæãããå®äºããã¯ãªãã¯ããŸãã ã€ã³ã¹ããŒã«ããã»ã¹ãéå§ãããŸãã
- ã€ã³ã¹ããŒã«äžã«ãã»ãã¥ãªãã£èŠåã衚瀺ãããŸãã OKãã¯ãªãã¯ããŸãã
- ã€ã³ã¹ããŒã«ã®æåŸã«ãEclipseãåèµ·åããå¿ èŠããããŸãããã®ããã«ã¯ã衚瀺ããããŠã£ã³ããŠã§[ã¯ã]ãã¯ãªãã¯ããŸãã
- ããã§ããã®ãã©ã°ã€ã³ã®ã€ã³ã¹ããŒã«ãå®äºããŸããã
ãã©ã°ã€ã³ãåçã«ã€ã³ã¹ããŒã«ããããã»ã¹
ãããJREïŒäžèšã®æ®µèœã§ãšã©ãŒãçºçããå ŽåïŒ
ããŸããŸJREã«äžå¿«ãªãã°ãããããã©ã°ã€ã³ãæ£åžžã«ã€ã³ã¹ããŒã«ã§ããŸããã çš®ãŸãçŸè±¡ã®æ§è³ªãç解ããããšãªãã次ã®ããšãè¡ããŸãã- ãããã®ãããµã€ãã«ç§»åããŸãã
- ãã©ã€ã»ã³ã¹å¥çŽã«åæãããé ç®ãéžæããŸãã
- ã.zipãã¢ãŒã«ã€ããããŠã³ããŒãããŸãã
- é梱ããŸãã ããããšããã¹ããã¡ã€ã«ã®ã¢ãŒã«ã€ãã«ã¯2ã€ã®ãã¡ã€ã«ïŒ "local_policy.jar"ããã³ "US_export_policy.jar"ïŒããããŸãã ãããã®2ã€ã®ãã¡ã€ã«ãèš±å¯ã.jarãã§ã³ããŒããã€ã³ã¹ããŒã«ãããJavaã¢ãã¬ã¹ã®ãã¡ã€ã«ã«çœ®ãæããŸãã 64ãããWindows 10ã®å Žåããããæ¹æ³ã§ã
C:\Program Files\Java\jre1.8.0_121\lib\security
jreã®æ°ããããŒãžã§ã³ããªãªãŒã¹ãããããOSã®ããã深床ãç°ãªãå Žåããã¹ã¯ç°ãªãå ŽåããããŸãã äž»ãªããšã¯ãã\ lib \ securityããã©ã«ããŒã«ç§»åãããããã®2ã€ã®ãã¡ã€ã«ã眮ãæããŠããã«ã³ããŒããããšã§ãã ãã®ãããã§ã¯ãå®å šãšèŠãªãããšãã§ããŸãã eclipseãå床å®è¡ããŠããã©ã°ã€ã³ãã€ã³ã¹ããŒã«ã§ããŸãã
ãšã©ãŒåçãšäº€æãã¹ã
GNU ARM Eclipse Windowsãã«ãããŒã«ãã€ã³ã¹ããŒã«ãã
å®éã®ãšãããWindowsã§ã¯ã³ãã³ãã©ã€ã³ã®ãmakeãã³ãã³ãã¯ããã©ã«ãã§ã¯æ©èœããŸããïŒLinuxã§ã¯ããã¹ãŠã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ã§ãã®ã¢ããªã±ãŒã·ã§ã³ãããã©ã«ãã§ã€ã³ã¹ããŒã«ãããããã§ã¯ãããŸããïŒã ãªããmakeãã¢ããªã±ãŒã·ã§ã³ãå¿ èŠãªã®ãã以äžã§èª¬æããŸãããä»åºŠã¯ããã䜿çšããæ©èœãè¿œå ãããã©ã°ã€ã³ãã€ã³ã¹ããŒã«ããã ãã§ãã ããã®ããã«ã- å ¬åŒãªããžããªã«ç§»åããŸã ã
- ãã©ãããã©ãŒã ã®ã.exeããã¡ã€ã«ãããŠã³ããŒãããŸãã å·çæç¹ã§ã¯ãææ°ããŒãžã§ã³ã¯ãgnuarmeclipse-build-tools-win64-2.8-201611221915-setup.exeãã§ãã
- ããŠã³ããŒããããã¡ã€ã«ãå®è¡ããã次ãžãããåæããããã次ãžãããã€ã³ã¹ããŒã«ãããçµäºããã¯ãªãã¯ããã ãã§ãã
GNU ARM Embedded ToolchainãããŠã³ããŒãããŠã€ã³ã¹ããŒã«ããŸã
- å ¬åŒãŠã§ããµã€ãã«è¡ã
- Windowsçšã®ã.exeããã¡ã€ã«ã«ã³ã³ãã€ã«ãããææ°ã®ææ°ããŒãžã§ã³ãããŠã³ããŒãããŸãïŒå³åŽã®åïŒã
- ããŠã³ããŒããããã¡ã€ã«ãå®è¡ããŸãã
- OKãã¯ãªãã¯ããŸãã
- 次ã«ã次ãžã
- ãåæããŸãã
- ãã€ã³ã¹ããŒã«ãïŒããã§ã¯ãä»»æã®ãã©ã«ããŒãæå®ã§ããããšã説æããŸãããã€ã³ã¹ããŒã«äžã«ã³ã³ããŒãã³ããç»é²ããéã®åé¡ãåé¿ããããã«ãããã©ã«ãã®ãã©ã«ããŒãæ®ãããšããå§ãããŸãïŒã
- ã€ã³ã¹ããŒã«ã®æåŸã«ããShow ReadMeãããã¡ã€ã«ã®ãã§ãã¯ãå€ããŸãã æ®ãã¯ããã©ã«ãã§æ®ãããŠããŸãã
- å®äº
次ã®æé ã¯åèæ å ±ã§ãããçç¥ã§ããŸãã ãã®å ŽåãéããŠããã³ãã³ãã©ã€ã³ãéããããšãã§ããŸãã
- éããã³ãã³ãã©ã€ã³ã§ãåŒçšç¬Šãªãã§ãcd binããšèšè¿°ããŸãïŒããã¯ããã¹ãŠã®ããŒã«ãã§ãŒã³ã³ã³ããŒãã³ãã®ã.exeããã¡ã€ã«ãããå Žæã§ãïŒã
- åŒçšç¬Šãªãã§ãarm-none-eabi-gcc --versionããšå ¥åããŸãã
- gccãå¿çããããšã確èªããããã³ã³ãœãŒã«ãéããŸãã
ã€ã³ã¹ããŒã«ããã³æ€èšŒããã»ã¹ã¯æ確ã§ãã
OpenOCDãã€ã³ã¹ããŒã«ãã
ç°å¢ãšããŒã«ãã§ãŒã³ãæ±ããŸããã 次ã«ãOpenOCDãã€ã³ã¹ããŒã«ããå¿ èŠããããŸããããã«ãããEclipseã¯arm-none-eabi-gdbãä»ããŠã³ã³ãããŒã©ãŒãå¶åŸ¡ããŸãã ããã§ã¯ãã¹ãŠãç°¡åã§ãã- å ¬åŒãªããžããªã«ç§»åããŸã ã
- OSã®ã.exeããã¡ã€ã«ãããŠã³ããŒãããŸãã å·çæç¹ã§ã¯ãææ°ããŒãžã§ã³ã¯ãgnuarmeclipse-openocd-win64-0.10.0-201701241841-setup.exeãã§ãã
- ããŠã³ããŒãããã.exeããå®è¡ããŸãã äœãå€æŽããã«ã€ã³ã¹ããŒã«ããŸãïŒãã¹ãå«ãïŒã
st-link v2ã«ãã©ã€ããŒãã€ã³ã¹ããŒã«ãã
OpenOCDã¯ã³ã³ãããŒã©ãŒãå¶åŸ¡ããŸãããããã¯äºå®ã§ããããã®ããã«ã¯ãããã¬ãŒçšã®ãã©ã€ããŒãå¿ èŠã§ãã ç§ãã¡ã®å Žåãããã¯st-link v2ã§ãã å¥ã®ãããã¬ãŒãããå Žåããã®éšåã¯ã¹ãããã§ããŸããåœã®st-linkããªãªãžãã«ããåããããã©ã€ããŒã¯åãã§ãã å§ããŸãããã
- st-link v2ã®å ¬åŒããŒãžã«è¡ã
- ããŒãžã®äžéšã§ããST-LINKãST-LINK / V2ãST-LINK / V2-1 Windows7ãWindows8ãWindows10çšã«çœ²åãããUSBãã©ã€ããŒããšãã説æãå«ããã¡ã€ã«ãSTSW-LINK009ããããŠã³ããŒãããŸãã
- å¥ã®ããŒãžã«åãæ¿ãããšãã¯ãããŒãžã®äžéšã«ãã[ããŠã³ããŒã]ãã¯ãªãã¯ããŸãã ããã§ãVPNãä»ããŠã€ã³ã¿ãŒãããããµãŒãã£ã³ããªãå Žåã¯ãç»é²ããå¿ èŠãããããšã«æ³šæããŠãã ããã ãããè¡ãæ¹æ³ã«ã€ããŠã¯èª¬æããŸããã ãã®åŸããã¡ã€ã«ãããŠã³ããŒããããŸãã
- ã¢ãŒã«ã€ãã解åããåŸãOSã®ããã深床ã«å¿ããŠãã©ã€ããŒã€ã³ã¹ããŒã«ãã¡ã€ã«ãéžæããŸãã ç§ã®å Žåãããã¯ãdpinst_amd64.exeãã§ãã
- ã€ã³ã¹ããŒã«äžã«ããã¹ãŠã®èŠä»¶ã«åæããŸãã ãããŠããSTMicroelectronicsãœãããŠã§ã¢ãåžžã«ä¿¡é Œããããã§ãã¯ããã¯ã¹ãéžæããŸãã
åçãããŠã³ããŒãããŠã€ã³ã¹ããŒã«ããããã»ã¹ã
ãã¹ãŠãã©ã®ããã«æ©èœããããç解ããŠããŸã
ããã§ãå¿ èŠãªãã¹ãŠã®ã³ã³ããŒãã³ããã€ã³ã¹ããŒã«ããEclipseã§ãããžã§ã¯ããäœæãïŒãããžã§ã¯ãã®äœæãšæ§æã®æ¹æ³ã«ã€ããŠã¯æ¬¡ã®èšäºã§èª¬æããŸãïŒããCtrl + BããæŒããŸããã ãdebugãã¢ã€ã³ã³ãã¯ãªãã¯ããããšã§ãã³ã³ãããŒã©ãŒã«ããŠã³ããŒãããŠãããã°ãçŽæ¥éå§ã§ãããæºåãæŽã£ããã¡ãŒã ãŠã§ã¢ãã¡ã€ã«ãåŸãããŸããã ããããããããã¹ãŠã®ã¢ã¯ã·ã§ã³ã®èåŸã«é ãããŠãããã®ã¯äœã§ããïŒ ãããŠã次ã®ããšãèµ·ãããŸãïŒ- ãCtrl + BããæŒããšãEclipseã¯ãããžã§ã¯ããã£ã¬ã¯ããªããªãŒïŒäœæãããã¹ãŠã®ãã©ã«ããŒãšãã®äžã®ãã¡ã€ã«ïŒãåæããŸãã ãããè¡ãã«ã¯ããããžã§ã¯ãã®äœææã«æå®ãããã¡ã€ã«ãã¹ã䜿çšããŸãã
- ãã®åŸãEclipseã¯ã¡ã€ã¯ãã¡ã€ã«ãäœæããŸãã ãã®ãã¡ã€ã«ã«ã¯ãã³ã³ãã€ã«ãããã¡ã€ã«ïŒãããžã§ã¯ãã«è¿œå ããããããé
眮ãããŠãããã£ã¬ã¯ããªãžã®ãã¹ã瀺ããŸãïŒãããã³ãã©ã¡ãŒã¿ãŒïŒããã§ã¯Eclipseã¯ãC / C ++ãã«ãïŒïŒããã³æçµãã¡ãŒã ãŠã§ã¢ãã¡ã€ã«ã§ä»¥åã«ã³ã³ãã€ã«ããããã¡ã€ã«ãã³ã³ãã€ã«ããæ¹æ³ã
泚ïŒmakefileã«ã¯æ¡åŒµåã¯ãããŸããã - 次ã«ãEclipseã¯ãäœæãããã¡ã€ã¯ãã¡ã€ã«ãžã®ãã¹ãšããããžã§ã¯ãã®ã»ããã¢ããæã«æå®ãããã«ããã©ã¡ãŒã¿ãŒïŒããšãã°ãã³ã³ãã€ã«ã«äœ¿çšãããããã»ããµã¹ã¬ããã®æ°ïŒã䜿çšããŠmakeããã°ã©ã ãåŒã³åºããŸãã
- makeããã°ã©ã ã¯ãmakefileã®æ瀺ã«åŸã£ãŠãã¹ãŠã®ãããžã§ã¯ããã¡ã€ã«ã調ã¹ãåãã¡ã€ã«ã®æ¡åŒµåãã.oãã®ãã¡ã€ã«ãåãåããŸãã ãããã®ãã¡ã€ã«ã¯ãã¡ã€ã³ãããžã§ã¯ããšåãæ¹æ³ã§ïŒããªãŒéå±€ãä¿æããŠïŒDebugãã©ã«ããŒã«ãããŸãã äœããã®ãã¡ã€ã«ã«ãšã©ãŒãããå Žåãã³ã³ãã€ã«ã³ã³ãœãŒã«ã§èµ€ã§åŒ·èª¿è¡šç€ºããããã®éç¥ãåãåããŸãïŒããã©ã«ãã§ã¯ãç»é¢ã®äžéšã«ãããŸãïŒã ã³ã³ãã€ã«ãšã©ãŒãçºçããå Žåããã以éã®ã³ã³ãã€ã«ãšã¢ã»ã³ããªã¯çµäºããŸãã ãã¡ã€ã«ãã³ã³ãã€ã«ããã«ã¯ãmakeã¯makefileããŒã«ãã§ãŒã³ïŒãŸãã¯ããã®ã³ã³ããŒãã³ãïŒgcc / g ++ïŒã§æå®ããããã®ã䜿çšããŸãã Eclipseã¯ããããžã§ã¯ãèšå®ããããŒã«ãã§ãŒã³ãžã®ãã¹ãåã³åããŸãã
- ã.cããããcppããããSããããã¹ãŠã®ã.oããã¡ã€ã«ãäœæããåŸïŒã¢ã»ã³ãã©ãŒã³ãŒããå«ããã¡ã€ã«ã«ã¯å€§æåã®ãSãæ¡åŒµåãå¿ èŠã§ããããšã«æ³šæããŠãã ãããããããªããšãã¡ã€ã¯ãã¡ã€ã«ãäœæãããšãã«ãããã®ãã¡ã€ã«ã¯åã«ç¡èŠãããŸãããšã©ãŒãææ¡ããã®ãé£ãããªããŸãïŒãããžã§ã¯ããããã«ããã¡ã€ã«ãžã®ãã¹ïŒãããžã§ã¯ãã«è¿œå ããæ¡åŒµåã.ldãã®ãã¡ã€ã«ïŒã§ãªã³ã«ãŒïŒã€ã³ã¹ããŒã«ããããŒã«ãã§ãŒã³ã®arm-none-eabi-ldïŒãåŒã³åºããŸãã ããã§ããªã³ã«ã¯ãæ¡åŒµåãã.ldãã®ã¬ã€ã¢ãŠããã¡ã€ã«ã§æå®ãããåœä»€ïŒã«ãŒã«ïŒã«äŸåããŠãããŒãã.oããã¡ã€ã«ããããŒããã·ã§ã³ã.elfããæã€ãªããžã§ã¯ããã¡ã€ã«ã1ã€åéããããšããŸãã "and" .map "ïŒã ã©ã®ã³ãŒããšããŒã¿ãããã°ã©ã ããã¹ããŒã§ãããã決å®ããã®ã¯ãªã³ã«ãŒïŒãªã³ã«ãŒïŒã§ããããšã«æ³šæããããšãéèŠã§ãïŒããããã©ãã§ã䜿çšããããã¹ããŒã¹ãå æãããšèŠãªãå ŽåïŒã ãããã£ãŠã1000åã®ã°ããŒãã«å€æ°ãäœæãããã®ãã¡2åã®ã¿ãã³ãŒãã§äœ¿çšããå Žåãæ®ãã¯ïŒããŒã¯ãŒããvolatileããŸãã¯ãäœãåé€ã§ããªãã»ã¯ã·ã§ã³ã«å ¥ãããã§ãããžã§ã¯ãããé€å€ã§ããªãããšãæ瀺çã«æå®ãããŠããªãéãïŒ "ïŒæçµçãªãªããžã§ã¯ããã¡ã€ã«ããé€å€ãããããã空ãã¡ã¢ãªãå¢ããŸãã
- æçµçãªãªããžã§ã¯ããã¡ã€ã«ãåãåã£ããããããã³ã³ãããŒã©ãŒã«ãçž«ãä»ãããŠãããã°ããŸãã ãããè¡ãããã«ãEclipseã¯ãã¡ã€ã«ãopenocd.cfgããžã®ãã¹ã§OpenOCDããã°ã©ã ãåŒã³åºããŸãïŒååã¯æ¡åŒµåã.cfgãã§ããã°äœã§ãæ§ããŸããããIDEããã§ã¯ãªãã³ãã³ãã©ã€ã³ãããããã°ããå¿
èŠãããå Žåã OpenOCDã®æ£ããååã®ãã¡ã€ã«ã§ã¯ãæ§æãã¡ã€ã«ã®ååãæžã蟌ããªãããšãããããŸãïŒæ§æãã¡ã€ã«ãæå®ãããŠããªãå Žåããã®ååã®ãã¡ã€ã«ãèªåçã«æ€çŽ¢ãããããïŒã
æå®ããããã¡ã€ã«ãååšããå ŽåãOpenOCDã¯ããã¡ã€ã«å ã®ãã©ã¡ãŒã¿ãŒã«åŸã£ãŠããã€ã¯ãã³ã³ãããŒã©ãŒãžã®æ¥ç¶ãè©Šã¿ãŸãã æ¥ç¶ãæ£ããå Žåãæ¥ç¶ã確ç«ãããã³ã³ãããŒã©ãŒãããã¬ãŒãåäœããŠãããšããéç¥ãåãåããŸãã
ã³ã³ãããŒã©ãŒã«æ¥ç¶ããããã«ãOpenOCDã¯æåã«ã€ã³ã¹ããŒã«ããst-linkãã©ã€ããŒã䜿çšããŸãã - OpenOCDã¯ãã³ã³ãããŒã©ãŒãšã®æ¥ç¶ã確ç«ã§ããåŸãTelnetæ¥ç¶ãéããŸãã 詳现ã«èª¬æããªãå Žåãããã¯arm-none-eabi-gdbãã³ã³ãããŒã©ãŒãæ£åžžã«å¶åŸ¡ã§ããããã«ããããã«å¿ èŠã§ãã
- telnetæ¥ç¶ã確ç«ããããšãEclipseã¯æ¥ç¶å ã®ããŒãïŒOpenOCDãéããããŒãïŒã§arm-none-eabi-gdbãèµ·åããŸãã
- 次ã«ãEclipseã¯åæåã³ãã³ããgdbã«éä¿¡ããŸãïŒãã©ãã·ã¥ã®æ¶å»ããã¡ãŒã ãŠã§ã¢ãã¡ã€ã«ã®æžã蟌ã¿ãã¡ã€ã³ãžã®ãã¬ãŒã¯ãã€ã³ãã®èšå®ãããã³ãã®ä»ã®ããã€ãã®ãªãã·ã§ã³ãã©ã¡ãŒã¿ãŒïŒã
- ãã®åŸãEclipseã§ã¡ã€ã³ãã¡ã€ã«ã®ã³ãŒãã®æåã®è¡ãžã®ãã€ã³ã¿ãŒã衚瀺ããããããã°ãéå§ã§ããŸãã
ãããã«
ãã®èšäºã§ã¯ãWindowsã®ãã«ãæ§æããã»ã¹ã詳现ã«èª¬æããããšããŸããã ã質åãããå Žåã¯ãå人ã®ã¡ãŒã«ã«æžããŠãåé¡ã解決ãããã®è§£æ±ºçãèšäºã«è¿œå ããŠã¿ãŸãã次ã®èšäºã§ã¯ãç¹å®ã®ã³ã³ãããŒã©ãŒçšã«Eclipseãæ§æãããã¢ãããžã§ã¯ããæ§ç¯ãããããã°ãæ§æããæ¹æ³ã説æããŸãã