Replies: 2 comments 5 replies
-
@ethancheez any thoughts here? |
Beta Was this translation helpful? Give feedback.
-
I was able to successfully run an F' deployment on hardware with 256KB FLASH and 32KB RAM. Out of that, F' only used ~140KB FLASH and ~25KB RAM. So I believe running on hardware with ~500KB RAM is possible. I can provide input about the static memory allocation (bss) on setup time. When uploading an F' deployment, most of the data is stored in FLASH memory and is read-only. Static memory allocations (i.e. vectors created during setup time) will be written to RAM. The compiler you are using may come with a few size detecting tools that allow you to determine exactly how much data is written to FLASH and RAM. We based this off of the .bss model, where the The compiler should have the
If you combine these tools along with using the SystemResources F' component, you can estimate how much dynamic memory is being allocated. |
Beta Was this translation helpful? Give feedback.
-
We are planning to use F' on a resource-constrained platform (~500KB RAM) and I was wondering if there's been any effort put into analyzing the maximum stack depth for each active component. From the Sphinx reference deployment it seems that the given stack size is not determined by any tool, but overshooted to not have to worry.
There're useful gcc flags for determining stack usage, like
-fcallgraph-info=su
and-fstack-usage
(source). This works well with static function calls, for dynamic ones, like in the case of sync port calls, the topology information would need to be used. Additionally, components like(De)framer
take the protocol implementation dynamically. However, all of these are determined at setup time so such analysis could be done in theory. WDYT? Do you see other blockers?Beta Was this translation helpful? Give feedback.
All reactions