FRDM-KL25Z bootloader stops at the ResetMCU function when i use AN2295 SW.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

FRDM-KL25Z bootloader stops at the ResetMCU function when i use AN2295 SW.

6,541 次查看
eunseokjung
Contributor II

Hi, all.

I'm practicing the bootloader system nowadays. I read the AN2295 application note for building bootload. And, i also download the AN2295 SW for practice.

First, I modify the bootloader_cfg.h to matching the Kinetis L seires. Also, I modify MEMORY size in the AA295_LinkerFile.Icf.

Build is running without problem.

But the problem is when i start the debug, it always stops at the main function or Boot_RsetMCU function.

Except the bootloader_cfg.h file, i didn't touch AN2295 SW file. (I changed baud rate from 115200 to 57600)

I'm using FRDM-KL25Z and Codewarrior 10.3.

Do you have any idea?

Best,

Eunseok.

I noticed that it caused by Hard Fault.

But i'm not sure what is hard fault and why it occured.

Could you help me?

标记 (1)
0 项奖励
回复
3 回复数

6,400 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Eunseok Jung,

This question has been answered with the root cause and some alternatives in the next thread, please give it a check:

an2295sw usage


Regards!,
Jorge Gonzalez

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

0 项奖励
回复

6,400 次查看
eunseokjung
Contributor II

Hi Jorge.

I read which your link web site.

As a result, fresscale don't provide Codewarrior version bootload SW.

Your link web site is not matched in my situation. I want to make code by using CW 10.3.

Do you know when the freescale provide CW10.3 bootload SW?

Or I think i can use AN2295 SW if i modify just little bit. CW bootload code and IAR bootload code are almost same. Is it right? If it is true, i just modify entrance of program. Do you have any idea how to modify this?

I really really look forard that.

Thank you.

kinetis_params.h file said:

#if defined(__CWCC__)

//  #error The Code is not prepared for CodeWarrior (it will be done with version 10.3 due to Kinetis L)

//#elif defined(__GNUC__)

#elif defined(__IAR_SYSTEMS_ICC__)

  #define CONST_FIX_VECTORS        __root const

  #define CONST_FIX_VECTORS_END                

#elif defined(__ARMCC_VERSION)

  #define CONST_FIX_DATA        const

#else

  #error Not supported compiler type

endif

If i modfiy CWCC area, can i use this with out error?

0 项奖励
回复

6,400 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Eunseok Jung:

Unfortunately the AN2295 bootloader will not be updated to support CodeWarrior.

It is possible to use the existing source code for Kinetis KL25, but not with the same project, because that project is using the Legacy Freescale compiler/linker for Kinetis. You need to create a new project for KL25 so the GCC build tools are used instead. Then recreate the startup code and copy the bootloader files and drivers to your new project, while modifying any necessary files to make it work with GCC. I could not say a specific list of changes since I do not know the AN2295 project so deeply.

Altough it is possible, I would not recommend you to take the pain to do it, mainly because there are other UART bootloader alternatives, as those mentioned in the other post.

Additionaly, in that post I forgot to mention the new Kinetis KBOOT, which is already available for KL25 and it includes UART interface as bootloading option. For details and download this is the link:

Kinetis Bootloader|Freescale

Regards!

Jorge Gonzalez