Part Number: CCSTUDIO-C2000
Hello everyone,
I have a very long nested switch-case branch (about 5000 lines of code). I am trying to understand how the compiler creates the jump table. For me the switch-case branch is a piece of program. Therefore the jump table must be in the section .switch and this section is logically in the program memory. But in "compiler user's guide"
the statements about it are very different and partly contradictory.
On the page 146 it is to be read that the jump table is in the section .econst (this section is in the program memory).
On the next page 147 you can read that the jump table is in the section .switch. And this section is in program memory if -unified_memory-option is on. Otherwise it is in the data memory. Without my doing the jump table (a piece of program code) is in the data memory. I can't understand that.
Can someone explain me how the compiler creates the jump table for switch-case branch and where exactly is the jump table placed? And in my case (very long switch-case branch), how can I do best?
Many thanks in advance - Bui