"Flash image too large for license" (LPCXpresso 7.1.1) and "Hardfault" (LPCXpresso 7.2)

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

"Flash image too large for license" (LPCXpresso 7.1.1) and "Hardfault" (LPCXpresso 7.2)

585 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DennisFrie on Sat Jun 07 17:13:07 MST 2014
Hi
I've been working on a project for a while in LPCXpresso 7.1.1 and haven't experienced any problems.

Earlier today, I got the error:
"License restriction: Flash image too large for this license".

This obviously seems like a problem with the license, so I've re-activated and un-installed/installed - but with no luck.
Removing any piece of code solves this problem, which would indicate a problem with the license.

I noticed that a new version of LPCXpresso was available and upgraded to LPCXpresso 7.2 instead, hoping that would solve the problem.
Compiling with the exact same code, I now get a HardFault error. Again, removing any piece of code solves the problem, but that's not much help.

Any good suggestions as to what could be wrong?

Setup:
LPCXpresso 7.1.1 [Build 125]
LPCXpresso 7.2 [Build 153]

LPCXpresso 1549 evaluation board and also tested with a 1548 MCU with same result.
0 Kudos
11 Replies

513 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DennisFrie on Mon Jun 09 06:33:14 MST 2014
Found the problem..

Missing environment variables in the "path" for cscript caused the hardfault error.

IMHO that error-report from LPCXpresso is misleading, as the problem is with something else


Thanks for all the input guys, much appreciated!
0 Kudos

513 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Jun 09 00:49:06 MST 2014
I suggest that you first of all investigate why LPCXpresso debug is failing its license check. 95% of such issues are due to the Windows cscript utility not being found. For more information see:

http://www.lpcware.com/content/faq/lpcxpresso/flash-image-too-large

After you have fixed the license issue, you can then investigate your hard fault. Information on how to do this can be found at:

http://www.lpcware.com/content/faq/lpcxpresso/debugging-hard-fault

Regards,
LPCXpresso Support
0 Kudos

513 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DennisFrie on Sun Jun 08 18:22:56 MST 2014
I'm pretty sure the hardfault and (reported) limit in code-size, is caused by the same problem - just different reported error from LPCXpresso 7.2 and 7.1.1.

I tried to re-write everything, but with the exact same result. It's not a specific part of the code that fails, removing any part solves the hardfault error in 7.2 and code-limit in 7.1.1 (using the exact same code).

Decided to install LPCXpresso on another machine and imported the code, that resulted in hardfault and code-limit on my other PC.
It works just fine on this pc- with no problems what so over. Guess I have to look into the license/installation on my other PC. The hardfault-error just threw me off, as it seemed to be related to something else than the license.
0 Kudos

513 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Sun Jun 08 13:14:22 MST 2014
I would guess that both would give the same error...

The license error is because of code size. With the later version, code size is smaller and so squeezes under the limit.

If you get past the license error, you will most probably get the hard fault.

So, you need to investigate 2 issues
- for the license issue, follow the link I provided
- for the hard fault, start debugging... You haven't shown us your code or what you remove to make it work, so we can't help you.
0 Kudos

513 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Sun Jun 08 11:51:23 MST 2014

Quote: DennisFrie
...will try to re-write the code



Perhaps disabling all interrupts and enabling one after another again can lead you to the problem...
0 Kudos

513 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DennisFrie on Sun Jun 08 11:35:05 MST 2014
What had me wonder, is that I get 2 completely different errors when using 2 different versions of LPCXpresso (Using the same code). There's quite a difference between a hardfault error and a license problem..
Removing any part of the code solves the problem in both versions. That would make sense with the debug size limit, but doesn't explain the hardfault error reported by V. 7.2

I've upgraded to LPCXpresso 7.2, installed the fix for interrupt-names and will try to re-write the code, to see if I've made a stupid mistake somewhere.

Thanks for your help so far - I'll let you know if I find the root cause.
0 Kudos

513 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Sat Jun 07 22:15:28 MST 2014
Did you find this
http://www.lpcware.com/content/faq/lpcxpresso/flash-image-too-large

I guess the difference could be that you are not exceeding the licence with 7.2 as it generates smaller code with debug.

You need to
- sort out why your licence is failing
- debug your hard fault.
0 Kudos

513 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DennisFrie on Sat Jun 07 18:51:21 MST 2014
Thanks
Yes, I found the topic with with the error-message I got, but the error was completely different with LPCXpresso 7.2 and I couldn't find anything pointing towards license problems.

Atm. I use LPCOpen :)
0 Kudos

513 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Sat Jun 07 18:25:38 MST 2014

Quote: DennisFrie
Edit: After a search, I guess you are referring to this?
http://www.lpcware.com/content/forum/updated-lpc15xx-startup-files-lpcopen-compatibility



Yes.

Not sure if you use LPCOpen...

Did you read:

http://www.lpcware.com/content/faq/lpcxpresso/flash-image-too-large
0 Kudos

513 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DennisFrie on Sat Jun 07 18:16:04 MST 2014
The license shown is "full" with debug limit at 256K
[img]https://dl.dropboxusercontent.com/u/3947315/LPC_license.png[/img]

The sketch is pretty small, far from the limit
   text   data    bss    dec 
   8156     44    572   8772

I haven't corrected any wrong interrupt names?

Edit: After a search, I guess you are referring to this?
http://www.lpcware.com/content/forum/updated-lpc15xx-startup-files-lpcopen-compatibility
0 Kudos

513 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Sat Jun 07 18:03:37 MST 2014
Which license is shown and which image size is created?

Did you correct wrong LPC15xx interrupt names?
0 Kudos