KL03 KDS "m_data" errors

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

KL03 KDS "m_data" errors

662 Views
kehanqin-b46569
NXP Employee
NXP Employee

I’m creating a KL03 PE&SDK project in KDS 2.0, only add a lpuart component, define and configure struct in main, just trying to print “hello world”. Then build cannot passed with errors. Report that “m_data” overflowed.

 

17386_17386.jpgm1.jpg

Searched in files, found it here below and try to add the length(default is 0x00000600), then build can be passed, but will stop at “reset_handler” after download.

17387_17387.jpgm2.jpg

17388_17388.jpgm3.jpg

I once met the “m_data” issue on KE04 with MQX-LITE, but this one I even no change anything about the osa setting.

So could your guys take a look about this? Thanks a lot!

Code attatched.

Original Attachment has been moved to: KL03-UART-TEST.zip

Labels (1)
Tags (3)
0 Kudos
2 Replies

354 Views
BlackNight
NXP Employee
NXP Employee

Hello,

The 'm_data' message means that your program uses too much of RAM, do it does not fit into your available RAM area.

You can extend the size of RAM in your linker file, just to get it linked, so you can check what is using that excess amount of RAM.

However, you then cannot download that program to the board as it indeed has that limited amount of RAM. That's why you get that TRAP in your debugging session.

It seems that you are using printf() in your application. The problem with printf() is that it is very RAM hungry, and it needs some HEAP too. So better if you do not use printf() or its variants with a device which has not much RAM.

See Why I don’t like printf()

On the other end, the current library implementation in Kinetis Design Studio needs more HEAP than e.g. the launchpad tools. So if you really want to run printf() on your device, I recommend that you use KDS with the launchpad.

How to do this is described in Switching ARM GNU Tool Chain and Libraries in Kinetis Design Studio

I hope this helps,

Erich

354 Views
kehanqin-b46569
NXP Employee
NXP Employee

Hi, Erich

OK, now I get more clear, will see these two articles in detail, thanks a lot!

Best Regards

Kehan

0 Kudos