We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi I am trying to catch exceptions that are causing my micro to crash (LPC2138). In the Startup.s assembly module, I have tags for: do_undefined_instruction: do_prefetch_abort: do_data_abort:
I am trying to set a variable that I can access later in main.c so I can check which exception caused the crash (and cannot use JTAG). I have tried the following (using GNU)
[In Startup.s] .global source
[during reset]
do_reset: ...... .equ myVar,5
However, I just get rubbish. I am thinking this is because Ram etc. is initialised in the later part of startup.s
(?). However, I will need to set the variable before this happens. Any assistance would be greatly appriciated.