【云隐】[AliOS-Things 2.0.0] esp8266平台编译 linkkitapp工程 遇到的固件烧录的错误修正

先吐槽再说:AliOS-Things 1.3.3 与 2.0.0之前的版本差异真是大,刚填了点1.3.3的坑,这又冒出2.0.0了,唉,继续填坑中……

慎入、慎入、慎入……

app/example/linkkitapp固件编译:

# aos make  linkkitapp@esp8266

编译完成后执行

# aos upload linkkitapp@esp8266

出错如下:
aos-cube version: 0.2.60
[INFO]: Target: linkkitapp@esp8266
[INFO]: Currently in aos_sdk_path: '/home/yunyin/ubuntu/Ubuntu_Project/AliOSThings_2.0.0/aliosThings_living'
scons: Reading SConscript files ...
[INFO]: Scons to upload!args:{'APPLICATION': 'linkkitapp', 'COMMAND': 'upload', 'BOARD': 'esp8266'}

[INFO]: Target: linkkitapp@esp8266
[INFO]: Currently in aos_sdk_path: '/home/yunyin/ubuntu/Ubuntu_Project/AliOSThings_2.0.0/aliosThings_living'


--- Available ports:
---  1: /dev/ttyS0           'ttyS0'
---  2: /dev/ttyUSB0         'CP2102 USB to UART Bridge Controller'
--- Enter port index or full name: 2
[INFO]: Running cmd:
    'esptool.py --chip esp8266 --port /dev/ttyUSB0 --baud 921600 write_flash --flash_size detect 0x0 /home/yunyin/ubuntu/Ubuntu_Project/AliOSThings_2.0.0/aliosThings_living/platform/mcu/esp8266/bsp/boot_v1.7_921600.bin 0x3fc000 /home/yunyin/ubuntu/Ubuntu_Project/AliOSThings_2.0.0/aliosThings_living/platform/mcu/esp8266/bsp/esp_init_data_default.bin 0x3fe000 /home/yunyin/ubuntu/Ubuntu_Project/AliOSThings_2.0.0/aliosThings_living/platform/mcu/esp8266/bsp/blank.bin 0x1000 /home/yunyin/ubuntu/Ubuntu_Project/AliOSThings_2.0.0/aliosThings_living/out/linkkitapp@esp8266/binary/[email protected]'
usage: esptool write_flash [-h] [--flash_freq {keep,40m,26m,20m,80m}]
                           [--flash_mode {keep,qio,qout,dio,dout}]
                           [--flash_size FLASH_SIZE]
                           [--spi-connection SPI_CONNECTION] [--no-progress]
                           [--verify] [--compress | --no-compress]
                           <address> <filename> [<address> <filename> ...]
esptool write_flash: error: argument <address> <filename>: [Errno 2] No such file or directory: '/home/yunyin/ubuntu/Ubuntu_Project/AliOSThings_2.0.0/aliosThings_living/out/linkkitapp@esp8266/binary/[email protected]'
---host_os:Linux64
[ERROR]: Firmware upload failed!

[AliOS-Things] ERROR: "s" returned error code 255.
[AliOS-Things] ERROR: Command "s c o n s   - f   / h o m e / y u n y i n / u b u n t u / U b u n t u _ P r o j e c t / A l i O S T h i n g s _ 2 . 0 . 0 / a l i o s T h i n g s _ l i v i n g / b u i l d / u c u b e . p y   C O M M A N D = u p l o a d   A P P L I C A T I O N = l i n k k i t a p p   B O A R D = e s p 8 2 6 6" in "/home/yunyin/ubuntu/Ubuntu_Project/AliOSThings_2.0.0/aliosThings_living"
---
 

修改方法:

# vim ./build/site_scons/upload/esp8266.json

修改如下,我的是 ESP8266 32Mbit模块:

{
    "cmd": [
        "esptool.py",
        "--chip",
        "esp8266",
        "--port",
        "@PORT@",
        "--baud",
        "921600",
        "--before",
        "default_reset",
        "--after",
        "hard_reset",
        "write_flash",
        "-z",
        "--flash_mode",
        "dout",
        "--flash_freq",
        "40m",
        "--flash_size",
        "4MB-c1",

        "0x0",
        "@AOSROOT@/platform/mcu/esp8266/bsp/boot_v1.7_921600.bin",
        "0x3fc000",
        "@AOSROOT@/platform/mcu/esp8266/bsp/esp_init_data_default.bin",
        "0x3fe000",
        "@AOSROOT@/platform/mcu/esp8266/bsp/blank.bin",
        "0x1000",
        "@AOSROOT@/out/@TARGET@/binary/@[email protected]"
    ]
}

完成后,再重新执行

# aos upload linkkitapp@esp8266

推荐全面的IOT技术论坛:www.iotqa.cn

猜你喜欢

转载自blog.csdn.net/yunyin_link/article/details/82793163