![](https://static.wixstatic.com/media/3b5532_003e4441be6b4d628726a7b9777c5a67~mv2.png/v1/fill/w_200,h_200,al_c,q_85,enc_auto/3b5532_003e4441be6b4d628726a7b9777c5a67~mv2.png)
This post contains a picture from p.44 of Lattice's January 2017 Programming Tools User Guide [link] does a good job showing the spatial and runtime properties of many programs written in C/C++ that run on embedded systems:
![](https://static.wixstatic.com/media/3b5532_6190a8877ea740f6b46d7caefd141409~mv2.png/v1/fill/w_980,h_598,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/3b5532_6190a8877ea740f6b46d7caefd141409~mv2.png)
There are many other great diagrams showing how the code that these diagrams are describing works. I highly recommend taking a look. The code is available by downloading and installing Lattice Diamond from [link] and should be a good resource for learning how programs for embedded systems work.
References
Lattice logo from [link]