{"id":1256,"date":"2015-09-24T02:19:22","date_gmt":"2015-09-23T17:19:22","guid":{"rendered":"https:\/\/hack.gpl.jp\/?p=1256"},"modified":"2015-09-24T02:19:22","modified_gmt":"2015-09-23T17:19:22","slug":"post-1256","status":"publish","type":"post","link":"https:\/\/hack.gpl.jp\/2015\/09\/24\/post-1256.html","title":{"rendered":"espeink make \u305d\u306e2"},"content":{"rendered":"

\u4f5c\u8005\u306b\u30d8\u30eb\u30d7\u8981\u8acb\u3092\u51fa\u3057\u3066\u304a\u304d\u307e\u3057\u305f\u3002\u4f5c\u8005\u304b\u3089\u30ec\u30b9\u30dd\u30f3\u30b9\u304c\u3042\u308b\u307e\u3067\u3001\u81ea\u5206\u306a\u308a\u306b\u3082\u3046\u5c11\u3057\u8abf\u3079\u307f\u307e\u3059\u3002<\/p>\n

\u305d\u306e\u5f8c\u3001\u518d\u8abf\u67fb\u3067SDK 1.3.0\u3092\u4f7f\u3046\u3068\u3001
unknown type name ‘uint16_t’
\u304c\u51fa\u308b\u3088\u3046\u3067\u3059\u3002\u4ee5\u4e0b\u306b\u60c5\u5831\u304c\u3002<\/p>\n

\n

https:\/\/github.com\/pfalcon\/esp-open-sdk\/issues\/90<\/a><\/p>\n

\u3053\u308c\u306f\u3001\u518d\u5ea6\u6307\u5b9a\u3059\u308c\u3070\u56de\u907f\u3067\u304d\u305d\u3046\u3067\u3059\u3002
#include <stdint.h><\/p>\n<\/blockquote>\n

\u307e\u3041\u3001\u3067\u3082\u3053\u3093\u306a\u3053\u3068\u306f\u4f5c\u8005\u306f\u3084\u3063\u3066\u3044\u306a\u3044\u308f\u3051\u3067\u3001\u3068\u3044\u3046\u3053\u3068\u306f\u3001\u3082\u3063\u3068\u53e4\u3044sdk\u3067\u3084\u3063\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u3060\u3068\u601d\u3046\u306e\u3067\u4ee3\u3048\u3066\u307f\u307e\u3059\u3002esp_iot_sdk_v1.1.1 \u3067 \u3068\u308a\u3042\u3048\u305a\u30c1\u30e3\u30ec\u30f3\u30b8\u3002<\/p>\n

\n

$ rm sdk
$ ln -s esp_iot_sdk_v1.1.1 sdk <\/p>\n<\/blockquote>\n

\u30fbunknown type name \u306f\u51fa\u306a\u304f\u306a\u308b\u304c\u3001conflicting types \u304c\u51fa\u308b\u3002<\/p>\n

    $ make\n    CC user\/cgiwifi.c\n    In file included from user\/cgiwifi.c:20:0:\n    include\/espmissingincludes.h:42:5: error: conflicting types for 'os_random'\n     int os_random();\n         ^\n    In file included from user\/cgiwifi.c:15:0:\n    \/Volumes\/case-sensitive\/esp-open-sdk\/sdk\/include\/osapi.h:45:15: note: previous declaration of 'os_random' was here\n     unsigned long os_random(void);\n                   ^\n    make: *** [build\/user\/cgiwifi.o] Error 1<\/pre>\n

 <\/p>\n

\u30fb\u3061\u3087\u3063\u3068\u72b6\u6cc1\u306f\u9055\u3046\u304b\u3082\u3067\u3059\u304c\u3001\u4ee5\u4e0b\u306b\u60c5\u5831\u304c\u3002<\/p>\n

\n

\n
http:\/\/www.esp8266.com\/viewtopic.php?p=18868<\/a><\/p>\n

\u304a\u305d\u3089\u304f\u4f5c\u8005\u304b\u3089\u306e\u30b3\u30e1\u30f3\u30c8\u3067\u3001include\/espmissingincludes.h \u306eos_random\u3092\u53d6\u3063\u3066\u3057\u307e\u3048\u3070\uff1f\u3068\u3002
\n
\u306f\u3044\u3001\u3068\u308a\u307e\u3057\u305f\u3002<\/p>\n<\/blockquote>\n

---- espmissingincludes.h\n::\nuint32 system_get_time();\n\/\/int os_random();\nint rand(void);\n::<\/pre>\n

 <\/p>\n

\u30fb\u3059\u308b\u3068\u3001user\/cgiwifi.c \u306f\u901a\u308a\u3001\u6b21\u306a\u308b\u30a8\u30e9\u30fc\u304c\u3002\u30d7\u30ed\u30c8\u30bf\u30a4\u30d7\u5ba3\u8a00\u304c\u306a\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n

    $ make\n    CC user\/cgiwifi.c\n    CC user\/config.c\n    CC user\/eink.c\n    user\/eink.c: In function 'einkTimerCb':\n    user\/eink.c:60:3: error: implicit declaration of function 'os_update_cpu_frequency' [-Werror=implicit-function-declaration]\n       os_update_cpu_frequency(160);\n       ^\n    cc1: all warnings being treated as errors\n    make: *** [build\/user\/eink.o] Error 1<\/pre>\n

 <\/p>\n

 <\/p>\n

einkTimerCb\u95a2\u6570\u306e\u4e2d\u304b\u3089\u547c\u3070\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002
\n
\u3053\u3044\u3064\u306f\u3001\u30bd\u30fc\u30b9\u5168\u4f53\u3092grep \u3057\u3066\u3082\u51fa\u306a\u3044\u306e\u3067\u3001sdk \u306e\u7d44\u307f\u8fbc\u307f\u95a2\u6570\u306e\u3088\u3046\u3067\u3059\u3002\u306a\u3093\u3068\u5ba3\u8a00\u3059\u308c\u3070\u3088\u3044\u306e\u3067\u3057\u3087\u3046\u304b\u306d\uff1f <\/p>\n

\u4ee5\u4e0b\u306e\u30ea\u30ea\u30fc\u30b9\u30ce\u30fc\u30c8\u306b\u3088\u308b\u3068\u3001esp_iot_sdk_v1.1.0_15_05_26 \u3067\u306a\u304f\u306a\u3063\u305f\u3088\u3046\u3067\u3059\uff01
\n
http:\/\/www.esp8266.com\/viewtopic.php?p=18496<\/a><\/p>\n

\u305d\u306e\u524d\u306e\u3001esp_iot_sdk_v1.0.1\/include\/osapi.h \u306b\u306f\u3042\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n

\u3068\u3044\u3046\u3053\u3068\u306f\u3001\u4f5c\u8005\u306fesp_iot_sdk_v1.0.1\u3088\u308a\u524d\u306eSDK \u3092\u4f7f\u3063\u3066\u3044\u305f\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u306d\u3002 <\/p>\n

\u30bd\u30fc\u30b9\u4fee\u6b63\u306f\u3068\u308a\u3042\u3048\u305a\u3001\u5f8c\u56de\u3057\u3067\u3001\u4eca\u306f\u4f5c\u8005\u306e\u74b0\u5883\u3092\u63a8\u6e2c\u3057\u3001\u6700\u5f8c\u307e\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u304c\u901a\u308b\u74b0\u5883\u3092\u63a2\u308b\u306e\u304c\u512a\u5148\u3067\u3059\u3002 <\/p>\n

http:\/\/bbs.espressif.com\/viewforum.php?f=46<\/a><\/p>\n

\u306e\u4e00\u89a7\u304b\u3089\u3001esp_iot_sdk_v1.0.1_15_04_24 \u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n

\u30ea\u30ea\u30fc\u30b9\u65e5\u306f\u3001Fri Apr 24, 2015 10:49 pm \u3067\u3059\u3002<\/p>\n

http:\/\/bbs.espressif.com\/viewtopic.php?f=46&t=398<\/a><\/p>\n

\n

\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001\u89e3\u51cd\u3057\u3066\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\u5f35\u308a\u76f4\u3057\u307e\u3059\u3002
\n
$ rm sdk<\/p>\n

$ ln -s esp_iot_sdk_v1.0.1 sdk<\/p>\n<\/blockquote>\n

\u30fb\u518d\u5ea6make<\/p>\n

$ make clean\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\nmake: esptool: No such file or directory\nmake: *** [firmware\/0x00000.bin] Error 1<\/pre>\n

 <\/p>\n

\u30fb\u304a\u304a\u304a\u3001make \u306f\u901a\u3063\u305f\u3088\u3046\u3067\u3059\u3002esptool \u304c\u306a\u3044\u3068\u304b\u8a00\u3063\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n

\n

$ which esptool.py
\n
\/usr\/local\/bin\/esptool.py <\/p>\n<\/blockquote>\n

\u30fb\u3042\u308b\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u76f4\u3057\u307e\u3059\u3002<\/p>\n

---- Makefile\n::\n#Esptool.py path and port\nESPTOOL        ?= \/usr\/local\/bin\/esptool.py\n::<\/pre>\n

\u30fb\u3055\u3066\u3001\u518d\u5ea6\u6311\u6226\u3002<\/p>\n

$ make clean\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\nusage: esptool [-h] [--port PORT] [--baud BAUD]\n               \n               {load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,flash_id,read_flash,erase_flash}\n               ...\nesptool: error: argument operation: invalid choice: 'build\/einkdisp.out' (choose from 'load_ram', 'dump_mem', 'read_mem', 'write_mem', 'write_flash', 'run', 'image_info', 'make_image', 'elf2image', 'read_mac', 'flash_id', 'read_flash', 'erase_flash')\nmake: *** [firmware\/0x00000.bin] Error 2<\/pre>\n

 <\/p>\n

\u30fb\u3046\u3046\u3080\u3001esptool \u306e\u4f7f\u3044\u65b9\u304c\u9055\u3046\u3088\u3068\u51fa\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002
\n
makefile \u306b\u306f\u6b21\u306e\u3088\u3046\u306b\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n

---- Makefile\n::\n$(FW_FILE_1): $(TARGET_OUT) firmware\n    $(vecho) "FW $@"\n    $(Q) $(ESPTOOL) -eo $(TARGET_OUT) $(FW_FILE_1_ARGS)\n::<\/pre>\n

 <\/p>\n

\u4f7f\u3044\u65b9\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u3067\u3059\u3002
\n
-eo \u3068\u304b\u306a\u3093\u3067\u3057\u3087\u3046\u306d\uff1f \u8aac\u660e\u306b\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u3001\u3001<\/p>\n

 <\/p>\n

    $ esptool.py -h\n    usage: esptool [-h] [--port PORT] [--baud BAUD]\n                   \n                   {load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,flash_id,read_flash,erase_flash}\n                   ...\n    \n    ESP8266 ROM Bootloader Utility\n    \n    positional arguments:\n      {load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,flash_id,read_flash,erase_flash}\n                            Run esptool {command} -h for additional help\n        load_ram            Download an image to RAM and execute\n        dump_mem            Dump arbitrary memory to disk\n        read_mem            Read arbitrary memory location\n        write_mem           Read-modify-write to arbitrary memory location\n        write_flash         Write a binary blob to flash\n        run                 Run application code in flash\n        image_info          Dump headers from an application image\n        make_image          Create an application image from binary files\n        elf2image           Create an application image from ELF file\n        read_mac            Read MAC address from OTP ROM\n        flash_id            Read SPI flash manufacturer and device ID\n        read_flash          Read SPI flash content\n        erase_flash         Perform Chip Erase on SPI flash\n    \n    optional arguments:\n      -h, --help            show this help message and exit\n      --port PORT, -p PORT  Serial port device\n      --baud BAUD, -b BAUD  Serial port baud rate<\/pre>\n

 <\/p>\n

\u30fb\u5909\u6570\u306b\u306f\u4ee5\u4e0b\u304c\u5165\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u2605\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u3067\u3059\u3002<\/p>\n

\/usr\/local\/bin\/esptool.py -eo build\/einkdisp.out -bo $@ -bs .text -bs .data -bs .rodata -bc -ec<\/pre>\n

 <\/p>\n

\u3046\u30fc\u3093\u3001\u3088\u304f\u308f\u304b\u308a\u307e\u305b\u3093\u306d\u3002\u307e\u3041\u3001\u3068\u306b\u304b\u304fesptool.py\u306e\u4f7f\u3044\u65b9\u3068\u3044\u3046\u3053\u3068\u3092\u8abf\u67fb\u3059\u308c\u3070\u89e3\u6c7a\u3059\u308b\u304b\u3082\u3067\u3059\u3002
\n
esptool.py\u3063\u3066\u3044\u3046\u306e\u306f\u3001\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u3060\u3051\u306e\u3082\u306e\u3068\u601d\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u4ed6\u306b\u3082\u7528\u9014\u304c\u3042\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u304b\u306d\u3002<\/p>\n

 <\/p>\n

---- Makefile\n::\nBUILD_BASE    = build\n::\nESPTOOL        ?= \/usr\/local\/bin\/esptool.py\n::\n# name for the target project\nTARGET        = einkdisp\n::\nTARGET_OUT    := $(addprefix $(BUILD_BASE)\/,$(TARGET).out)\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

\u30fb\u4ee5\u4e0b\u306a\u611f\u3058\u306b\u3057\u3066\u307f\u308b\u3068\u3001\u4f5c\u3089\u308c\u307e\u3059\u304c\u3001\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u5c0f\u3055\u3044\u306e\u3067\u3001\u3084\u3063\u3071\u308a\u3060\u3081\u304b\u306a\uff1f<\/p>\n

---- Makefile\n::\n$(FW_BASE)\/%.bin: $(TARGET_OUT) | $(FW_BASE)\n    $(vecho) "FW $(FW_BASE)\/"\n    $(Q) $(ESPTOOL) elf2image -o $(FW_BASE)\/ $(TARGET_OUT)\n#    $(Q) $(ESPTOOL) -o $(TARGET_OUT) $(FW_FILE_1_ARGS)\n\n$(FW_FILE_2): $(TARGET_OUT) firmware\n    $(vecho) "FW $(FW_BASE)\/"\n    $(Q) $(ESPTOOL) -o $(TARGET_OUT) $(FW_FILE_2_ARGS)\n::<\/pre>\n

 <\/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\/\n\n$ ls -ltr firmware\/ build\/\nfirmware\/:\ntotal 408\n-rw-r--r--  1 junkhack  staff  166264  9 24 02:00 0x40000.bin\n-rw-r--r--  1 junkhack  staff   37632  9 24 02:00 0x00000.bin\n\nbuild\/:\ntotal 1464\ndrwxr-xr-x   2 junkhack  staff      68  9 23 02:05 driver\ndrwxr-xr-x  13 junkhack  staff     442  9 24 02:00 user\n-rw-r--r--   1 junkhack  staff  231984  9 24 02:00 einkdisp_app.a\n-rwxr-xr-x   1 junkhack  staff  514957  9 24 02:00 einkdisp.out<\/pre>\n

 <\/p>\n

\u3053\u306e\u3042\u305f\u308a\u3092\u8aad\u3093\u3067\u307f\u307e\u3059\u304b\u3002
\n
https:\/\/github.com\/themadinventor\/esptool<\/a><\/p>\n

\u3068\u308a\u3042\u3048\u305a\u3001\u672c\u65e5\u306f\u3053\u3053\u307e\u3067\u3002<\/p>\n

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

\u30fbsdk \u306f\u3001esp_iot_sdk_v1.0.1\u3088\u308a\u524d\u306e\u3092\u4f7f\u3063\u3066\u3044\u305f\u3088\u3046\u3067\u3059\u3002<\/p>\n

\u30fbesp_iot_sdk_v1.0.1_15_04_24 \u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u306f\u306a\u304f\u306a\u3063\u305f<\/p>\n

\u30fbesptool.py \u3067\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u3092\u4f5c\u308b\u3068\u3053\u308d\u304c\u3046\u307e\u304f\u3044\u304b\u306a\u3044<\/p>\n

\u30fblinux \u7248\u306eesptool.py \u3068\u304b\u3060\u3068\u3001\u3042\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u6307\u5b9a\u304c\u901a\u308b\u306e\u304b\uff1f<\/p>\n

\u30fb\u5b9f\u884c\u30d5\u30a1\u30a4\u30ebeinkdisp.out\u306f\u3001\u4f5c\u6210\u3067\u304d\u3066\u3044\u308b\u6a21\u69d8<\/p>\n

\u30fb\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u306e\u3069\u306e\u9818\u57df\u306b\u3069\u3046\u3084\u3063\u3066\u4f5c\u6210\u3059\u308b\u306e\u304b\u3092\u8abf\u67fb\u3059\u308c\u3070\u3088\u3055\u305d\u3046<\/p>\n","protected":false},"excerpt":{"rendered":"

\u4f5c\u8005\u306b\u30d8\u30eb\u30d7\u8981\u8acb\u3092\u51fa\u3057\u3066\u304a\u304d\u307e\u3057\u305f\u3002\u4f5c\u8005\u304b\u3089\u30ec\u30b9\u30dd\u30f3\u30b9\u304c\u3042\u308b\u307e\u3067\u3001\u81ea\u5206\u306a\u308a\u306b\u3082\u3046\u5c11\u3057\u8abf\u3079\u307f\u307e\u3059\u3002 \u305d\u306e\u5f8c\u3001\u518d\u8abf\u67fb\u3067SDK 1.3.0\u3092\u4f7f\u3046\u3068\u3001 unknown type name ‘uint16_t&#821 […]<\/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":"\u4f5c\u8005\u306b\u30d8\u30eb\u30d7\u8981\u8acb\u3092\u51fa\u3057\u3066\u304a\u304d\u307e\u3057\u305f\u3002\u4f5c\u8005\u304b\u3089\u30ec\u30b9\u30dd\u30f3\u30b9\u304c\u3042\u308b\u307e\u3067\u3001\u81ea\u5206\u306a\u308a\u306b\u3082\u3046\u5c11\u3057\u8abf\u3079\u307f\u307e\u3059\u3002 \u305d\u306e\u5f8c\u3001\u518d\u8abf…","_links":{"self":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts\/1256"}],"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=1256"}],"version-history":[{"count":0,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts\/1256\/revisions"}],"wp:attachment":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/media?parent=1256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/categories?post=1256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/tags?post=1256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}