完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
https://bbs.elecfans.com/jishu_2179917_1_1.html 接上稿, 想用星空派gd32F303开发板资源 (P F 7)输出,(PC3)模拟输入,板(P F0~3)LED,板(PA 0 、PC13 、 P F 5 、 P F 4)button,来通过光耦中间继电器控制加热设备。程序根据厂家及旗点科技创始人 连志安提供资料及视频 ,想采用RT-Thread RTOS系统在ARM keil 5.29上开始构造。 第一部分建立rtos及button和LED环境: 安装RT-Thread及其env软件. 在rt-threadbspgd32303e-eval 目录中右键 选中conEmu Here 打入命令menuconfig 配置好后保存. 打入命令scons --target=mdk5 rtthread配置完成。 打开 rt-threadbspgd32303e-eval下project.UVprojx文件, 在项目applications加入button按键程序, 编写如下代码:
build: Build started: Project: project *** Using Compiler 'V5.06 update 6 (build 750)', folder: 'g:Keil_v5ARMARMCCBin' Build target 'rt-thread_gd32f30x' compiling clock.c... compiling components.c... compiling cpu.c... compiling device.c... compiling idle.c... compiling ipc.c... compiling irq.c... compiling kservice.c... compiling mem.c... compiling mempool.c... compiling object.c... compiling scheduler.c... compiling signal.c... compiling thread.c... compiling timer.c... compiling main.c... applicationsmain.c(187): warning: #177-D: variable "ret" was declared but never referenced rt_err_t ret= RT_EOK ; applicationsmain.c: 1 warning, 0 errors compiling button.c... compiling board.c... compiling drv_usart.c... compiling drv_spi.c... compiling drv_i2c.c... compiling drv_gpio.c... compiling backtrace.c... compiling showmem.c... compiling cpuport.c... compiling dfs.c... compiling dfs_file.c... compiling dfs_fs.c... compiling dfs_posix.c... compiling devfs.c... compiling dfs_elm.c... compiling ff.c... compiling i2c_core.c... compiling i2c_dev.c... compiling pin.c... compiling serial.c... compiling spi_core.c... compiling spi_dev.c... compiling completion.c... compiling dataqueue.c... compiling pipe.c... compiling ringblk_buf.c... compiling ringbuffer.c... compiling waitqueue.c... compiling workqueue.c... compiling shell.c... compiling cmd.c... compiling msh.c... compiling msh_file.c... compiling finsh_compiler.c... compiling finsh_error.c... compiling finsh_heap.c... compiling finsh_init.c... compiling finsh_node.c... compiling finsh_ops.c... compiling finsh_parser.c... compiling finsh_var.c... compiling finsh_vm.c... compiling finsh_token.c... compiling libc.c... compiling mem_std.c... compiling stdio.c... compiling stubs.c... compiling time.c... linking... Program Size: Code=95576 RO-data=11272 RW-data=956 ZI-data=5420 After Build - User command #1: fromelf --bin .buildrtthread-gd32f30x.axf --output rtthread.bin ".buildrtthread-gd32f30x.axf" - 0 Error(s), 1 Warning(s). Build Time Elapsed: 00:00:53 下后运行 com口信息: | / - RT - Thread Operating System / | 4.0.3 build Oct 20 2021 2006 - 2020 Copyright by rt-thread team [32m[I/I2C] I2C bus [i2c0] registered[0m Hello, world msh />Button2 Dowm_!a=11Button2 Dowm_!a=1Button2 Dowm_!a=2Button2 Dowm_!a=3Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button2_Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button3 _Long_!Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 long_Dowm !Button4 _Dowm!Button4 _Dowm!Button4 _Dowm!Button3 _Dowm!b=11Button2 Dowm_!a=4Button3 _Dowm!b=1Button3 _Dowm!b=2Button3 _Dowm!b=3Button3 _Dowm!b=4Button3 _Dowm!b=5Button3 _Dowm!b=6Button3 _Dowm!b=7Button3 _Dowm!b=8Button3 _Dowm!b=9Button3 _Dowm!b=10Button3 _Dowm!b=11Button4 _Dowm!Button4 _Dowm!Button4 _Dowm!Button4 _Dowm!Button3 _Dowm!b=1Button3 _Dowm!b=2Button3 _Dowm!b=3Button3 _Dowm!b=4Button3 _Dowm!b=5Button3 _Dowm!b=6Button3_Double_!Button3 _Dowm!b=7Button3 _Dowm!b=8Button3 _Dowm!b=9Button3 _Dowm!b=10Button3 _Dowm!b=11Button2 Dowm_!a=5Button2 Dowm_!a=6Button2 Dowm_!a=7Button2 Dowm_!a=8Button2 Dowm_!a=9Button2 Dowm_!a=10Button2 Dowm_!a=11Button3 _Dowm!b=1Button3 _Dowm!b=2Button3 _Dowm!b=3Button3 _Dowm!b=4Button3 _Dowm!b=5Button3 _Dowm!b=6Button3 _Dowm!b=7Button3 _Dowm!b=8Button3 _Dowm!b=9Button3 _Dowm!b=10Button3 _Dowm!b=11Button4 _Dowm!Button4 _Dowm!Button4 _Dowm!Button4 _Dowm!Button4 _Dowm! 板正常显示 按键和led显示达到预期状态。 |
|
相关推荐
|
|
只有小组成员才能发言,加入小组>>
204个成员聚集在这个小组
加入小组3184 浏览 0 评论
【直播课件】如何移植Open Harmony到ARM单片机芯片上
5343 浏览 0 评论
4176 浏览 3 评论
【星空派GD32F303开发板试用体验】-01-开箱验货以及点灯体验
7879 浏览 0 评论
5805 浏览 0 评论
272浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-19 07:40 , Processed in 0.501275 second(s), Total 42, Slave 33 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号