SimonLiu的ESP8266与AliOS Things 学习教程系列之十三:mac下设置默认的烧写和串口监视器参数

欢迎加入交流群: ESP8266 AliOS Things 群 号: 107723112
系列文章目录:
SimonLiu的ESP8266与AliOS Things 学习教程系列目录

    在AliOS Things 的 2.1.0版本中,由于编译方式已经改变,所以截至2019.3.149编译和烧写图标实际上已经不可用(希望以后有更新),因为它们还沿用project@board作为参数,但是在2.1.0中已经弃用了这种参数。所以例如aos upload这样的命令行会经常使用,但是每次都要选择串口设备也很讨厌,mac和linux下串口设备名称只和芯片型号有关,所以同一个设备的名称总是固定的,而不是像Windows那样换一个USB口串口号就变了,所以研究了一下如何设置默认上传的串口设备。
    使用Windows的同学,如果长期使用一个USB口不出问题,也可以用这种方法。不过根据我自己的经验来看,经常某个USB口不认或者出问题而需要换USB口的情况很多,所以这种方法不一定适合。

干货来了:

  1. 串口工具(AliOS Studio的插头工具图标)默认参数设置在.vscode/tasks.json中:
    修改为类似如下的内容即可(修改最后两行,"/dev/cu.wchusbserial1410"要根据你的设备具体名称进行修改):
     "label": "alios-studio: Serial Monitor",
     "type": "shell",
     "command": "aos",
     "args": [
       "monitor",
       "/dev/cu.wchusbserial1410",
       "9600"
       ],
  1. aos upload的默认参数在build/site_scons/upload/esp8266.json中(以ESP8266为例,不同的芯片请打开对应的json文件)
    "@PORT@",
    改为"/dev/cu.wchusbserial1410"即可(注意替换为你自己的设备名哦)。
    完整内容:
{
    "cmd": [
        {
            "Linux32": "esptool.py", 
            "Linux64": "esptool.py", 
            "OSX": "esptool.py", 
            "Win32": "esptool.exe"
        }, 
        "--chip", 
        "esp8266", 
        "--port", 
        "/dev/cu.wchusbserial1410", 
        "--baud", 
        "921600", 
        "write_flash", 
        "--flash_size", 
        "detect", 
        "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/@TARGET@.bin"
    ]
}
Serial is a modern terminal emulator designed to make working with servers, network equipment, and embedded hardware easier for serialengineers and system administrators. For system administrators, Serial supports the all-important break sequence required when working with routers and switches. Serial also includes a full-featured terminal emulator, allowing you to work with the screen-based menus found in network equipment and Unix programs including the text editors vi and emacs. Makers and engineers will appreciate Serial’s built-in support for embedded devices including the Arduino, Raspberry Pi, BeagleBone, and thousands of others. Serial includes several useful features for working with these devices including the ability to reset an Arduino, and the ability to connect to a BeagleBone over USB directly or through the on-board header. Finally, Serial supports several of the most common USB to serial adapters WITHOUT requiring drivers, often saving you the hassle of finding and installing additional software. Features: Full-featured xterm, linux, and ANSI/VT100 terminal emulation Works with USB to serial adapters and devices that use USB to serial chips internally UTF-8 character set support No kernel drivers required for many of the most common devices Bluetooth serial support USB Communication Device Class (CDC) support Break support required for routers, switches and other network equipment Line-buffered send mode Text pacing options XMODEM and YMODEM file transfer support WHAT’S NEW Version 1.3.9: Added support for macOS 10.14 (Mojave) Added the ability to customize the session log save path Added CP437 and CP850 character set support Added support for additional devices Other bug fixes and improvements REQUIREMENTS OS X 10.7 or later, 64-bit processor
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值