SOLVED - make more RAM available for app code

Firmware/software/electronics/mechanics
Post Reply
wydmynd
Member
Posts: 87
Joined: Thu Dec 06, 2018 9:25 am

SOLVED - make more RAM available for app code

Post by wydmynd »

Hi!

I have some algorithm running on a modified version of the firmware (based on 9.2019 release)

I tried to update to release 4.2020 but it does not work anymore (assert failed at startup) , my assumption is that available memory has decreased.

Is there any way to make room, like disable high-level commander and INDI commander if I'm not using them?

I know memory system has been revamped, did not understand completely how/if things changed in this respect (making memory available for app code)

Thanks!
Last edited by wydmynd on Mon May 18, 2020 12:54 pm, edited 1 time in total.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: make more RAM available for app code

Post by kimberly »

There has been a lot of changes since 2019.09 and we are aware of this problem that we are running out of memory. I think you are dealing with the issue mentioned here on the gihtub repo: https://github.com/bitcraze/crazyflie-f ... issues/579, which also shows a list of how much RAM each process uses which is running close to its limits. Please comment on this issue so that we can find a way to fix it.
wydmynd
Member
Posts: 87
Joined: Thu Dec 06, 2018 9:25 am

Re: make more RAM available for app code

Post by wydmynd »

thanks for the reply! as for a "quick fix" , I will look for a way to avoid loading high level commander(s) , active marker , AI and other things which are not used
wydmynd
Member
Posts: 87
Joined: Thu Dec 06, 2018 9:25 am

Re: make more RAM available for app code

Post by wydmynd »

update - my code had a sub-task (in addition to the app task) the real fix was to load that code using STATIC_MEM_TASK_CREATE instead of the old method xtaskcreate. So when I was assuming it was a memory issue, it wasn't that memory has run out, but apparently there are different rules regarding launching tasks.
Last edited by wydmynd on Tue May 19, 2020 5:37 am, edited 1 time in total.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: SOLVED - make more RAM available for app code

Post by kimberly »

Ah yes that is indeed handier.

btw, we managed to clear up a lot of RAM in the latest commit of current master, so you got about 40 kb extra and probably more coming up !https://github.com/bitcraze/crazyflie-f ... issues/579 Sorry that you had to struggle with it before, but since you and others were having issues with this we decided to focus on this right away.
Post Reply