How running code from FLASH on KDS 3.2.0

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

How running code from FLASH on KDS 3.2.0

940 Views
didierjeanjean
Contributor III

Hello from France

I search in the community and in Eclipse under KDS 3.2.0 and documentation, and i find nothing about how to run code from FLASH.

By default KDS run code from RAM and i need to know the reason to run code from RAM instead of FLASH.

 

I understand  that it is usefull to RUN in RAM in Debug mode to place debug tag in code without wearing the FLASH, but i don't understand why running from RAM when we are in Release mode  ? 

And even in Debug and Release mode It seem to me mandatory to run code from FLASH, because we have near always much more FLASH than RAM.

 

In all case is somebody know  where

 

 

 

In my case and for many application it is very important to use only RAM for data and running code from FLASH,

With CodeWarrior the choice is very easy and visible but in KDS  nothing ?

Labels (1)
0 Kudos
8 Replies

702 Views
didierjeanjean
Contributor III

Excuse me the message is starting inadvertently
before I reread me and added a thank in advance to the person who can help me.

0 Kudos

702 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello JEANJEAN,

If your project with processor expert on KDS, you can directly chose "RAM" OR "FLASH" :

pastedImage_1.png

If not , i think you can refer to the linker file which PE project generate to configure.

pastedImage_2.png

Hope it helps


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

702 Views
munirajgopal
Contributor I

Hi Alice,

I am using MKL17Z32 microcontroller, PE doesn't support this processor. In that case how to choose RAM/Flash.

Folder structure in my project explorer is different than what you shown. I am using KDS ver3.2.

See the attached folder structure in my project explorer.

Thanks for your support.

Capture.PNG

0 Kudos

702 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Muniraj,

- For the MKL17 chip only has 8KB SRAM, it is so small , so we do not save

the code to SRAM.

On CW, for the kineits L series that have small SRAM, there is not the selection for "RAM",

 there is only "FLASH" , for example the chip of MKL26 :

pastedImage_1.png

-  And i checked your question again, do you want to start from FLASH ?

If yes, the project on KDSv3.2 is just start from flash :

pastedImage_2.png

Hope it helps

Alice

0 Kudos

702 Views
munirajgopal
Contributor I

Hi Alice,

Thanks for your reply.

Yes we need to run from flash.

Actually we built a custom board using KL17Z controller and working on

developing the application code for a DC - DC converter.

The code functions as expected in debug mode as well as immediately after

flashing the code & if not power cycled.

But in standalone mode, the controller starts functioning only if we do the

hard reset (resetb port) the controller. I don't know why the controller

needs hard reset. we are using RC (10K & 0.1uF) circuit as recommended by

the NXP.

Plz help me to figure out a solution for this issue.

Thanks,

Muniraj

On Wed, Aug 31, 2016 at 9:07 AM, Alice_Yang <admin@community.freescale.com>

0 Kudos

702 Views
didierjeanjean
Contributor III

Hello Muniraj Gopal,

Hello Alice,

Fisrt, thank you very much to Alice and Muniraj for your response.

Muniraj, for the reset issue you have, i can say to you that i use K22F and this microcontroler start with no problem in debug with OpenSDA probe and release with no OpenSda probe and i connect  /RST to 4.7K to Vcc and 100nF to Ground .

For the question about the FLASH , i must say that i use JKDS 3.2.0 and SDK 2.0 that exclude the use of Processor Expert, this is actually a limitation of KDS. And in that case i found nothing even in the linker parameter to run from FLASH.

Muniraj, yes the startup code start in FLASH memory and there is no choice for startup, but after it load all FLASH code in RAM and run from RAM. You can verify this in the console  where "dec" is the total Byte in RAM, ("dec"=98792 can't go over 128K with  K22F evant if i have 512K of FLASH and this seem a bit nosense for me)

pastedImage_1.png

0 Kudos

702 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Didier,

About the place of  "text  data bess ", you can refer to this DOC :

https://mcuoneclipse.com/2013/04/14/text-data-and-bss-code-and-data-size-explained/ 

BR

Alice

0 Kudos

702 Views
didierjeanjean
Contributor III

Sorry but i send another time my document inadvertently  because i am used to use Crtl+S to save my work regularly and in this case it send the message and this is not cool.

I thought about the problem better and it seems that the code is not loaded and launched in RAM. In fact I have another problem? However, this does not change the fact that with KDS3.2.0 SDK 2.0 there is no solution  to select the RAM or FLASH as permitted Processor Expert. This seem a limitation of the SDK2.0.

Best regards and thanks for yours help.

0 Kudos