[TWR-K60F120M] Going from Debug to Release / Writing to Flash

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

[TWR-K60F120M] Going from Debug to Release / Writing to Flash

Jump to solution
664 Views
michael_wahler
Contributor III

Hi,

I have successfully followed the instructions for writing an application and executing it through the OSJTAG interface (CW 10.6, MQX 4.1).

Now I would like to write the application to flash memory such that it automatically starts when I power on the device. Is there any documentation on how to do this? I could not find anything...

Second question: Do I need to rebuild BSP etc. in release mode in order to program the flash memory?

Kind regards

Michael

0 Kudos
1 Solution
484 Views
michael_wahler
Contributor III

I solved my problem. Actually, debugging the program copies it to the flash memory of the device such that it runs automatically when the device is powered on.

What prevents running the program outside of debug mode is when the BSP expects a debug connection to a PC (as in my case). Jorge from Freescale supported pointed me to this page: https://community.freescale.com/message/391746#391746

However, this did not solve the problem for me, but it pointed me into the right direction. Solution: Replace the line

#define BSP_DEFAULT_IO_CHANNEL                    "iodebug:"

in user_config.h with

#define BSP_DEFAULT_IO_CHANNEL                    "ittyf:"

View solution in original post

0 Kudos
2 Replies
485 Views
michael_wahler
Contributor III

I solved my problem. Actually, debugging the program copies it to the flash memory of the device such that it runs automatically when the device is powered on.

What prevents running the program outside of debug mode is when the BSP expects a debug connection to a PC (as in my case). Jorge from Freescale supported pointed me to this page: https://community.freescale.com/message/391746#391746

However, this did not solve the problem for me, but it pointed me into the right direction. Solution: Replace the line

#define BSP_DEFAULT_IO_CHANNEL                    "iodebug:"

in user_config.h with

#define BSP_DEFAULT_IO_CHANNEL                    "ittyf:"

0 Kudos
484 Views
soledad
NXP Employee
NXP Employee

Hi Michael,

CodeWarrior development environment enables you to have multiple build configurations, called build targets. All projects in the Freescale MQX RTOS contain at least two build targets:

• Debug target - Compiler optimizations are set low to enable easy debugging.

• Release target - Compiler optimizations are set to maximum, to achieve the smallest code size and fast execution. The resulting code is very hard to debug.

For example:

For the TWR-K70, you can download your project into a DDR or SRAM, if you download a project to DDR you can run it after recycle the power no matter if it was build for debug or release.

pastedImage_2.png

I hope this clarifies!!!


Have a great day,
Sol

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

0 Kudos