ã¯ããã«
第4åã§ãã¼ãã¦ã§ã¢ãå®æããã¾ããã
第ï¼åããå¾ã ã«ã½ããã®ã»ãã¸ç§»ã£ã¦ããã¾ããä»åã¯ã½ããéçºã®ããã®ç°å¢æ§ç¯ã«ã¤ãã¦æ¸ãã¦ããã¾ãã
éçºç°å¢æ§ç¯
使ç¨ãããã¤ã³ã³ã¯Teensy4.1ãªã®ã§Arduinoã§éçºã§ãã¾ããéçºç°å¢ã¨ãã¦ã¯ä¸è¨ã§ãã
- ã¨ãã£ã¿ï¼VS Code
- éçºç°å¢ï¼Platform IO
Platform IOã¯Arduino IDEããããã«ããæ©ãã¨æãã¦ããã®ã§ãã¡ãã使ãã¾ããã¦ããããã¹ããéç解æããããã¨æãã°ã§ããç°å¢ã§ãã
å³ã¯ãªãã¯ã§VS Codeãèµ·åã§ããããã«ããããã®ã¤ã³ã¹ãã¼ã«è¨å®
ãã¾ããVS Codeã®ã¤ã³ã¹ãã¼ã«ãæ¸ãå¿ è¦ã¯ãªãã¨æãã¾ãããã¤ã³ã¹ãã¼ã«æã«ãã£ã¦ãããã»ããè¯ãè¨å®ããã£ãã®ã§è¦æ¸ã¨ãã¦æ¸ãã¦ããã¾ãã
ã¤ã³ã¹ãã¼ã«æã«ä¸è¨èµ¤æ ã«ãã§ãã¯ãå ¥ããã¨ä¾¿å©ã§ããã
ä½ãã§ããããã«ãªããã¨ããã¨ãã¡ã¤ã«ããã©ã«ããå³ã¯ãªãã¯ããã¨ãã«ãCode ã§éããã¨ããã®ã表示ãããããã«ãªãã¾ããããã§é¸æãããã¡ã¤ã«ããã©ã«ããç´æ¥VS Codeã§éããããã«ãªãã¾ãããããå°å³ã«ä¾¿å©ã§ãã
Platform IOã®ã¤ã³ã¹ãã¼ã«
Platform IOã¯VS Codeã®æ¡å¼µæ©è½ããå ¥ãããã¨ãã§ãã¾ãã
ããã¸ã§ã¯ãã®ä½æ
Platform IOã®HOMEç»é¢ã®ãNew Projectãããä½æã§ãã¾ãã
èªåã®ç°å¢ã«åããã¦è¨å®ãã¾ããããã¸ã§ã¯ãä½æã®å ´æãå¤ãããå ´åã¯ãLocationãã®ãã§ãã¯ãå¤ãã¦èªåã§è¨å®ã§ãã¾ãã
ä½æããã¨ä¸è¨ã®ãããªããã¸ã§ã¯ããä½æããã¾ãã
æ¸ãè¾¼ãã¨ãã¯å·¦ã®Platform IOã¢ã¤ã³ã³ãã¯ãªãã¯ããã¨ãã«åºã¦ããç»é¢ã§ãUploadããã¯ãªãã¯ãã¾ãã
Clang-formatã®é©ç¨
Clang-formatã¯ãè¨å®ããã«ã¼ã«ã«åºã¥ãã¦ã³ã¼ããèªåæ´å½¢ãã¦ããã¾ããèªå好ã¿ã®ã«ã¼ã«ã§æ´å½¢ãã¦ãããã®ã§ä¾¿å©ã§ããä¸è¨ã®ãµã¤ããåèã«ãã¾ããã
Clang-formatã®è¨å®ãã¡ã¤ã«ã¯ä¸è¨ã®ãµã¤ããèªåçæãã¦ãããã®ã§ä¾¿å©ã§ãã
éç解æã®å®æ½
Platform IOã¯éç解æãã§ãã¾ããCppCheckãClang-Tidyãªã©ã使ããããã§ãã詳ãããã¨ã¯ä¸è¨åç §ã
éç解æãå®æ½ããã®ã¯ç°¡åã§ãAdvancedãã®ãCheckããã¯ãªãã¯ããã°ã§ãã¾ããçµæã¯ã¿ã¼ããã«ã«è¡¨ç¤ºããã¾ãã
ãã1ã¤ã®æ¹æ³ã¯ãPIO Homeãã®ãInspectãã¿ãããã解æã§ãã¾ãã
ãã¡ãããå®æ½ããã»ããçµæã¯è¦ãããæ°ããã¾ãã
ãããã«
ããã¾ã§ã®å¤æ´ã¯ä¸è¨ãªãã¸ããªã®ã¿ã°ã第5åããåç §ãã¦ãã ããã
éçºç°å¢ãæ´ããã®ã§æ¬¡ããã¯ã³ã¼ããæ¸ããããªï¼
次ã®è¨äº