Hi all.
I have an enum data type having memory names(Eg. HCORE1) and their addresses assigned to them.
typedef enum{
HCORE1='h60000;
HCORE2='h50000
}memory;
I have to take user-input from command line in the form of string(HCORE1) and pass that input into a task(placeholder in task for the input is src_addr which is int type)
What I did was I created a variable(temp) for the enum, i.e. memory temp;
The command line string got stored into a queue, q1. so q1[$]=HCORE1
Now I printed q1[0] using %s identifier. Prints HCORE1. That’s correct.
**I want to assign the q1[0] to temp, and since one is enum type ad the other is string, I cast it, but the casting is failing.
The address for HCORE1, i.e.'h60000 has to be passed into the task. But since the casting between temp and q1[0] is failing, the task is not properly taking any address inputs.**
Why is this happening?
Any way to achieve what I want to do?
Thanks!