{"id":1261,"date":"2015-09-25T04:39:37","date_gmt":"2015-09-24T19:39:37","guid":{"rendered":"https:\/\/hack.gpl.jp\/?p=1261"},"modified":"2015-09-25T04:39:37","modified_gmt":"2015-09-24T19:39:37","slug":"post-1261","status":"publish","type":"post","link":"https:\/\/hack.gpl.jp\/2015\/09\/25\/post-1261.html","title":{"rendered":"espeink make \u305d\u306e\uff13"},"content":{"rendered":"

\u3055\u3066\u3001\u305d\u306e\u5f8cesptool \u3063\u3066\u3044\u3046\u306e\u3092\u8abf\u67fb\u3057\u307e\u3057\u305f\u3002 <\/p>\n

Makefile \u306b\u306f\u3001-eo \u3084\u30012\u756a\u76ee\u306e\u5f15\u6570\u306e\u5909\u6570\u306b\u5c55\u958b\u3055\u308c\u308b \u2013bo \u3084 \u2013bs \u306a\u3069\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n

---- Makefile\n::\n# we create two different files for uploading into the flash\n# these are the names and options to generate them\nFW_FILE_1    = 0x00000\nFW_FILE_1_ARGS    = -bo $@ -bs .text -bs .data -bs .rodata -bc -ec\nFW_FILE_2    = 0x40000\nFW_FILE_2_ARGS    = -es .irom0.text $@ -ec\n::\n$(FW_FILE_1): $(TARGET_OUT) firmware\n    $(vecho) "FW $@"\n    $(Q) $(ESPTOOL) -eo $(TARGET_OUT) $(FW_FILE_1_ARGS)\u2605\n::<\/pre>\n

 <\/p>\n

python \u306e esptool.py \u306e\u5f15\u6570\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u308b\u3068 <\/p>\n

\n

https:\/\/github.com\/themadinventor\/esptool\/blob\/master\/esptool.py<\/a><\/p>\n<\/blockquote>\n

\u305d\u3093\u306a\u5f15\u6570\u306f\u306a\u3044\u306e\u3067\u3001\u304a\u304b\u3057\u3044\u3088\u306a\u3041\u3068\u601d\u3044\u518d\u5ea6\u30b0\u30b0\u308b\u3068\u3001esptool-ck \u3068\u3044\u3046 C \u3067\u66f8\u304b\u308c\u305f\u30d8\u30eb\u30d1\u30fc\u30c4\u30fc\u30eb\u304c\u3042\u308b\u3058\u3083\u3042\u308a\u307e\u305b\u3093\u304b\uff1f esptool \u3068\u3044\u3046\u540d\u524d\u306f\u540c\u3058\u306a\u306e\u3067\u3001\u3066\u3063\u304d\u308apython \u306e\u30c4\u30fc\u30eb\u306e\u3053\u3068\u3060\u3068\u601d\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n

\n

https:\/\/github.com\/igrr\/esptool-ck<\/a><\/p>\n<\/blockquote>\n

\u3042\u3001\u3053\u308c\u3067\u3059\u306d\u3001\u304d\u3063\u3068\u3002\u5165\u308c\u3066\u307f\u308b\u3053\u3068\u306b\u3002<\/p>\n

\u25bcesptool-ck<\/p>\n

\u30fb\u4ee5\u4e0b\u3088\u308adownload <\/p>\n

\n

https:\/\/github.com\/igrr\/esptool-ck\/releases<\/a><\/p>\n<\/blockquote>\n

 <\/p>\n

osx \u306a\u306e\u3067\u3001\u30dc\u30ea\u30e5\u30fc\u30e0\u3092\u30de\u30a6\u30f3\u30c8\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n

$ sudo hdiutil mount ~\/Documents\/case-sensitive.dmg\n$ cd \/Volumes\/case-sensitive<\/pre>\n

\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u65b0\u3057\u3044\u306e\u3092\u307e\u305a\u8a66\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n

$ wget https:\/\/github.com\/igrr\/esptool-ck\/archive\/0.4.6.tar.gz\n$ tar xvfz 0.4.6.tar.gz \n$ mv esptool-ck-0.4.6\/ esptool-ck\n$ cd esptool-ck<\/pre>\n

 <\/p>\n

gcc \u306f\u5165\u3063\u3066\u3044\u308b\u306e\u3067\u3001make \u3057\u5b9f\u884c\u6a29\u9650\u3092\u3064\u3051\u307e\u3059\u3002<\/p>\n

$make\n$ chmod +x esptool<\/pre>\n

 <\/p>\n

\u30fb\/opt\/\u914d\u4e0b\u306b\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\u5f35\u3063\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n

$ sudo ln -s \/Volumes\/case-sensitive\/esp-open-sdk\/ \/opt\/Espressif<\/pre>\n

\u30fb\u30d1\u30b9\u3092\u53cd\u6620<\/p>\n

$ export PATH=\/opt\/Espressif\/xtensa-lx106-elf\/bin:\/opt\/Espressif\/esptool-ck:$PATH\n$ echo 'export PATH=\/opt\/Espressif\/xtensa-lx106-elf\/bin:\/opt\/Espressif\/esptool-ck:$PATH' >> ~\/.bashrc<\/pre>\n

\u30fb\u547c\u3073\u51fa\u305b\u308c\u3070OK<\/p>\n

$ which esptool\n\/opt\/Espressif\/esptool-ck\/esptool<\/pre>\n

\u2605espeink \u306e\u30bd\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3078<\/p>\n

sed -i 's\/opt\\\/Espressif\\\/crosstool-NG\\\/builds\\\/xtensa-lx106-elf\\\/bin\/opt\\\/Espressif\\\/xtensa-lx106-elf\\\/bin\/g' Makefile\nsed -i 's\/\\\/opt\\\/Espressif\\\/ESP8266_SDK\/\\\/opt\\\/Espressif\\\/sdk\\\/\/g' Makefile\nsed -i 's\/\\\/opt\\\/Espressif\\\/include\/\\\/opt\\\/Espressif\\\/sdk\\\/include\/g' Makefile\nsed -i 's\/\\\/opt\\\/Espressif\\\/arch\\\/lib\/\\\/opt\\\/Espressif\\\/sdk\\\/lib\/g' Makefile\nsed -i 's\/ttyUSB0\/cu.SLAB_USBtoUART\/g' Makefile<\/pre>\n

 <\/p>\n

\u3055\u3066\u3001make \u3055\u308c\u3066\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u3082\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n

$ make\nCC user\/cgiwifi.c\nCC user\/config.c\nCC user\/eink.c\nCC user\/espfs.c\nCC user\/heatshrink_decoder.c\nCC user\/httpd.c\nCC user\/httpdclient.c\nCC user\/httpdespfs.c\nCC user\/io.c\nCC user\/stdout.c\nCC user\/user_main.c\nAR build\/einkdisp_app.a\nLD build\/einkdisp.out\nFW firmware\/0x00000.bin\nFW firmware\/0x40000.bin<\/pre>\n

 <\/p>\n

\u3042\u3063\u3055\u308a\u884c\u3051\u307e\u3057\u305f\u306d\u3002\u3067\u3082\u3001\u30b5\u30a4\u30ba\u304c\u5c0f\u3055\u3044\u3088\u3046\u306a\u6c17\u304c\u3057\u307e\u3059\u3002<\/p>\n

$ ls -al build\/ firmware\/\nbuild\/:\ntotal 1464\ndrwxr-xr-x   6 junkhack  staff     204  9 25 02:03 .\ndrwxr-xr-x  16 junkhack  staff     544  9 25 02:03 ..\ndrwxr-xr-x   2 junkhack  staff      68  9 25 02:03 driver\n-rwxr-xr-x   1 junkhack  staff  514717  9 25 02:03 einkdisp.out\n-rw-r--r--   1 junkhack  staff  231744  9 25 02:03 einkdisp_app.a\ndrwxr-xr-x  13 junkhack  staff     442  9 25 02:03 user\n\nfirmware\/:\ntotal 408\ndrwxr-xr-x   4 junkhack  staff     136  9 25 02:03 .\ndrwxr-xr-x  16 junkhack  staff     544  9 25 02:03 ..\n-rw-r--r--   1 junkhack  staff   37632  9 25 02:03 0x00000.bin\n-rw-r--r--   1 junkhack  staff  166264  9 25 02:03 0x40000.bin<\/pre>\n

 <\/p>\n

500k \u304f\u3089\u3044\u3042\u308beinkdisp.out \u304c\u30d5\u30a1\u30fc\u30e0\u306b\u5165\u3063\u3066\u3044\u306a\u3044\u3088\u3046\u306a\u6c17\u304c\u3057\u307e\u3059\u3002\u30e6\u30fc\u30b6\u9818\u57df\u3058\u3083\u306a\u3044\u306e\u3067\u3057\u3087\u3046\u304b\u306d\u3002\u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u306f\u3042\u307e\u308a\u898b\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u3053\u308c\u3092\u3069\u306e\u3088\u3046\u306b\u66f8\u304d\u8fbc\u3081\u3070\u3044\u3044\u304b\u306f\u307e\u3060\u4e0d\u660e\u3067\u3059\u3002<\/p>\n

 <\/p>\n

\u304c\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u306f\u30a8\u30e9\u30fc\u306a\u304f\u901a\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n

SDK \u306f\u30011.0.1 \u3067\u3068\u308a\u3042\u3048\u305a\u3084\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n

$ cd \/opt\/Espressif\/\nHOPE:Espressif junkhack$ ll\ntotal 128\n-rw-r--r--   1 junkhack  staff  11263  9 22 22:52 Makefile\n-rw-r--r--   1 junkhack  staff   5725  9 22 22:52 README.md\n-rw-r--r--   1 junkhack  staff   1101  9 22 22:52 c_types-c99.patch\ndrwxr-xr-x  18 junkhack  staff   1462  9 22 23:24 crosstool-NG\n-rw-r--r--   1 junkhack  staff    199  9 22 22:52 crosstool-config-overrides\n-rw-r--r--   1 junkhack  staff    146  9 22 22:52 empty_user_rf_pre_init.c\ndrwxr-xr-x@ 10 junkhack  staff    442  9 23 22:34 esp_iot_sdk_v0.9.5\ndrwxr-xr-x@ 10 junkhack  staff    374  4 24 17:08 esp_iot_sdk_v1.0.1\ndrwxr-xr-x@ 10 junkhack  staff    408  9 23 14:43 esp_iot_sdk_v1.1.1\ndrwxr-xr-x@ 10 junkhack  staff    374  6 12 20:49 esp_iot_sdk_v1.1.2\ndrwxr-xr-x  10 junkhack  staff    442  9 23 00:24 esp_iot_sdk_v1.3.0\ndrwxr-xr-x@ 10 junkhack  staff    374  9 18 21:55 esp_iot_sdk_v1.4.0\ndrwxr-xr-x   2 junkhack  staff    272  9 22 22:56 esptool\ndrwxr-xr-x   9 junkhack  staff    646  9 24 19:58 esptool-ck\ndrwxr-xr-x   9 junkhack  staff    510  9 24 19:44 esptool-ck_git\ndrwxr-xr-x   2 junkhack  staff    170  9 22 22:52 examples\ndrwxr-xr-x   6 junkhack  staff    612  9 23 00:25 lx106-hal\n-rw-r--r--   1 junkhack  staff  24726  8  8 16:20 release_note.txt\nlrwxr-xr-x   1 junkhack  staff     18  9 23 23:53 sdk -> esp_iot_sdk_v1.0.1\ndrwxr-xr-x   8 junkhack  staff    306  9 23 00:21 xtensa-lx106-elf<\/pre>\n

 <\/p>\n

Makefile \u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3082\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u66f8\u304d\u8fbc\u307f\u3067\u304d\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n

::\nflash: $(FW_FILE_1) $(FW_FILE_2)\n    $(Q) $(ESPTOOL) -cp $(ESPPORT) -cb $(ESPBAUD) -ca 0x00000 -cf firmware\/0x00000.bin -v\n    $(Q) [ $(ESPDELAY) -ne 0 ] && echo "Please put the ESP in bootloader mode..." || true\n    $(Q) sleep $(ESPDELAY) || true\n    $(Q) $(ESPTOOL) -cp $(ESPPORT) -cb $(ESPBAUD) -ca 0x40000 -cf firmware\/0x40000.bin -v\n\n::\n\n\nwebpages.espfs: html\/ mkespfsimage\/mkespfsimage\n    cd html; find | ..\/mkespfsimage\/mkespfsimage > ..\/webpages.espfs; cd ..\n\nmkespfsimage\/mkespfsimage: mkespfsimage\/\n    make -C mkespfsimage\n\nhtmlflash: webpages.espfs\n    if [ $$(stat -c '%s' webpages.espfs) -gt $$(( 0x2E000 )) ]; then echo "webpages.espfs too big!"; false; fi\n    $(ESPTOOL) -cp $(ESPPORT) -cb $(ESPBAUD) -ca 0x12000 -cf webpages.espfs -v\n::<\/pre>\n

\u571f\u65e5\u306besp \u306b\u66f8\u304d\u8fbc\u3093\u3067\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n

 <\/p>\n

esp12 \u3092\u3064\u306a\u3052\u3066\u3044\u306a\u3044\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n

HOPE:espeink junkhack$ make webpages.espfs\ncd html; find | ..\/mkespfsimage\/mkespfsimage > ..\/webpages.espfs; cd ..\n\/bin\/sh: ..\/mkespfsimage\/mkespfsimage: cannot execute binary file\nusage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]\n       find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]\nHOPE:espeink junkhack$ \n\nHOPE:espeink junkhack$ make mkespfsimage\/mkespfsimage\nmake: `mkespfsimage\/mkespfsimage' is up to date.\nHOPE:espeink junkhack$ \n\nHOPE:espeink junkhack$ make htmlflash\nif [ $(stat -c '%s' webpages.espfs) -gt $(( 0x2E000 )) ]; then echo "webpages.espfs too big!"; false; fi\nstat: illegal option -- c\nusage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]\n\/bin\/sh: line 0: [: -gt: unary operator expected\nesptool -cp \/dev\/cu.SLAB_USBtoUART -cb 115200 -ca 0x12000 -cf webpages.espfs -v\nesptool vb64eebd - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>\nopening port \/dev\/cu.SLAB_USBtoUART at 115200\nopening bootloader\nresetting board\ntrying to connect\ntrying to connect\ntrying to connect\nresetting board\ntrying to connect\ntrying to connect\ntrying to connect\nresetting board\ntrying to connect\ntrying to connect\ntrying to connect\nwarning: espcomm_sync failed\nerror: espcomm_open failed\nmake: *** [htmlflash] Error 255\nHOPE:espeink junkhack$ \n\nHOPE:espeink junkhack$ make flash\nesptool vb64eebd - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>\nopening port \/dev\/cu.SLAB_USBtoUART at 115200\nopening bootloader\nresetting board\ntrying to connect\ntrying to connect\ntrying to connect\nresetting board\ntrying to connect\ntrying to connect\ntrying to connect\nresetting board\ntrying to connect\ntrying to connect\ntrying to connect\nwarning: espcomm_sync failed\nerror: espcomm_open failed\nmake: *** [flash] Error 255\nHOPE:espeink junkhack$ <\/pre>\n

\u25bc\u307e\u3068\u3081<\/p>\n

\u30fbesptool \u306f python \u306e\u3058\u3083\u306a\u304f\u3066\u3001C \u88fd\u306e esptool-ck \u3068\u3044\u3046\u306e\u3092\u4f7f\u3046<\/p>\n

\u30fbesptool-ck \u306b\u306f\u3044\u308d\u3044\u308d\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3042\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n

\u30fb\u914d\u7dda\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u3001resetmethod=wifio \u306a\u3069\u3068\u3059\u308c\u3070\u3001UART \u306e RTS and DTR\u3092\u4f7f\u3063\u3066\u30d6\u30fc\u30c8\u30e2\u30fc\u30c9\u306b\u3057\u305f\u308a\u3067\u304d\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n

https:\/\/github.com\/esp8266\/Arduino\/issues\/22<\/a><\/p>\n

\u30fb\u3067\u304d\u305f\uff12\u3064\u306e\u30d5\u30a1\u30fc\u30e0\u306f\u30b5\u30a4\u30ba\u304c\u5c0f\u3055\u3044\u3088\u3046\u3060\u304c\uff1f<\/p>\n

\u30fbmake \u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u66f8\u304d\u8fbc\u307f\u3084\u3001\u305d\u306e\u4ed6\u306e\u4f55\u304b\u4f5c\u696d\u3059\u308b\u3082\u306e\u304c\u3042\u308b<\/p>\n","protected":false},"excerpt":{"rendered":"

\u3055\u3066\u3001\u305d\u306e\u5f8cesptool \u3063\u3066\u3044\u3046\u306e\u3092\u8abf\u67fb\u3057\u307e\u3057\u305f\u3002 Makefile \u306b\u306f\u3001-eo \u3084\u30012\u756a\u76ee\u306e\u5f15\u6570\u306e\u5909\u6570\u306b\u5c55\u958b\u3055\u308c\u308b \u2013bo \u3084 \u2013bs \u306a\u3069\u304c\u3042\u308a\u307e\u3059\u3002 —- Makefile :: # we create […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","footnotes":""},"categories":[30,31,71],"tags":[],"acf":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false},"uagb_author_info":{"display_name":"JunkHack","author_link":"https:\/\/hack.gpl.jp\/author\/junkhack\/"},"uagb_comment_info":0,"uagb_excerpt":"\u3055\u3066\u3001\u305d\u306e\u5f8cesptool \u3063\u3066\u3044\u3046\u306e\u3092\u8abf\u67fb\u3057\u307e\u3057\u305f\u3002 Makefile \u306b\u306f\u3001-eo \u3084\u30012\u756a\u76ee\u306e\u5f15\u6570\u306e\u5909\u6570…","_links":{"self":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts\/1261"}],"collection":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/comments?post=1261"}],"version-history":[{"count":0,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts\/1261\/revisions"}],"wp:attachment":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/media?parent=1261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/categories?post=1261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/tags?post=1261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}