美文网首页
物联网开发板简介

物联网开发板简介

作者: 诺之林 | 来源:发表于2021-08-23 23:01 被阅读0次

    基于macOS 亲测支持M1芯片

    硬件

    • 开发版 => CC2640R2F BLE低功耗蓝牙5.0

    • 仿真器 => XDS110 仿真器下载器 开发板套件CC2640R2F

    环境

    以下安装都选择默认路径

    项目

    保证仿真器和开发板连通电脑

    • 打开Code Composer Studio => Getting Started => Import Project
    /Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/examples/rtos/CC2640R2_LAUNCHXL/ble5stack/project_zero
    
    dev-board-introduction-01.png
    • 调试Run => Debug
    dev-board-introduction-02.png

    日志

    保证开发板Micro USB连通至电脑USB

    • 修改main.c如下
    int main()
    {
        // 省略了未修改代码
        UART_init();
        UartLog_init(UART_open(Board_UART0, NULL));
        Log_info0("hello world");
        // 省略了未修改代码
    }
    
    • 使用screen查看串口日志
    screen /dev/tty.usbserial-* 115200
    
    • 调试Run => Debug => 查看screen日志如下
    #000001 [ 0.000 ] INFO: (main.c:141) hello world
    #000002 [ 0.014 ] INFO: (led_service.c:221) Registered service, 5 attributes, status 0x00
    #000003 [ 0.015 ] INFO: (button_service.c:260) Registered service, 7 attributes
    #000004 [ 0.015 ] INFO: (data_service.c:239) Registered service, 6 attributes
    #000005 [ 0.015 ] INFO: (led_service.c:237) Registered callbacks to application. Struct @20000e04
    ......
    

    参考

    相关文章

      网友评论

          本文标题:物联网开发板简介

          本文链接:https://www.haomeiwen.com/subject/vyhkiltx.html