IAREW reports: Can't run to "main"

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

IAREW reports: Can't run to "main"

跳至解决方案
940 次查看
kai_liu
Senior Contributor I

I am evaluating AN2295 serial bootloader on FRDM-KL25Z with IAREW650.

Before debugging, I change debugger to PEmicro - OpenSDA, nothing more. When I start to debug, the IAREW reports: Can't run to "main".

And it has no main(), it has only __main().

What else should I change to debug the AN2295 code?

标记 (1)
0 项奖励
回复
1 解答
667 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Kai Liu,

You are welcome!! Please kindly let me know if you have any issue.

Have a nice day!!

Best Regards,

Kan Li

Technical Information & Commercial Support AP (Kinetis/ColdFire)

Freescale Semiconductor (China) Limited Shanghai Branch Office

在原帖中查看解决方案

0 项奖励
回复
4 回复数
667 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Kai,

First, you have to set the correct debug interface , for example, like below:

1.PNG

and you have to select the proper flash loader:

1.PNG

With the above settings, you may start to debug the AN2295 demo.

1.PNG

BTW, please kindly install the OpenSDA patch for IAR in the attachment.

Hope that helps,

B.R

Kan

0 项奖励
回复
667 次查看
kai_liu
Senior Contributor I

Thanks, Kan Li,

I will try it ASAP.

0 项奖励
回复
668 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Kai Liu,

You are welcome!! Please kindly let me know if you have any issue.

Have a nice day!!

Best Regards,

Kan Li

Technical Information & Commercial Support AP (Kinetis/ColdFire)

Freescale Semiconductor (China) Limited Shanghai Branch Office

0 项奖励
回复
667 次查看
kai_liu
Senior Contributor I

Hi, Kan Li,

Thanks for your information, here is my update for this issue.

Change Debugger to PEmicro

Debugger_PEmicro.PNG

Enable Debugger download options. (Very important, it seems the root cause)

Debugger_Download.PNG

Change P&E hardware interface to OSJtag to OpenSDA (it seems we don't need the patch, since EWARM 6.50 has  supported OpenSDA already).

Debugger_PEmicro_option.PNG

Start debug session.

It reports same issue as well.

Stack_Warning.PNG

Then I changed run to main as run to '__main'.

No complaints.

When there is no user application in the flash memory, the bootloader seems always come back to __main. I will evaluate this operation with a simple user application.

Thanks for your support.

Currently, my project for KL25Z interface to Android device (GAP, as Generic Android Perpheral) is almost finished. I am trying my best to make it a complete solution available to market, with bootloader (UART and USB MSD in future), demo firmware and demo application on Android, as well as necessary documentation.

I hope to get more support from Shanghai office.

UPDATE

The AN2295 related document is shared at FSL community:

https://community.freescale.com/docs/DOC-95429

Yours sincerely

Allan K Liu