bouffalolab / bouffalo_sdk

BouffaloSDK is the IOT and MCU software development kit provided by the Bouffalo Lab Team, supports all the series of Bouffalo chips. Also it is the combination of bl_mcu_sdk and bl_iot_sdk
Apache License 2.0
362 stars 128 forks source link

例程examples中的memheap示例程序,运行时会出现异常 #131

Closed CrazyShout closed 1 year ago

CrazyShout commented 1 year ago

图片 GDB显示为内存对齐错误 我的开发板芯片为BL808,图中错误是在关闭tlsf功能产生,但是实测开启tlsf也会报错。

sakumisu commented 1 year ago

不允许关闭tlsf

sakumisu commented 1 year ago

请测试m0,而不是d0

CrazyShout commented 1 year ago

那也就是说d0中无法运行吗,那为何在README中提示有d0的支持,其次为何不能关闭tlsf,是暂时不支持还是硬件原因而只能长期不支持吗

sakumisu commented 1 year ago

没有比tlsf.更好的内存管理

sakumisu commented 1 year ago

另一个内存管理基本已经不维护了,没必要使用

sakumisu commented 1 year ago

d0理论上都可以跑,但是我们并没有全部测试

sakumisu commented 1 year ago

先把重心放在m0吧,其次d0本来就没多少ram,用内存管理浪费其实

sakumisu commented 1 year ago

你可以把 memtest 屏蔽掉,我这边测试没有问题,可能这个写的有问题

sakumisu commented 1 year ago

不过不屏蔽也能用,并没有异常

sakumisu commented 1 year ago

image

CrazyShout commented 1 year ago

不过不屏蔽也能用,并没有异常

好的,请问你这个测试是在m0上测试的吗

sakumisu commented 1 year ago

上面已经给图了,m0 d0一起跑的

sakumisu commented 1 year ago

都没问题

CrazyShout commented 1 year ago

都没问题 都是tlsf算法吗,右图似乎是d0的测试结果?因为我的d0也也报的这样的,似乎卡在了循环中

sakumisu commented 1 year ago

这个例程需要6 70k,你一共才50多k,怎么跑?

sakumisu commented 1 year ago

你可以自己写mem test,这个是随便写的

sakumisu commented 1 year ago

卡在循环就是因为没有mem啊

sakumisu commented 1 year ago

这是纯软件的代码,跟硬件没有一点关系

sakumisu commented 1 year ago

看了以下,需要大概1 2M的ram,测不了很正常