921742079
921742079

注册于 1 year ago

回答
9
文章
0
关注者
0

文档里面,下载toolchain,github下载rtt的源码,bsp直接撸,开发调试强烈推荐vscode
如果需要断点真机调试,用openocd,stm32的bsp移植的时候需要stm32cubemx,请下载linux版本
串口工具开源用picocom

linux下东西都能用,就是需要手工自己组合

你有没有用这个gps模块手动拿到经纬度,然后在百度地图那边用经纬度查一下准不准?

这几天也遇到了这个问题,问了一些朋友,目前看起来似乎是rtt的pwm还不支持输出比较的模式,只能用多路定时器来做了

demo代码里面,dfs_mkfs和dfs_mount的第一个参数是设备名,不是分区名,改成"W25Q128"解决了,感谢熊大的帮助!!

是这个问题,非常感谢,以后会去看芯片手册,谢谢~

现在问题是,u盘容量显示错误,导致无法mount
物理容量应该是32g,windows下显示28g,这里告诉我2047.1023GB
不知道应该怎么格式化,需要注意啥?
快速格式化和完全格式化都不行,给跪了

msh />reboot

 \ | /
- RT -     Thread Operating System
 / | \     4.0.2 build Jul  2 2020
 2006 - 2019 Copyright by rt-thread team
msh />usb connected
port 1 status 0x10201
reset port
start enumnation
ok
pipe transform remain size,: 8
nak
nak
ok
pipe transform remain size,: 0
ok
reset port
rt_usb_set_address
ok
pipe transform remain size,: 0
ok
get device descriptor length 18
ok
pipe transform remain size,: 18
ok
pipe transform remain size,: 0
ok
Vendor ID 0x951
Product ID 0x1666
ok
pipe transform remain size,: 18
ok
pipe transform remain size,: 0
ok
ok
pipe transform remain size,: 32
ok
pipe transform remain size,: 0
ok
ok
pipe transform remain size,: 0
ok
rt_usb_get_interface_descriptor: 0
interface class 0x8, subclass 0x6
rt_usb_get_endpoint_descriptor: 0
rt_usb_get_endpoint_descriptor: 1
subclass 6, protocal 80
rt_usbh_storage_run
rt_usb_get_endpoint_descriptor: 0
rt_usb_get_endpoint_descriptor: 1
rt_usbh_storage_reset
ok
pipe transform remain size,: 0
ok
rt_usbh_storage_get_max_lun
ok
pipe transform remain size,: 1
ok
pipe transform remain size,: 0
ok
rt_usbh_storage_inquiry
pipe transform remain size,: 31
nak
ok
pipe transform remain size,: 36
ok
pipe transform remain size,: 13
ok
rt_usbh_storage_test_unit_ready
pipe transform remain size,: 31
ok
pipe transform remain size,: 13
ok
rt_usbh_storage_get_capacity
pipe transform remain size,: 31
ok
pipe transform remain size,: 8
ok
pipe transform remain size,: 13
ok
capicity 60604416, block size 512
read partition table
rt_usbh_storage_read10
pipe transform remain size,: 31
ok
pipe transform remain size,: 512
nak
ok
pipe transform remain size,: 448
ok
pipe transform remain size,: 384
ok
pipe transform remain size,: 320
ok
pipe transform remain size,: 256
ok
pipe transform remain size,: 192
ok
pipe transform remain size,: 128
ok
pipe transform remain size,: 64
ok
pipe transform remain size,: 13
ok
finished reading partition
found part[0], begin: 512, size: 2047.1023GB
rt_usbh_storage_read10
pipe transform remain size,: 31
ok
pipe transform remain size,: 512
ok
pipe transform remain size,: 448
ok
pipe transform remain size,: 384
ok
pipe transform remain size,: 320
ok
pipe transform remain size,: 256
ok
pipe transform remain size,: 192
ok
pipe transform remain size,: 128
ok
pipe transform remain size,: 64
ok
pipe transform remain size,: 13
ok
rt_usbh_storage_read10
pipe transform remain size,: 31
ok
pipe transform remain size,: 512
ok
pipe transform remain size,: 448
ok
pipe transform remain size,: 384
ok
pipe transform remain size,: 320
ok
pipe transform remain size,: 256
ok
pipe transform remain size,: 192
ok
pipe transform remain size,: 128
ok
pipe transform remain size,: 64
ok
pipe transform remain size,: 13
ok
udisk part 0 mount failed

board/Kconfig里面现在这个貌似并不会使 libraries/HAL_Drivers/drv_usbh.c 参与构建
的改成下面这个,烧录以后,直接卡死了

config BSP_USING_USBH
    bool "Enable USB host"
    select RT_USING_USB_HOST
    default n

调试发现,卡死是时钟问题,现在可以看到usb设备了

msh />list_device
device           type         ref count
-------- -------------------- ----------
usbh     USB Host Bus         0       
uart1    Character Device     2       
pin      Miscellaneous Device 0       

sorry,怪我,求助,求助,不好意思

最好再加个支持用户上传/共享自定义的脚本模板:lol

zhao_gx 发表于 2020-3-31 10:08
另外没太明白你说的测试方法,怎么直接给一个固件的url。缓冲区设置成多大合适呢。 ...


静态文件存储方式和存mysql和你这个错误关系不大,就是觉得很奇怪
然后单片机上存的话,估计得看flash空间了吧?划分单独的区存固件,然后升级或者外挂flash吧

为什么要把固件用blob的模式存mysql。。。。。。。。。。太可怕了,错误原因看起来似乎是缓冲区默认就1024,不过你可以试试直接给一个固件的url,然后stm32板测试一下ota,固件再小,存数据库也看起来并不算很好的设计吧?

发布
问题

分享
好友