I am getting following exception- Please let me know the cause of it.How to avoid this Abort Exception?Thanks in advance.
Thread Name: HSV
Thread Stack Start Address:00375908
Thread Stack End Address:00378107
Program Counter :0811AE08
Stack Pointer :042B1EB0
Current program status Register :00000097
Is it NET+OS? did you try recovering the device?
Explained in Help Docs.
Digi ESP for NET+OS User Guide > 2. Tasks > 2…7 Recovering a NET+OS Device
Thread name HSV refers to the web server (AWS). Generally an AWS crash would be associated with a “stub” function. Take a cloise look at your stub functions and ensure that your pointers are ok and that you are not writing off the end of a string or buffer.
You should also look at your root stack and ensure it is large enough.
Getting back to yoru stub functions, do you define a large amount of stack memory in your stub functions? Doing so could blow the web server’s stack space.
Yes, It is NET+OS. I am getting this while sending a string on Serial Port 2. (in Debug mode).
Check your code itself… Could be some pointer access issues. Which NET+OS version are you using? make sure you have all latest updates.
After updating you have to start ESP with “-clean” and create a new project , copy all your relevant files.
rebuilding will not help as the updates won’t update existing workspace.
Abort Exception means almost always corrupted memory, especially if it happens in system code and not in your own. Are you able to reproduce this in the debugger?
in that case:
You can put breakpoint in inti.s– use DIGI ESP debugger’s console (it’s a regular gdb console actually and it accepts regular gdb commands)
etc to set breakpoints
Once you will get an exception , you will hit one of those breakpoints and you will know what exception did you get. Once this happens, look at the link register (LR) - go to the instruction that is on address pointed by the LR - you may have to switch to mixed mode where both C and assembly language instructions are displayed. Once you there, put a breakpoint on the previous instruction - this is the line that caused look and try to figure what this instruction is doing. If it is not HW exception, you can look at the call stack when you hit your breakpoint at customizeExceptionHandler() and try looking at the call stack at this point in DIGI ESP.