As per the information shared, you have already included the header file(<string.h>), which contains strtok and memcpy functions.
Can you please let me know if you are getting any warnings when you build your project?
Also, you have mentioned that the program execution stops. Can you try entering Debug mode and send a screenshot of the call stack so that we can get to know where exactly it stopped.
Can you please share your project? This will help us get more insights of the issue you are facing.
Thanks Aashita for reply.
In debugging I reached above place.
I also didn't get any warning regarding this issue.
when I included source code of strtok in same c file and also includes above header files. then code not stuck. I surprised that there is no duplication error of function. I done same for memcpy, and it works.
Please help if you have any idea regarding it.
May be there will no source definition for these functions or may be not defined in compilation.
Have I to declare some define in compiler setting to access them?
2 of 2 people found this helpful
Thanks for sharing the screenshot. This error occurs generally when you are trying to access a memory which is not allotted or if there is a stack/heap overflow.
I used the device CY8C4245AXI-483 to run a similar code using PSoC Creator 4.3 to see if I can reproduce the issue from my end. I was able to program and execute the code successfully.
I have attached my project. Can you please try executing the project and let me know if you are facing the same issue?
If the problem continues, can you please share your project?
Thanks again Aashita.
Sorry I am not able to post the code as it is ported code from other controller and remove extra parts is, too lengthy , but I will try your code to get error.
I also get same issue if I use localtime() function from time.h