I know that I am asking a basic question, but I am new to embedded. My questions is about memory in a microcontroller, Tiva C for example.
1/ As I know, heap is the memory that we can allocate and deallocate arbitrarily, stack is the memory that is allocate and deallocate automatically by the controller. Is it right? And, heap and stack is located in flash or RAM?
2/ In a tiva C, the tivaware is stored in ROM. Why this way make our code run faster?
3/ What is the role of RAM, ROM and flash in a microcontoller?
Please help me and thanks for reading. :D