准备工作

Zephyr:https://github.com/zephyrproject-rtos/zephyr

micropython:https://github.com/micropython/micropython

开发板:stm32f4_disco

 

搭建开发环境

搭建Zephyr开发环境(参考:https://docs.zephyrproject.org/latest/

git clone https://github.com/micropython/micropython

 

编译下载

cd <zephyr dir>

source zephyr.sh

cd <micropython/ports/zephyr>

make BOARD=stm32f4_disco flash

***** Booting Zephyr OS build zephyr-v2.0.0-195-g466f91a9e3e1 *****
could not find module 'main.py'
MicroPython v1.11-298-gb479c5a97 on 2019-09-11; zephyr-stm32f4_disco with stm32f407xx
Type "help()" for more information.
>>>
 

 

测试

from machine import Pin
LED = Pin(("GPIOD", 12), Pin.OUT)
LED.value(1)
LED.value(0)

以上指令测试开发板上指示灯亮灭

 

 

 

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐