Question about errors encountered when using Arduino SDK.
Hi all, I was hoping that I could get your opinions on errors that I have been encountering while developing using the Arduino SDK.
Right now I have a project that sets up provisioning using the WiFiManager library and then sends POST and GET requests to a server using WiFiClientSecure. Now this program is becoming sizeable and as it grows in size, I am running into more and more CPU exceptions such as Exception 3 and Exception 9 when accessing 2D arrays of C strings which according to this table indicates that I am incorrectly accessing memory. I am wondering if this is a user error or just a side effect of creating a larger program.
I have converted most of the instances of arduino/c++ strings to c strings to avoid the heap and allocate on the stack. I am also trying to keep everything out of the global scope and into local function stacks but I am still having some of these error especially when accessing 2D arrays of C strings.
More recently, I am triggering a panic when calling the yield() method.
I should note that I have been modifying the WiFiManager library to reduce memory usage by streaming gzipped files instead of using string literals.
I guess I am wondering if anyone has suggestions on how to approach these problems in terms of determining the root cause and fixing the problems.
If you want the actual code, I can update my git repository with the latest version once I clean things up.
Or if you have some suggestion on a better place to post, I am all ears.
Posted Nov 17, 2016, 5:52 PM UTC
I have no answers, only similar problem. Hope you find your way forward!
Thanks. This is my first embedded project I ever did as well as my first time using the Arduino SDK. I do know C pretty well which I thought would help me. I'm thinking about potentially rewriting from scratch and starting small. Maybe find some tutorials on good practice...I don't know. I'll update this thread if I come up with anything substantial.