IAREW reports: Can't run to "main"

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

IAREW reports: Can't run to "main"

Jump to solution
758 Views
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?

Tags (1)
0 Kudos
1 Solution
485 Views
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

View solution in original post

0 Kudos
4 Replies
485 Views
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 Kudos
485 Views
kai_liu
Senior Contributor I

Thanks, Kan Li,

I will try it ASAP.

0 Kudos
486 Views
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 Kudos
485 Views
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