首頁>技術>

建立基於esp8266 helloworld工程esp8266開發板介紹產品特性及引數

esp8266 指的是,一個wifi SOC 晶片

下面的開發板,學名叫nodeMcu

開發板介面建立基於esp8266helloworld工程建立命令
lzd@lzd:~/alios/demo$ aos create project -b esp8266 -t helloworld_demo helloworld_esp8266
編譯生成bin檔案燒寫到開發板編譯命令
aos make
初次編譯

第一次編譯的時候,需要下載基於esp8266的交叉編譯工具鏈

編譯資訊
aos-cube version: 0.5.11Parsing all components ...# 列印編譯資訊 開發板 appBuild Configuration:====================App: helloworld_esp8266Board: esp8266====================Creating /home/lzd/project/helloworld_esp8266/out/config/autoconf.h ...Making config file for first time# 檢查 工程所需所有元件processing components: helloworld_esp8266 esp8266 app_adapter*** All Components: helloworld_esp8266 esp8266 app_adapter osal_aos mcu_esp8266 kernel_init network rhino yloop newlib_stub lwip netmgr arch_xtensa_lx106 ulog lib_rbtree vfs kvBuild AOS Now# 查詢編譯工具鏈路徑TOOLCHAIN_PATH=# 根據工程中不同元件,生成元件.oCompiling helloworld_esp8266Compiling board_esp8266Compiling app_adapterCompiling osal_aosCompiling mcu_esp8266Compiling rhinoCompiling kernel_initCompiling yloopCompiling newlib_stubCompiling netmgrCompiling arch_xtensa_lx106Compiling ulogCompiling lib_rbtreeCompiling vfsCompiling kvMaking /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/ld/eagle.app.v6.new.1024.app1.ld# 根據工程中不同元件,生成元件.a 靜態庫Making /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/libraries/helloworld_esp8266.aMaking /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/libraries/board_esp8266.aMaking /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/libraries/app_adapter.aMaking /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/libraries/osal_aos.aMaking /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/libraries/mcu_esp8266.aMaking /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/libraries/kernel_init.aMaking /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/libraries/rhino.aMaking /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/libraries/yloop.aMaking /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/libraries/newlib_stub.aMaking /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/libraries/netmgr.aMaking /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/libraries/arch_xtensa_lx106.aMaking /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/libraries/ulog.aMaking /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/libraries/lib_rbtree.aMaking /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/libraries/vfs.aMaking /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/libraries/kv.aMaking [email protected]# 生成bin檔案Making [email protected] [email protected] MEMORY MAP |=================================================================|| MODULE | ROM | RAM ||=================================================================|| app_adapter | 76 | 12 || arch_xtensa_lx106 | 2662 | 2784 || board_esp8266 | 1326 | 44 || helloworld_esp8266 | 98 | 0 || kernel_init | 112 | 0 || kv | 2224 | 24 || libcirom | 27509 | 1200 || libcrypto | 14512 | 0 || libgcc | 2167 | 0 || libhal | 37 | 0 || liblwip | 30717 | 1596 || libmain | 30412 | 708 || libnet80211 | 42675 | 3213 || libphy | 48158 | 461 || libpp | 43992 | 18013 || libwpa | 17240 | 626 || mcu_esp8266 | 8159 | 559 || netmgr | 94 | 8 || newlib_stub | 363 | 0 || osal_aos | 670 | 0 || rhino | 11709 | 3288 || ulog | 573 | 7 || vfs | 1440 | 1113 || yloop | 1997 | 32 || *fill* | 2070 | 124 ||=================================================================|| TOTAL (bytes) | 290992 | 33812 ||=================================================================|Generate standard flash images /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/binary/[email protected] crc: 1ff7a07eGenerate Raw OTA image: /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/binary/helloworld_esp8266@esp8266_ota.bin ...Generate Compressed OTA image: /home/lzd/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/binary/helloworld_esp8266@esp8266_ota.bin.xz ...29336415783cc66108a470c00ea925e5e1c89c195872983e90db9b73405b3cb0555afecb8db2# 完成編譯Build complete: helloworld_esp8266@esp8266Check if required tools for esp8266 exist## esp8266 沒有編譯bootloader檔案,mk3080卻建立了### 原因是 esp8266廠家,bootloader不開源,他們提供boot.bin檔案,我們直接拿來燒寫就可以了
燒寫helloworld工程到目標板檢視工程生成映象使用者程式
lzd@ubuntu:~/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/binary$ lltotal 4648drwxrwxr-x 2 lzd lzd 4096 Jul 6 23:23 ./drwxrwxr-x 8 lzd lzd 4096 Jul 6 23:23 ../-rwxrwxr-x 1 lzd lzd 293364 Jul 6 23:23 [email protected]*-rwxrwxr-x 1 lzd lzd 1129750 Jul 6 23:23 [email protected]*-rw-rw-r-- 1 lzd lzd 825052 Jul 6 23:23 [email protected] 1 lzd lzd 1697152 Jul 6 23:23 [email protected] 1 lzd lzd 2176 Jul 6 23:23 helloworld_esp8266@esp8266_map.csv-rw-rw-r-- 1 lzd lzd 293392 Jul 6 23:23 helloworld_esp8266@esp8266_ota.bin-rw-rw-r-- 1 lzd lzd 195900 Jul 6 23:23 helloworld_esp8266@esp8266_ota.bin.xz-rwxrwxr-x 1 lzd lzd 294720 Jul 6 23:23 [email protected]*-rw-rw-r-- 1 lzd lzd 2505 Jul 6 23:23 link.opts-rw-rw-r-- 1 lzd lzd 283 Jul 6 23:23 readme.txt
boot程式

boot_v1.7_921600----表示串列埠的波特率

匯出映象檔案到windows系統匯出boot程式命令
lzd@ubuntu:~/AliOS-Things/platform/mcu/esp8266/bsp$ lsblank.bin entry.c includebootloader.bin ESP8266_RTOS_SDK key.cboot_v1.7_921600.bin esp_init_data_default.bin libboot_v1.7.bin heap_iram.c syscall.cdriver [email protected]@ubuntu:~/AliOS-Things/platform/mcu/esp8266/bsp$ cp boot_v1.7_921600.bin /mnt/hgfs/03-Share/
匯出app程式命令
lzd@ubuntu:~/project/helloworld_esp8266/out/helloworld_esp8266@esp8266/binary$ cp [email protected] /mnt/hgfs/03-Share/
開啟燒錄工具燒錄軟體使用esp8266開發板除錯檢視log資訊

3
最新評論
  • BSA-TRITC(10mg/ml) TRITC-BSA 牛血清白蛋白改性標記羅丹明
  • CQRS命令職責分離架構