micropython: Pyboard communicates with W5500 module

ORIGINAL POST
By T_K_233
components
Hardware Components
W5500
X 1
details

pyboard.PNG

编译支持 W5500 的 Pyboard 固件,真的费死劲了……

过程中需要用到外网,所以我这里直接用腾讯云香港的服务器操作的

编译固件

配置环境

先从 Github 上把 micropython 源代码拽下来

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

然后安装一些环境

sudo apt-get install gcc
sudo apt-get install make
sudo apt-get install gcc-arm-none-eabi

这样编译环境就 OK 了

编译 mpy-cross

mpy-cross 是 micropython 自身的交叉编译器,编译固件之前需要先编译这个

cd ./micropython/mpy-cross
sudo make

编译完之后如图所示

编译

# 先回到 micropython 这个主文件夹
cd ..

# 获取一个编译时必要的模组
sudo git submodule update --init

# 开始编译
sudo make -C ./ports/stm32 BOARD=PYBV11 MICROPY_PY_WIZNET5K=5500

编译选项中的 BOARD 对应着板子的版本,可以通过 ls ./ports/stm32/boards 来查看所有选项

MICROPY_PY_WIZNET5K 对应着将来要是用的网络模块型号,可以填 5500 或者 5200 ,分别对应 W5500 和 W5200

最后的固件文件路径是 ./ports/stm32/build-PYBV11/firmware.dfu

烧写固件

可以参考 官方文档

0人点赞

作者:T_K_233
链接:https://www.jianshu.com/p/37794af9f1d5
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

pyboard.PNG

编译支持 W5500 的 Pyboard 固件,真的费死劲了……

过程中需要用到外网,所以我这里直接用腾讯云香港的服务器操作的

编译固件

配置环境

先从 Github 上把 micropython 源代码拽下来

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

然后安装一些环境

sudo apt-get install gcc
sudo apt-get install make
sudo apt-get install gcc-arm-none-eabi

这样编译环境就 OK 了

编译 mpy-cross

mpy-cross 是 micropython 自身的交叉编译器,编译固件之前需要先编译这个

cd ./micropython/mpy-cross
sudo make

编译完之后如图所示

编译

# 先回到 micropython 这个主文件夹
cd ..

# 获取一个编译时必要的模组
sudo git submodule update --init

# 开始编译
sudo make -C ./ports/stm32 BOARD=PYBV11 MICROPY_PY_WIZNET5K=5500

编译选项中的 BOARD 对应着板子的版本,可以通过 ls ./ports/stm32/boards 来查看所有选项

MICROPY_PY_WIZNET5K 对应着将来要是用的网络模块型号,可以填 5500 或者 5200 ,分别对应 W5500 和 W5200

最后的固件文件路径是 ./ports/stm32/build-PYBV11/firmware.dfu

烧写固件

可以参考 官方文档

0人点赞

作者:T_K_233
链接:https://www.jianshu.com/p/37794af9f1d5
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

COMMENTS

Please Login to comment
  Subscribe  
Notify of
POSTED BY
TAGS