M0_NMI_Handler

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

M0_NMI_Handler

485 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IanB on Tue Sep 22 02:25:01 MST 2015
Upgraded to 7.9.2 because I was so glad to have the RESET function back again.

However, it now takes every perfectly good working project and renames the debug.ld file as debug_old.ld and creates a new debug.ld file which has an error in it:

P003b_Debug.ld:118: undefined symbol `M0_NMI_Handler' referenced in expression


I delete the new one, and try to rename the debug_old.ld as debug.ld but it won't let me.

So, I turned off "managed linker scripts" and edited debug.ld back to the old version, but do I really have to do that for every project?

Solution?



0 Kudos
Reply
5 Replies

461 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed Sep 30 05:24:09 MST 2015
So your issue is that you do indeed have your own startup code, written in assembler.

The Managed linker script expects the names of the standard Cortex-M exception handlers to be visible from your application code, but in your case these symbols only have local within file visibility.

The simplest way to fix is thus to change your code so that the standard Cortex-M handlers have global scope, e.g.:

.thumb_func
.type NMI_Handler,%function
.global NMI_Handler
NMI_Handler:
b .


Alternatively, use the technique I suggested previously of providing a dummy "checksum.ldt" Freemarker linker script template file.

Regards,
LPCXpresso Support
0 Kudos
Reply

461 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IanB on Tue Sep 29 13:33:39 MST 2015
Here's a small project (LPC1111) - the error message seemed to show up whatever project I tried to debug.

Good luck with fixing Restart for the mac - so nice not to have to recompile every time I need to restart the code from the beginning!
0 Kudos
Reply

461 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Sep 29 12:29:59 MST 2015
I'm afraid, nothing will be fixed in a future release unless you provide sufficient information to reproduce the problem. Can you provide a test project that shows up the problem

https://www.lpcware.com/content/faq/lpcxpresso/how-importexport-projects

or at least provide the generated .ld files, your startup file, the linker map file and build log?

https://www.lpcware.com/content/faq/lpcxpresso/build-console

PS : What "Restart" option are you referring to? If you are using a Mac, then yes Restart is still disabled because we are still awaiting a fix in the underlying GDB and have been unable to find a workaround in the higher level IDE. In the meantime, try using the QuickStart Panel's "Terminate, Build and Debug" option. Not quite as good as just using "Restart", but it does help speed things up a little.

Regards,
LPCXpresso Support
0 Kudos
Reply

461 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IanB on Tue Sep 29 11:24:10 MST 2015
No - it's an LPC1111.

I found an easier fix. When I discovered that the "Restart" option had not been reinstated  (the button was no longer greyed-out but still didn't do anything) I simply re-installed the previous version without the M0_NMI_Handler problem.

Hopefully, it will be fixed in 7.9.3
0 Kudos
Reply

461 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Sep 22 09:27:24 MST 2015
So I assume that you have an LPC43xx M0 slave project?

Anyway, I imagine that error is being triggered because you are using non-standard exception handler names in the startup code for your project (i.e. your names don't 100% match those in the standard LPCXpresso generated startup code).

The actually error is being generated by the new Freemarker linker script mechanism and its ability to auto-generated checksum words into the vector table - which you non-standard startup code is "breaking". For more information, see:

[list]
  [*]https://www.lpcware.com/content/faq/lpcxpresso/checksum-in-image
  [*]https://www.lpcware.com/content/faq/lpcxpresso/freemarker-linker-script-templates
[/list]

I suspect the simplest way to workaround this issue (other than mod'ing your startup code) would be to create an empty file called "checksum.ldt" and placing it into a folder called "linkscripts" within your project.

Regards,
LPCXpresso Support
0 Kudos
Reply