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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
687件の閲覧回数
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 件の賞賛
1 解決策
507件の閲覧回数
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 件の賞賛
2 返答(返信)
508件の閲覧回数
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 件の賞賛
507件の閲覧回数
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 件の賞賛