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
349 stars 121 forks source link

BL808: fatfs example didn't work on m0 core #203

Open raspy135 opened 3 months ago

raspy135 commented 3 months ago

Tested board : Ox64

fatfs example didn't work on BL808 with m0 core.

The cause was too little .stack section (1kB) defined in bl808_flash_m0.ld. There is a good amount of stack use for LFN support in ff.c.

Stack overflow will make random behavior. Increasing stack size solved the issue.

Is the stack size set to 1kB for specific reason? My suggestion is increasing default stack size to 3kB for safety but I'm not sure it's good for the other examples. Since WiFi support is dropped, m0 might be able to use more memory?