# Data sharing between two application

**URL:** <https://forums.freertos.org/t/data-sharing-between-two-application/16591>\
**Category:** Texas Instruments\
**Tags:** debug, monitoring\
**Created:** [January 19, 2023, 11:29pm UTC](https://forums.freertos.org/t/data-sharing-between-two-application/16591 "2023-01-19T23:29:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pvadivel](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@pvadivel](https://forums.freertos.org/u/pvadivel)\
**Post date:** [January 19, 2023, 11:29pm UTC](https://forums.freertos.org/t/data-sharing-between-two-application/16591/1 "2023-01-19T23:29:14Z")

</div>

Hi FreeRTOS community,

I am looking solution for data sharing (send and receive) from two different application. Let say ‘app1’ will be receiving signal and manipulating data and put in message-queue. Another application ‘app2’ should receive data from message-que and send to CAN-bus.

I thought of using message-queue but it work on same (one) application with two different task. But I need to find two different application communication mechanism(data sharing)?

Please someone help me on this.

Regards,  
Vel

---

<div class="post-metadata">

**Author:** ![archigup](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/archigup/32/1418_2.png) [@archigup](https://forums.freertos.org/u/archigup)\
**Post date:** [January 20, 2023, 7:01pm UTC](https://forums.freertos.org/t/data-sharing-between-two-application/16591/2 "2023-01-20T19:01:02Z")

</div>

Hi, by two applications, do you mean two chips both running FreeRTOS?

---

<div class="post-metadata">

**Author:** ![pvadivel](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@pvadivel](https://forums.freertos.org/u/pvadivel)\
**Post date:** [January 20, 2023, 8:42pm UTC](https://forums.freertos.org/t/data-sharing-between-two-application/16591/3 "2023-01-20T20:42:45Z")

</div>

both application will be running on the freeRTOS.  
Application1 - will be receiving data from RpcMSG and writing into the queue (CanDataQ)  
Application2 - will be reading that CanDataQ and construct can message and send it to can-bus

---

<div class="post-metadata">

**Author:** ![hs2](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hs2](https://forums.freertos.org/u/hs2)\
**Post date:** [January 20, 2023, 9:09pm UTC](https://forums.freertos.org/t/data-sharing-between-two-application/16591/4 "2023-01-20T21:09:34Z")

</div>

On separate CPUs ? Means do you use a dual core MCU running a separate FreeRTOS application per core ?

---

<div class="post-metadata">

**Author:** ![archigup](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/archigup/32/1418_2.png) [@archigup](https://forums.freertos.org/u/archigup)\
**Post date:** [January 21, 2023, 1:31am UTC](https://forums.freertos.org/t/data-sharing-between-two-application/16591/5 "2023-01-21T01:31:14Z")

</div>

If both are tasks running on FreeRTOS, you can communicate between the tasks using a queue; I’m not sure I understand what you mean by application in this context.

---

<div class="post-metadata">

**Author:** ![pvadivel](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@pvadivel](https://forums.freertos.org/u/pvadivel)\
**Post date:** [January 23, 2023, 2:22pm UTC](https://forums.freertos.org/t/data-sharing-between-two-application/16591/6 "2023-01-23T14:22:58Z")

</div>

two different application means that app1 = /examples/hello\_world (freeRTOS example application) and app2 = examples/drivers/mcan/mcan\_loopback\_polling (freeRTOS example application). how this two different application can communicate? exchange data/information?

---

<div class="post-metadata">

**Author:** ![archigup](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/archigup/32/1418_2.png) [@archigup](https://forums.freertos.org/u/archigup)\
**Post date:** [January 23, 2023, 9:02pm UTC](https://forums.freertos.org/t/data-sharing-between-two-application/16591/7 "2023-01-23T21:02:47Z")

</div>

If you need to share a queue between two files that you are going to build into your firmware, you can declare the queue in a header file, which you can include in your c files. One of the files will have to declare the queue.
