# Binary partitioning

**URL:** <https://forums.freertos.org/t/binary-partitioning/14609>\
**Category:** Kernel\
**Created:** [March 4, 2022, 4:02pm UTC](https://forums.freertos.org/t/binary-partitioning/14609 "2022-03-04T16:02:20Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [March 4, 2022, 7:46pm UTC](https://forums.freertos.org/t/binary-partitioning/14609/3 "2022-03-04T19:46:33Z")

</div>

Here is one way I tried it before - There is one “Loader” which loads various applications (called components afterwards).

 ![image](https://d2v6vdsk2p900z.cloudfront.net/original/2X/f/fde3371548578a88bd476a3a9ee422881ab8ea50.png)

In your description, you want FreeRTOS to be part of loader as well. Each component has an header at the beginning which provides the loader necessary information to load the component:

![image](https://d2v6vdsk2p900z.cloudfront.net/original/2X/a/a078d3c27ede900ec8112e02d5ddcf092593a60d.png)

The way loader discovers various components is that FLASH and RAM are pre-partitioned for each component and therefore, the starting location of each component is fixed. Here is a sample partition:

 ![image](https://d2v6vdsk2p900z.cloudfront.net/original/2X/c/cae0e6d1eeaf6fa71bf2b0433aa1a0965fe3ae5f.png)

The loader is the first image that boots up and then loads all the components. The way you enable communication between components is by adding one indirection. The loader maintains a list of all the functions exported by each component. The loader has a function `GetProcAddress` which always resides at a fixed address and therefore, any component can all it. When a component wants to call a function exported by another component, it calls `GetProcAddress` to get the address of that function and then calls the function using the obtained address.

 ![image](https://d2v6vdsk2p900z.cloudfront.net/original/2X/f/fb1c80eb199b4e50136834d6a7c373f77fb9098e.png)

There is a agreed upon list of function ids among all components which is used to identify functions in `GetProcAddress`.

Does this sound like something you are looking for?

Thanks.

---

_[View the full topic](https://forums.freertos.org/t/binary-partitioning/14609)._
