K60 USB MSC host bootloader - Download size exceeded??

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

K60 USB MSC host bootloader - Download size exceeded??

Jump to solution
2,705 Views
dmarks_ls
Senior Contributor I

So, I'm having a go at putting the USB mass storage bootloader (as documented in AN4368) into my K60 tower kit.  I followed the instructions provided, built the "kinetis_k60" project successfully, generating a kinetis_k60.afx file (350KB or so).  I then defined the debug configuration, saved it, and launched it.  After (yet another) OSJTAG firmware upgrade, it began to load the project... and bombed out.  Message:

 

'Launching debug_bootloader' has encountered a problem.

Failed to resume target process., Download size limit has been exceeded.  Please check your license.

 

Say what?  This is a bootloader, probably the smallest piece of code you can cram in there.  So I check my license, and my dongle-locked CW Basic license is good for another 291 days.  With a Basic license, I can download up to 512KB.  So somehow, the IDE thinks I'm downloading more than that?

 

Has anyone run into this?  What am I doing wrong here, exactly?

1 Solution
1,024 Views
dmarks_ls
Senior Contributor I

Solved.  From Freescale Support:


We found the cause of the issue, here is the explanation:

 

"The problem is not with the code size limit, but with the C++ generated code. The basic license does not allow downloading C++ code.  The code was compiled with “Enable Exceptions” option (Tool Settings / ARM Compiler / Language) and this option generates some C++ code (There is no license check in the compiler to prevent this).

 

The solution would be to rebuild the project without “Enable Exceptions”.

 

To do so you need to go to project properties, then uncheck this option in the compiler language section.  Refer to attached image.  [attached]


So, there you go.  Had nothing to do with code size, had everything to do with exceptions inadvertently generating C++ code.  Bet you wouldn't have found that in a million years.

View solution in original post

7 Replies
1,024 Views
J2MEJediMaster
Specialist I

I suspect that something's happened to your license and the tools think you're running the special edition, which has a much smaller code size limit. I can send you a temporary license to your registered e-mail address and if that clears the problem, then something's gone wrong with your license.

 

---Tom

0 Kudos
1,025 Views
dmarks_ls
Senior Contributor I

It doesn't appear anything is wrong with the license.  Here is what CW 10.1 reports:

 

Detail information for product "MCU" version "10.1.13"
status: "License expiring in 290 day(s)."
License model: "class com.freescale.core.ide.license.flexlm.FlexlmActivate11"
Contact Email: licensing@freescale.com
Register URL: http://www.freescale.com/cwregister
Purchase URL: http://www.freescale.com/cwmcu10
FlexLM Eval Period: 15 day(s)
GTL Server: gtlsrvr.metrowerks.com
GTL Port: 80 (8,080)
Wants Host ID: true
License file path: C:\Freescale\CW_MCU_v10.1\MCU\license.dat
flexlmFileLocator: null
flexlmFile: ${MCU_TOOLS_HOME}/license.dat
License file URL: file:/C:/Freescale/CW_MCU_v10.1/eclipse/../MCU/license.dat
Error String:
Feature Keys:
FEATURE BasicEditionMCU 10.0, status : 290 day(s)
Alternate Keys:
(no keys)
LM_PATH=null

 

It's recognizing I have the BasicEdition, which has a 512K limit.  But c'mon, this is a bootloader, it should fit in the 128K limit anyway.  Exactly what criteria does the tool use to determine whether a particular image has fallen outside the predetermined limits?  What should I be looking for in the MAP file?  (attached)

0 Kudos
1,025 Views
dmarks_ls
Senior Contributor I

No help?  Time to file a support ticket, then.

0 Kudos
1,025 Views
kp2309
Contributor I

Hey drogers,

 

I m facing the same problem

Is it resolved? If yes can you share the solution please

 

-KP

0 Kudos
1,025 Views
dmarks_ls
Senior Contributor I

Solved.  From Freescale Support:


We found the cause of the issue, here is the explanation:

 

"The problem is not with the code size limit, but with the C++ generated code. The basic license does not allow downloading C++ code.  The code was compiled with “Enable Exceptions” option (Tool Settings / ARM Compiler / Language) and this option generates some C++ code (There is no license check in the compiler to prevent this).

 

The solution would be to rebuild the project without “Enable Exceptions”.

 

To do so you need to go to project properties, then uncheck this option in the compiler language section.  Refer to attached image.  [attached]


So, there you go.  Had nothing to do with code size, had everything to do with exceptions inadvertently generating C++ code.  Bet you wouldn't have found that in a million years.

1,025 Views
kp2309
Contributor I

Thnx a lot 

I will try the same thing with my code.

 

-KP

0 Kudos
1,025 Views
dmarks_ls
Senior Contributor I

Not yet, no; the Freescale support person who answered my ticket sent me a walkthrough video of how to debug the bootloader, which contained no surprises, and he also sent me a temporary Pro license key, which did allow me to launch the debugger on my end.  I let him know this and asked why I have a license issue in the first place.  I mean, the Kinetis chip on the Tower Kit is a 512K part; a Basic license has a limit of 512K.  How can I possibly be over that limit?

 

Anyhow, I'll keep you posted on what I find out; watch this space.

 

(And for those suggesting "Well, maybe CW isn't recognizing your basic license" - it does, it sees that I have 280 days left, and it identifies the license as Basic level.  If my license were invalid, CW would have stopped working a couple of months ago.)

0 Kudos