
{"id":6601,"date":"2017-10-19T19:03:18","date_gmt":"2017-10-19T10:03:18","guid":{"rendered":"https:\/\/okiraku-camera.tokyo\/blog\/?p=6601"},"modified":"2020-03-01T22:47:58","modified_gmt":"2020-03-01T13:47:58","slug":"adafruit_gfx%e3%81%ae%e3%83%87%e3%83%95%e3%82%a9%e3%83%ab%e3%83%88%e3%83%95%e3%82%a9%e3%83%b3%e3%83%88glcdfont%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"https:\/\/okiraku-camera.tokyo\/blog\/?p=6601","title":{"rendered":"Adafruit_GFX\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30d5\u30a9\u30f3\u30c8(glcdfont)\u306b\u3064\u3044\u3066"},"content":{"rendered":"<h1>\u6982\u8981<\/h1>\n<p>TFT\u6db2\u6676\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u30ea\u30e2\u30b3\u30f3\u306e\u64cd\u4f5c\u30d1\u30cd\u30eb\u3092\u63cf\u753b\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u56f3\u5f62\u306e\u307b\u304b\u306b\u30d5\u30a9\u30f3\u30c8\u3082\u63cf\u753b\u3057\u3066\u3084\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002Adafruit_GFX\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u306f\u3001\u30b5\u30f3\u30d7\u30eb\u3068\u3057\u3066\u3044\u304f\u3064\u304b\u306e\u30d5\u30a9\u30f3\u30c8\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u304c\u3001\u4eca\u56de\u306f\u4f59\u8a08\u306a\u3053\u3068\u3092\u8003\u3048\u305a\u306b\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d5\u30a9\u30f3\u30c8\u3092\u4f7f\u3046\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<figure id=\"attachment_6581\" aria-describedby=\"caption-attachment-6581\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2017\/10\/77e1c1e409e8d7d8d16a3161cbd7f490.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-6581\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2017\/10\/77e1c1e409e8d7d8d16a3161cbd7f490-552x414.jpg\" alt=\"A_PRO_MINI_ILI9341_TFT1\" width=\"552\" height=\"414\" \/><\/a><figcaption id=\"caption-attachment-6581\" class=\"wp-caption-text\">A_PRO_MINI_ILI9341_TFT1<\/figcaption><\/figure>\n<p>\u30d5\u30a9\u30f3\u30c8\u3092\u5229\u7528\u3059\u308b\u306b\u3042\u305f\u3063\u3066\u3001\u30ea\u30e2\u30b3\u30f3\u7528\u306b\u8a66\u4f5c\u3057\u305f\u69cb\u6210\u3092\u4f7f\u3063\u3066\u3001\u6587\u5b57\u8868\u793a\u306b\u3064\u3044\u3066\u8abf\u3079\u305f\u308a\u30d5\u30a9\u30f3\u30c8\u306e\u5b9f\u4f53\u304cSRAM\u3067\u306f\u306a\u304f\u30d5\u30e9\u30c3\u30b7\u30e5\u30e1\u30e2\u30ea\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u3068\u3092\u78ba\u8a8d\u3057\u305f\u8a71\u3002<a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=6487\">\u56de\u8def\u306f\u3061\u3087\u3063\u3068\u524d\u306b\u63b2\u8f09\u3057\u305f\u3082\u306e\u3068\u540c\u69d8<\/a>\u3067\u3042\u308b\u3002<\/p>\n<h2>glcdfont.c<\/h2>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u30d5\u30a9\u30f3\u30c8\u306e\u5b9f\u4f53\u306f\u3001glcdfont.c \u3068\u3057\u3066Adafruit_GFX\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u4e00\u7dd2\u306b\u914d\u5e03\u3055\u308c\u3066\u3044\u308b\u3002glcdfont.c\u306f\u3001\u30d3\u30eb\u30c9\u6642\u306b\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u4e00\u7dd2\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u30ea\u30f3\u30af\u3055\u308c\u308b\u306e\u3067\u3001\u7279\u306b\u6307\u5b9a\u3057\u306a\u304f\u3066\u3082\u30b9\u30b1\u30c3\u30c1\u3068\u5171\u306b\u30de\u30a4\u30b3\u30f3\u5074\u306b\u9001\u308a\u8fbc\u307e\u308c\u308b\u3002<\/p>\n<p>glcdfont.c\u3092\u958b\u3044\u3066\u898b\u3066\u307f\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u914d\u5217\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n<p style=\"padding-left: 30px;\"><span class=\"lang:default decode:true crayon-inline\">static const unsigned char font[] PROGMEM = { &#8230; }<\/span><\/p>\n<p>\u3053\u306e\u914d\u5217\u306b\u306f\u3001\u56fa\u5b9a\u9577\u306e\u30d3\u30c3\u30c8\u30de\u30c3\u30d7\u30d5\u30a9\u30f3\u30c8\u306e\u5b9f\u4f53\u304c1\u6587\u5b57\u3042\u305f\u308a5\u30d0\u30a4\u30c8\u305a\u3064256\u884c\u306b\u308f\u305f\u3063\u3066\u8a18\u8ff0\u3055\u308c\u3066\u3044\u308b\u3002\u5404\u30d5\u30a9\u30f3\u30c8\u306e\u5927\u304d\u3055\u304c 5 \u00d7 7\u30c9\u30c3\u30c8\u306a\u306e\u3067\u30011\u6587\u5b57\u3042\u305f\u308a40\u30d3\u30c3\u30c8\u3042\u308c\u3070\u5341\u5206\u306a\u306e\u3067\u3042\u308b\u3002<\/p>\n<p>\u3053\u306e\u914d\u5217\u306b\u306f\u3001<strong>PROGMEM<\/strong> \u3068\u3044\u3046\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u4ed8\u3044\u3066\u3044\u308b\u3002\u3053\u306e\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u4ed8\u3044\u305f\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u306f\u3001SRAM\u3067\u306f\u306a\u304f\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u540c\u3058\u30d5\u30e9\u30c3\u30b7\u30e5\u30e1\u30e2\u30ea\u306b\u914d\u7f6e\u3055\u308c\u308b\u3002PROGMEM\u306b\u3064\u3044\u3066\u306f\u5f8c\u8ff0\u3059\u308b\u3002<\/p>\n<h2>\u30d5\u30a9\u30f3\u30c8\u306e\u8868\u793a<\/h2>\n<p>\u307e\u305a\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b9\u30b1\u30c3\u30c1\u3092\u66f8\u3044\u3066\u3001TFT\u6db2\u6676\u306b\u30d5\u30a9\u30f3\u30c8\u3092\u8868\u793a\u3057\u3066\u307f\u305f\u3002<\/p>\n<pre class=\"height-set:true nums:true lang:c++ decode:true \">#include &lt;Adafruit_GFX.h&gt;\r\n#include &lt;Adafruit_ILI9341.h&gt;\r\n#define TFT_RST 6\r\n#define TFT_DC 7\r\n#define TFT_CS 5\r\nAdafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);\r\n#define LED_PIN 4\r\n\r\n#define TEXT_COLOR  ILI9341_NAVY\r\n#define BG_COLOR    ILI9341_GREENYELLOW\r\n#define BG_COLOR_EVEN    ILI9341_CYAN\r\n\r\nvoid dump_fonts() {\r\n  enum { x_ofs = 4, y_ofs = 8, x_size = 13, y_size = 17 };\r\n  tft.fillScreen(BG_COLOR);\r\n  tft.cp437(true);\r\n  tft.setTextSize(2);\r\n  int i;\r\n  char tmp[5];\r\n  tft.setTextColor(TEXT_COLOR, BG_COLOR_EVEN);\r\n  for(int y = 0; y &lt; 16; y++) {\r\n    if (y == 0) {\r\n      for(i = 0; i &lt; 16; i++) { \r\n        sprintf(tmp, \"%X  \",i);        \r\n        tft.setCursor((i + 1) * x_size + x_ofs * 2, y_ofs);\r\n        tft.print(tmp);\r\n      }\r\n    }\r\n    if (y % 2 == 1)\r\n      tft.setTextColor(TEXT_COLOR, BG_COLOR_EVEN);\r\n    else\r\n      tft.setTextColor(TEXT_COLOR, BG_COLOR);\r\n    for(i = 0; i &lt; 16; i++) {\r\n      if (i == 0) {\r\n        sprintf(tmp, \"%X  \", y);        \r\n        tft.setCursor(x_ofs, (y + 1) * y_size + y_ofs);\r\n        tft.print(tmp);\r\n      }\r\n      tft.setCursor((i + 1) * x_size + x_ofs * 2, (y + 1) * y_size + y_ofs);\r\n      sprintf(tmp, \"%c \", (y * 16 + i) &amp; 0xff);\r\n      tft.print(tmp);\r\n    }\r\n  }\r\n  tft.drawFastHLine(x_ofs, y_ofs + y_size - 2 , x_size * 17, TEXT_COLOR);\r\n  tft.drawFastVLine(x_ofs + x_size + 1, y_ofs , y_size * 17, TEXT_COLOR);\r\n}\r\n\r\nvoid setup() {\r\n  pinMode(LED_PIN, OUTPUT);\r\n  pinMode(2, INPUT_PULLUP);\r\n  pinMode(TFT_RST, OUTPUT);\r\n  digitalWrite(TFT_RST, 0);  \r\n  delay(10);\r\n  digitalWrite(TFT_RST, 1);  \r\n  delay(10);\r\n  tft.begin();\r\n  tft.setTextWrap(false);\r\n  tft.setRotation(2);\r\n  digitalWrite(LED_PIN, 1); \/\/ back-light on.\r\n  dump_fonts();\r\n}\r\nvoid loop() { }\r\n<\/pre>\n<p>TFT\u30e2\u30b8\u30e5\u30fc\u30eb\u7528\u4ed6\u306eI\/O\u30dd\u30fc\u30c8\u306e\u521d\u671f\u5316\u3084\u30d0\u30c3\u30af\u30e9\u30a4\u30c8\u306e\u70b9\u706f\u306a\u3069\u306b\u3064\u3044\u3066\u306f\u4ee5\u524d\u3068\u540c\u69d8\u3002\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u308b\u3002<\/p>\n<figure id=\"attachment_6605\" aria-describedby=\"caption-attachment-6605\" style=\"width: 414px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2017\/10\/02975920b32e03c2f568a37dbcf75999.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6605 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2017\/10\/02975920b32e03c2f568a37dbcf75999-414x552.jpg\" alt=\"\" width=\"414\" height=\"552\" \/><\/a><figcaption id=\"caption-attachment-6605\" class=\"wp-caption-text\">glcdfont \/ cp437 = true;<\/figcaption><\/figure>\n<p>\u6a2a\u8ef8\u304c\u5de6\u304b\u3089\u53f3\u306b\u4e0b\u4f4d4\u30d3\u30c3\u30c8\u3001\u7e26\u8ef8\u304c\u4e0a\u304b\u3089\u4e0b\u306b\u4e0a\u4f4d4\u30d3\u30c3\u30c8\u306e\u30de\u30c8\u30ea\u30af\u30b9\u306b\u306a\u3063\u3066\u304a\u308a\u3001glcdfont\u306b\u542b\u307e\u308c\u3066\u3044\u308b256\u7a2e\u985e\u306e\u6587\u5b57\u3092\u8868\u793a\u3057\u3066\u3044\u308b\u3002\u306a\u304a\u30010x00\u30680xff\u306f\u3044\u305a\u308c\u3082\u7a7a\u767d\u30670x20\u3068\u540c\u3058\u3002<\/p>\n<p>\u5236\u5fa1\u6587\u5b57\u306e\u9818\u57df\u307e\u3067\u3044\u308d\u3044\u308d\u306a\u30ad\u30e3\u30e9\u30af\u30bf\u304c\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u3061\u3087\u3063\u3068\u3057\u305f\u30ea\u30e2\u30b3\u30f3\u306e\u30dc\u30bf\u30f3\u3092\u66f8\u304f\u306b\u306f\u826f\u3055\u305d\u3046\u3067\u3042\u308b\u3002<\/p>\n<h3>\u304b\u3064\u3066glcdfont.c\u306b\u3042\u3063\u305f\u554f\u984c\u70b9<\/h3>\n<p>\u5148\u307b\u3069\u306e\u30b9\u30b1\u30c3\u30c1\u306e16\u884c\u76ee\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u3044\u305f\u3002<\/p>\n<p style=\"padding-left: 30px;\"><span class=\"lang:default decode:true crayon-inline\">tft.cp437(true);<\/span><\/p>\n<p>\u3053\u306e\u884c\u306b\u3088\u308a\u3001\u30b3\u30fc\u30c9\u30da\u30fc\u30b8437(CP437)\u306e\u30ad\u30e3\u30e9\u30af\u30bf\u30bb\u30c3\u30c8\u3092\u6307\u5b9a\u3057\u3066\u3044\u308b\u3002CP437\u306f\u3001\u3080\u304b\u3057PC-DOS\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u4f7f\u308f\u308c\u3066\u3044\u305f\u3001\u4eca\u3068\u306a\u3063\u3066\u306f\u61d0\u304b\u3057\u3044\u30ad\u30e3\u30e9\u30af\u30bf\u30bb\u30c3\u30c8\u306e\u4e00\u3064\u3067\u3042\u308b\u3002\u3082\u3068\u3082\u3068\u3001glcdfont\u306fCP437\u7528\u306b\u4f5c\u3089\u308c\u305f\u3082\u306e\u3060\u3068\u601d\u3046\u306e\u3060\u3051\u3069\u3001\u308f\u3056\u308f\u3056 <em>cp437(true);<\/em> \u3068\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u7406\u7531\u306f\u3001\u305d\u3046\u3057\u306a\u3044\u3068\u6587\u5b57\u304c1\u3064\u6b20\u843d\u3057\u4ee5\u964d\u306e\u30b3\u30fc\u30c9\u304c\u305a\u308c\u3066\u3057\u307e\u3046\u305f\u3081\u3067\u3042\u308b\u3002<\/p>\n<p>\u305f\u3081\u3057\u306b\u3001<span class=\"lang:default decode:true crayon-inline\">tft.cp437(false);<\/span>\u00a0 \u3068\u3057\u3066\u5b9f\u884c\u3057\u3066\u307f\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n<figure id=\"attachment_6606\" aria-describedby=\"caption-attachment-6606\" style=\"width: 414px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2017\/10\/b3543582d90a56cfd45279a1391ea436.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6606 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2017\/10\/b3543582d90a56cfd45279a1391ea436-414x552.jpg\" alt=\"\" width=\"414\" height=\"552\" \/><\/a><figcaption id=\"caption-attachment-6606\" class=\"wp-caption-text\">glcdfont \/ cp437 = false;<\/figcaption><\/figure>\n<p>\u4e00\u898b\u3059\u308b\u3068\u540c\u3058\u306b\u898b\u3048\u308b\u306e\u3060\u304c\u30010xB0\u4ee5\u964d\u306e\u30b3\u30fc\u30c9\u3068\u30ad\u30e3\u30e9\u30af\u30bf\u306e\u5bfe\u5fdc\u304c\u305a\u308c\u3066\u3057\u307e\u3063\u3066CP437\u3067\u306f\u306a\u304f\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n<p>\u3053\u306e\u3053\u3068\u306f\u3001Adafruit_GFX.cpp \u306e\u4e2d\u306e\u30b3\u30e1\u30f3\u30c8\u3067\u3082\u8a00\u53ca\u3055\u308c\u3066\u3044\u308b\u3002\u60f3\u50cf\u3059\u308b\u306b\u3001\u958b\u767a\u5f53\u521d\u306b0xB0\u306b\u5bfe\u5fdc\u3059\u308b\u30ad\u30e3\u30e9\u30af\u30bf(Light shade) \u3092\u5165\u308c\u5fd8\u308c\u3066\u3057\u307e\u3044\u3001\u6b21\u306e Medium shade \u304c0xB0\u306b\u306a\u3063\u3066\u4ee5\u964d\u3082\u305a\u308c\u3066\u3057\u307e\u3063\u305f\u3001\u3068\u3044\u3046\u3053\u3068\u3067\u306f\u306a\u3044\u304b\u306a\u3002<\/p>\n<p>\u73fe\u5728\u914d\u5e03\u3055\u308c\u3066\u3044\u308bglcdfont.c\u306b\u306f\u6700\u521d\u306e\u56f3\u306e\u3088\u3046\u306b0xB0\u306bLight Shade\u30ad\u30e3\u30e9\u30af\u30bf\u304c\u5165\u3063\u3066\u3044\u308b\u3002\u305f\u3060\u3001Adafruit_GFX.cpp\u5185\u306b\u306f\u3001\u3042\u3048\u3066\u00a0<span class=\"lang:default decode:true crayon-inline\">tft.cp437(true);<\/span> \u00a0\u3068\u66f8\u304b\u306a\u3044\u9650\u308a2\u756a\u76ee\u306e\u56f3\u306e\u3088\u3046\u306a\u30ad\u30e3\u30e9\u30af\u30bf\u30bb\u30c3\u30c8\u306b\u306a\u308b\u3088\u3046\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u66f8\u304b\u308c\u3066\u3044\u308b\u3002\u4fee\u6b63\u4ee5\u524d\u306e\u30ad\u30e3\u30e9\u30af\u30bf\u30b3\u30fc\u30c9\u3092\u4f7f\u3063\u305f\u30b9\u30b1\u30c3\u30c1\u304c\u591a\u6570\u5b58\u5728\u3057\u3066\u3044\u308b\u304b\u3089\u3001\u3068\u3044\u3046\u3053\u3068\u3089\u3057\u3044\u3002<\/p>\n<p>CP437\u306e\u5404\u30ad\u30e3\u30e9\u30af\u30bf\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/www.ascii-codes.com\/\">https:\/\/www.ascii-codes.com\/<\/a> \u3092\u53c2\u7167\u3057\u305f\u3002<\/p>\n<h2>PROGMEM\u3068\u30c7\u30fc\u30bf\u306e\u914d\u7f6e<\/h2>\n<p>\u4e0a\u306b\u8f09\u305b\u305f\u30b9\u30b1\u30c3\u30c1\u3092Arduino IDE\u3067\u30d3\u30eb\u30c9\u3059\u308b\u3068\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u9818\u57df\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30e1\u30e2\u30ea\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u305f\u3002<\/p>\n<pre class=\"striped:false nums:false lang:default decode:true\">\u6700\u592730720\u30d0\u30a4\u30c8\u306e\u30d5\u30e9\u30c3\u30b7\u30e5\u30e1\u30e2\u30ea\u306e\u3046\u3061\u3001\u30b9\u30b1\u30c3\u30c1\u304c10884\u30d0\u30a4\u30c8\uff0835%\uff09\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002\r\n\u6700\u59272048\u30d0\u30a4\u30c8\u306eRAM\u306e\u3046\u3061\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u304c115\u30d0\u30a4\u30c8\uff085%\uff09\u3092\u4f7f\u3063\u3066\u3044\u3066\u3001\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u30671933\u30d0\u30a4\u30c8\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/pre>\n<p>\u300c\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u300d\u306f\u308f\u305a\u304b115\u30d0\u30a4\u30c8\u3057\u304b\u4f7f\u3063\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3042\u308b\u3002Arduino \u3067\u306f\u30b9\u30b1\u30c3\u30c1\u3067\u5b9a\u7fa9\u3057\u305f\u914d\u5217\u306a\u3069\u306e\u30c7\u30fc\u30bf\u306f RAM \u306b\u7f6e\u304b\u308c\u308b\u306f\u305a\u306a\u306e\u3060\u304c\u3001glcdfont \u7528\u306e1280\u30d0\u30a4\u30c8 ( 5 \u00d7 256\u30d0\u30a4\u30c8)\u306f\u3053\u3053\u306b\u542b\u307e\u308c\u3066\u3044\u306a\u3044\u3002PROGMEM\u30ad\u30fc\u30ef\u30fc\u30c9\u306e\u6307\u5b9a\u306b\u3088\u308a\u3001\u30b3\u30fc\u30c9\u9818\u57df\u3068\u540c\u3058\u30d5\u30e9\u30c3\u30b7\u30e5\u30e1\u30e2\u30ea\u306b\u914d\u7f6e\u3055\u308c\u305f\u3088\u3046\u3067\u3042\u308b\u3002\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u3001<em><strong>avr-nm.exe<\/strong><\/em> \u3068\u3044\u3046\u30c4\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u3001\u30d3\u30eb\u30c9\u7d50\u679c\u306eelf\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u5404\u30b7\u30f3\u30dc\u30eb\u306e\u914d\u7f6e\u3092\u898b\u3066\u307f\u305f\u3002<\/p>\n<h2>avr-nm\u306e\u5b9f\u884c<\/h2>\n<p>avr-nm.exe\u306f\u3001\u3046\u3061\u306eWindows PC\u3067\u306f <em>&#8220;C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr\\bin<\/em>&#8221; \u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u3002\u3053\u306e\u30d5\u30a9\u30eb\u30c0\u306b\u306fAVR\u30de\u30a4\u30b3\u30f3\u5411\u3051\u306e\u5404\u7a2e\u30d3\u30eb\u30c9\u30c4\u30fc\u30eb\u3084\u8ee2\u9001\u30c4\u30fc\u30eb\u306a\u3069\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n<p>\u203b \u6a19\u6e96\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3001Arduino 1.8.3\u3092\u524d\u63d0\u3068\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u3053\u306e\u30c4\u30fc\u30eb\u306f\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u30ea\u30f3\u30af\u3055\u308c\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a1\u30a4\u30eb(ELF\u30d5\u30a1\u30a4\u30eb : <em>Executable and Linkable Format<\/em>) \u304b\u3089\u30b7\u30f3\u30dc\u30eb\u3068\u305d\u306e\u30a2\u30c9\u30ec\u30b9\u304a\u3088\u3073\u30b5\u30a4\u30ba\u3092\u629c\u304d\u51fa\u3057\u3066\u30ea\u30b9\u30c8\u8868\u793a\u3057\u3066\u304f\u308c\u308b\u3002<\/p>\n<p>Arduino IDE\u3067\u30d3\u30eb\u30c9\u3057\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a1\u30a4\u30eb\u306f Windows\u306e\u5834\u5408\u3001<em>C:\\Users\\{user-name}\\AppData\\Local\\Temp<\/em> \u30d5\u30a9\u30eb\u30c0\u5185\u306e\u3001&#8221;arduino_build_NNNNNN&#8221;(N\u306f\u6570\u5b57) \u3068\u3044\u3046\u540d\u524d\u306e\u30d3\u30eb\u30c9\u30d5\u30a9\u30eb\u30c0\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u3002<br \/>\n\u3053\u306e\u30d5\u30a9\u30eb\u30c0\u306f\u3001Arduino IDE\u3092\u958b\u59cb\u3057\u30b9\u30b1\u30c3\u30c1\u3092\u958b\u3044\u3066\u30d3\u30eb\u30c9\u3059\u308b\u3054\u3068\u306b\u4f5c\u6210\u3055\u308c\u308b\u3088\u3046\u306a\u306e\u3067\u3001\u30d3\u30eb\u30c9\u76f4\u5f8c\u306b&#8221;arduino_buid*&#8221;\u3092\u691c\u7d22\u3057\u3066\u3084\u308c\u3070\u3001\u6ce8\u76ee\u3057\u305f\u3044\u30b9\u30b1\u30c3\u30c1\u306b\u5bfe\u5fdc\u3059\u308b\u30d5\u30a9\u30eb\u30c0\u306f\u3059\u3050\u306b\u898b\u3064\u304b\u308b\u3060\u308d\u3046\u3002<\/p>\n<p>\u4f8b\u3048\u3070test.ino \u3068\u3044\u3046\u30b9\u30b1\u30c3\u30c1\u3092\u30d3\u30eb\u30c9\u3059\u308b\u3068\u3001test.ino.elf \u3068\u3044\u3046\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a1\u30a4\u30eb\u304c\u51fa\u6765\u4e0a\u304c\u3063\u3066\u3044\u308b\u3002\u3053\u308c\u3092 avr-nm \u306b\u304b\u3051\u308b\u3068\u304d\u306f\u3001\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u958b\u3044\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<pre class=\"nums:false lang:default decode:true\">avr-nm.exe -C -n -S test.ino.elf<\/pre>\n<p>\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u5404\u30d5\u30a1\u30a4\u30eb\u306b\u306f\u30d5\u30a9\u30eb\u30c0\u540d\u3092\u4e0e\u3048\u308b\u3053\u3068\u3002avr-nm\u306b\u4e0e\u3048\u3066\u3044\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u610f\u5473\u3092\u3082\u3064\u3002<\/p>\n<ul>\n<li>-C : \u30b7\u30f3\u30dc\u30eb\u540d\u3092\u5b9a\u7fa9\u3068\u540c\u69d8\u306b\u8aad\u307f\u3084\u3059\u304f\u51fa\u529b\u3059\u308b\u3002<\/li>\n<li>-n : \u30b7\u30f3\u30dc\u30eb\u306e\u30a2\u30c9\u30ec\u30b9\u9806\u306b\u30bd\u30fc\u30c8\u3059\u308b\u3002<\/li>\n<li>-S : \u30b7\u30f3\u30dc\u30eb\u304c\u30b5\u30a4\u30ba\u3092\u3082\u3064\u5834\u5408\u3001\u30b5\u30a4\u30ba\u3092\u51fa\u529b\u3002<\/li>\n<\/ul>\n<p>\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u3075\u3064\u3046\u306b\u5b9f\u884c\u3059\u308b\u3068\u9577\u3005\u3068\u30ea\u30b9\u30c8\u304c\u8868\u793a\u3055\u308c\u3066\u8aad\u307f\u306b\u304f\u3044\u306e\u3067\u3001\u51fa\u529b\u3092\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u3066\u66f8\u304d\u51fa\u3059\u306a\u308a\u3057\u305f\u65b9\u304c\u8aad\u307f\u3084\u3059\u3044\u3002<\/p>\n<p>\u7701\u7565\u3092\u6df7\u3058\u3048\u306a\u304c\u3089\u51fa\u529b\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true\">         w serialEventRun()\r\n00000000 W __heap_end\r\n00000000 a __tmp_reg__\r\n....\r\n00000068 T __trampolines_end\r\n00000068 T __trampolines_start\r\n00000068 00000500 t font\r\n00000400 A __LOCK_REGION_LENGTH__\r\n....\r\n0000060e 0000004a t micros\r\n00000658 0000007e t Adafruit_ILI9341::fillRect(int, int, int, int, unsigned int)\r\n000006d6 00000076 T Adafruit_ILI9341::drawFastHLine(int, int, int, unsigned int)\r\n....\r\n00002a4a T _exit\r\n00002a4a W exit\r\n00002a4c t __stop_program\r\n00002a4e A __data_load_start\r\n00002a4e T _etext\r\n00002a84 A __data_load_end\r\n....\r\n00800100 D __data_start\r\n00800100 0000002c d vtable for Adafruit_ILI9341\r\n00800136 B __bss_start\r\n00800136 D __data_end\r\n....\r\n0080013f 00000033 B tft\r\n00800172 00000001 b SPIClass::initialized\r\n00800173 B __bss_end\r\n00800173 N _end\r\n00810000 N __eeprom_end\r\n<\/pre>\n<p>\u5404\u884c\u306f\u3001<strong>\u30a2\u30c9\u30ec\u30b9\u3000[\u30b5\u30a4\u30ba]\u3000\u30bf\u30a4\u30d7\u3000\u30b7\u30f3\u30dc\u30eb\u00a0<\/strong>\u306e\u9806\u306b\u4e26\u3093\u3067\u3044\u308b\u3002\u30bf\u30a4\u30d7T\u304a\u3088\u3073t\u304c\u30c6\u30ad\u30b9\u30c8(\u30d7\u30ed\u30b0\u30e9\u30e0\u30b3\u30fc\u30c9)\u9818\u57df\u3001D\u304a\u3088\u3073d\u304c\u521d\u671f\u5024\u3092\u5b9a\u7fa9\u6e08\u307f\u306e\u30c7\u30fc\u30bf\u3001B\u304a\u3088\u3073b\u304c\u672a\u521d\u671f\u5316\u306e\u30c7\u30fc\u30bf\u3092\u8868\u3057\u3066\u3044\u308b(\u5927\u6587\u5b57\u304cextern\u306a\u5916\u90e8\u53c2\u7167\u53ef\u80fd\u30b7\u30f3\u30dc\u30eb\u3001\u5c0f\u6587\u5b57\u304cstatic\u306a\u5916\u90e8\u53c2\u7167\u7121\u3057\u306e\u30b7\u30f3\u30dc\u30eb\u306e\u3088\u3046\u3067\u3042\u308b)\u3002A,N,W\u306a\u3069\u306b\u3064\u3044\u3066\u306f\u3001avr-nm\u306eman\u3092\u53c2\u7167\u306e\u3053\u3068\u3002<\/p>\n<h3>\u30c6\u30ad\u30b9\u30c8\u9818\u57df<\/h3>\n<p>\u5148\u982d\u306e0x00000000\u304b\u3089\u30c6\u30ad\u30b9\u30c8\u9818\u57df(\u30d7\u30ed\u30b0\u30e9\u30e0\u9818\u57df)\u304c\u958b\u59cb\u3057\u3066\u304a\u308a\u3001\u3053\u306e\u9818\u57df\u306e\u30c7\u30fc\u30bf(\u30b3\u30fc\u30c9)\u306f\u30d5\u30e9\u30c3\u30b7\u30e5\u30e1\u30e2\u30ea\u306b\u683c\u7d0d\u3055\u308c\u308b\u3002<\/p>\n<p>\u6ce8\u76ee\u3059\u3079\u304d\u306f7\u884c\u76ee\u306e <span class=\"lang:default decode:true crayon-inline\">00000068 00000500 t font<\/span>\u00a0 \u3068\u3044\u3046\u884c\u3067\u3001\u30c6\u30ad\u30b9\u30c8\u9818\u57df\u306e0x0068\u304b\u30890x500\u30d0\u30a4\u30c8\u306b\u308f\u305f\u3063\u3066 font \u3068\u3044\u3046\u540d\u524d\u306e\u30c7\u30fc\u30bf\u304c\u5360\u3081\u3066\u3044\u308b\u3002glcdfont.c \u306b\u5ba3\u8a00\u3055\u308c\u305f\u30d5\u30a9\u30f3\u30c8\u30c7\u30fc\u30bf\u304cPROGMEM\u6307\u5b9a\u306b\u3088\u3063\u3066\u30c6\u30ad\u30b9\u30c8\u9818\u57df\u306b\u914d\u7f6e\u3055\u308c\u305f\u3053\u3068\u3092\u793a\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u3053\u306e\u30b7\u30f3\u30dc\u30eb\u30ea\u30b9\u30c8\u304b\u3089\u898b\u308b\u3068\u3001__data_load_end\u306e0x00002a84 \u307e\u3067\u304c\u30c6\u30ad\u30b9\u30c8\u9818\u57df\u306e\u3088\u3046\u3067\u3001\u5341\u9032\u6570\u306b\u76f4\u3059\u3068 10884\u3068\u306a\u308b\u3002Arduino IDE\u304c\u8868\u793a\u3057\u305f\u300c<span style=\"text-decoration: underline;\">\u30b9\u30b1\u30c3\u30c1\u304c10884\u30d0\u30a4\u30c8\uff0835%\uff09\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/span>\u300d\u3068\u4e00\u81f4\u3057\u3066\u3044\u308b\u3002<\/p>\n<h3>\u30c7\u30fc\u30bf\u9818\u57df<\/h3>\n<p>__data_start\u306e0x800100\u304b\u30892K\u30d0\u30a4\u30c8\u306eRAM\u306e\u7d42\u7aef(0x008008ff)\u307e\u3067\u304c \u30de\u30a4\u30b3\u30f3\u5185\u306eSRAM\u9818\u57df\u3068\u306a\u3063\u3066\u3044\u308b\u3002\u30c4\u30fc\u30eb\u306e\u4fbf\u5b9c\u4e0a\uff1f 0x00800000\u304b\u3089\u30a2\u30c9\u30ec\u30b9\u304c\u3075\u3089\u308c\u3066\u3044\u308b\u304c\u3001\u30de\u30a4\u30b3\u30f3\u5185\u90e8\u306e\u30c7\u30fc\u30bf\u9818\u57df\u306f0x0000\u756a\u5730\u304b\u3089\u958b\u59cb\u3059\u308b(\u30d7\u30ed\u30b0\u30e9\u30e0\u9818\u57df\u3068\u30c7\u30fc\u30bf\u9818\u57df\u306e\u30a2\u30c9\u30ec\u30b9\u7a7a\u9593\u306f\u72ec\u7acb\u3057\u3066\u3044\u308b)\u3002<br \/>\n\u30b9\u30b1\u30c3\u30c1\u3084\u30e9\u30a4\u30d6\u30e9\u30ea\u5185\u306e\u901a\u5e38\u306e\u30c7\u30fc\u30bf\u306f\u3053\u306e\u9818\u57df\u306b\u914d\u7f6e\u3055\u308c\u308b\u3002__data_start\u304b\u3089__bss_end\u306e\u9593\u306bAdafruit_ILI9341\u30af\u30e9\u30b9\u306evtable\u3084\u30b9\u30b1\u30c3\u30c1\u3067\u5ba3\u8a00\u3057\u305ftft\u3068\u3044\u3063\u305f\u5909\u6570\u304c\u5165\u3063\u3066\u3044\u308b\u306e\u304c\u898b\u3048\u308b\u3002__bss_end\u4ee5\u964dSRAM\u306e\u304a\u3057\u307e\u3044\u307e\u3067\u304c\u3001\u30d2\u30fc\u30d7\u9818\u57df\u3084\u30b9\u30bf\u30c3\u30af\u9818\u57df\u3068\u3057\u3066\u4f7f\u308f\u308c\u308b\u3002<\/p>\n<p>\u306a\u304a\u30010x0000\u304b\u30890x0100\u307e\u3067\u306e256\u30d0\u30a4\u30c8\u306e\u30a2\u30c9\u30ec\u30b9\u9818\u57df\u306f\u3001\u30de\u30a4\u30b3\u30f3\u306e\u5404\u7a2e\u30ec\u30b8\u30b9\u30bf\u3068\u3066\u4f7f\u308f\u308c\u3066\u304a\u308a\u3001\u30c7\u30fc\u30bf\u306f\u914d\u7f6e\u3055\u308c\u306a\u3044\u3002<\/p>\n<p>__data_start\u304b\u3089__bss_end\u307e\u3067\u306e\u5927\u304d\u3055\u306f115\u30d0\u30a4\u30c8\u306a\u306e\u3067\u3001\u3053\u308c\u3082\u300c<span style=\"text-decoration: underline;\">\u6700\u59272048\u30d0\u30a4\u30c8\u306eRAM\u306e\u3046\u3061\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u304c115\u30d0\u30a4\u30c8\uff085%\uff09\u3092\u4f7f\u3063\u3066\u3044\u3066<\/span>\u3001\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u30671933\u30d0\u30a4\u30c8\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u300d\u306b\u4e00\u81f4\u3057\u3066\u3044\u308b\u3002\u3053\u3053\u3067\u3044\u3046\u300c\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u300d\u306b\u306f\u3001\u5b9f\u884c\u5236\u5fa1\u306b\u5fc5\u8981\u306a\u30b9\u30bf\u30c3\u30af\u9818\u57df\u3001\u30b9\u30bf\u30c3\u30af\u9818\u57df\u306b\u78ba\u4fdd\u3055\u308c\u308b\u30c7\u30fc\u30bf\u3001malloc() \u3084 strdup() \u3092\u4f7f\u3063\u3066\u30d2\u30fc\u30d7\u9818\u57df\u306b\u78ba\u4fdd\u3059\u308b\u30c7\u30fc\u30bf\u306a\u3069\u304c\u542b\u307e\u308c\u308b\u304b\u3089\u3001Arduino\u304c\u3044\u3044\u3068\u8a00\u3063\u3066\u3082\u7528\u5fc3\u6df1\u304f\u4f7f\u3063\u305f\u65b9\u304c\u3088\u3044\u3060\u308d\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 TFT\u6db2\u6676\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u30ea\u30e2\u30b3\u30f3\u306e\u64cd\u4f5c\u30d1\u30cd\u30eb\u3092\u63cf\u753b\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u56f3\u5f62\u306e\u307b\u304b\u306b\u30d5\u30a9\u30f3\u30c8\u3082\u63cf\u753b\u3057\u3066\u3084\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002Adafruit_GFX\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u306f\u3001\u30b5\u30f3\u30d7\u30eb\u3068\u3057\u3066\u3044\u304f\u3064\u304b\u306e\u30d5\u30a9\u30f3\u30c8\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u304c\u3001\u4eca\u56de\u306f\u4f59\u8a08\u306a\u3053 &hellip; <a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=6601\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">Adafruit_GFX\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30d5\u30a9\u30f3\u30c8(glcdfont)\u306b\u3064\u3044\u3066<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[69],"tags":[65,86],"class_list":["post-6601","post","type-post","status-publish","format-standard","hentry","category-programming","tag-arduino","tag-remocon"],"_links":{"self":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6601","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6601"}],"version-history":[{"count":0,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6601\/revisions"}],"wp:attachment":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}