Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
getting an illegal instruction error and exiting while running on beagle board
Jump...
Cancel
Locked
Locked
Replies
4 replies
Subscribers
119 subscribers
Views
7266 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
getting an illegal instruction error and exiting while running on beagle board
Mahesh Voorugonda
over 12 years ago
Note: This was originally posted on 16th January 2013 at
http://forums.arm.com
Hi ..
I am getting an
illegal instruction
error and exiting while running on beagle board , code i have cross compiled on linux machine, the error is coming at different places for multiple runs, code has no assembly, the same code is successfully running on beagle board when compiled with Code Worrier and executing with TRACE 32 tool,
How to solve this issue any idea...?
Thanks in advance,
mahesh
Parents
Peter Harris
over 12 years ago
Note: This was originally posted on 16th January 2013 at
http://forums.arm.com
Is this an application running under an OS like Linux, or a bare-metal application?
The fact is happens at different places in different runs means that the code-gen is probably OK, and something else is going wrong (if it was a code-gen bug from the compiler it would probably fail in the same place every time). Some random ideas, but hard to say without more detail:
Option one: You have memory corruption and something is trampling the code which is running, or corrupting the stack. Try turning on the MMU and making your code section read-only.
Option two: Your caches are getting into an inconsistent state.
Option three: Could be something like you are handling an interrupt in a different ISA to the program which was running before, and not retuning in a way which is restoring the ISA configuration. e.g. running in thumb, interrupt switches the core to ARM, you handle the interrupt and then jump back into the original code trying to run Thumb binaries in ARM mode.
I'd suggest looking at the fault status register and the SPSR when the fault happens to work out which mode the core was in when the fault happened, and get a bit more data about the fault.
HTH,
Iso
Cancel
Vote up
0
Vote down
Cancel
Reply
Peter Harris
over 12 years ago
Note: This was originally posted on 16th January 2013 at
http://forums.arm.com
Is this an application running under an OS like Linux, or a bare-metal application?
The fact is happens at different places in different runs means that the code-gen is probably OK, and something else is going wrong (if it was a code-gen bug from the compiler it would probably fail in the same place every time). Some random ideas, but hard to say without more detail:
Option one: You have memory corruption and something is trampling the code which is running, or corrupting the stack. Try turning on the MMU and making your code section read-only.
Option two: Your caches are getting into an inconsistent state.
Option three: Could be something like you are handling an interrupt in a different ISA to the program which was running before, and not retuning in a way which is restoring the ISA configuration. e.g. running in thumb, interrupt switches the core to ARM, you handle the interrupt and then jump back into the original code trying to run Thumb binaries in ARM mode.
I'd suggest looking at the fault status register and the SPSR when the fault happens to work out which mode the core was in when the fault happened, and get a bit more data about the fault.
HTH,
Iso
Cancel
Vote up
0
Vote down
Cancel
Children
No data