Possible / advisable to increase the size of m4 coprocessor text and data size?
I have integrated Micro-ROS into the m4. I have it working such that I am able to publish sensor data and receive it from other nodes. However Micro-ROS takes up a quite a bit of space, 70+ KB. In their documentation it is target at mid tier micro controllers. I am trying to add the parameter server and that pushes the .text over the 128KB limit. I am wondering if it is possible / advisable to recompile the system image to allow for larger text space for the co processor. I believe their are some changes to make to the device tree memory section among other places. My possible options I see would be:
- Rebuild the system image to increase memory for the M4 and make the other requisite changes to increase the size of the .text space
- Don't use micro-ROS on the m4 and exchange data via packets and a smaller implementation by hand and parse the data on the A7 side to publish it into the ROS2 world.
- Optimize everything as much as possible to reduce the size and try to keep squeezing it into the currently allocated sizes.
I saw on some other posts that the m4 shouldn't really be running any protocol stacks since they tend to eat up large amount of memory and that they should be handled by the A7. Any advice / thoughts / information / guidance would be much appreciated.
Thanks
