error stopping at main. Reason: target request failed: Failed to set breakpoint

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

error stopping at main. Reason: target request failed: Failed to set breakpoint

1,435 Views
ryanlush
Contributor IV

I am trying to program a K64 Freedom board with a JLINK and I get this error every time with the option to continue. If I continue it kinda looks like it programs but its way off in the weeds. I can't even see any disassembly and it's halted at what appears to be a random address.

My debugger is setup for SWD with the k64.mem file. I can erase the device with the flash programmer and the same configuration but never have I been able to program the device. Not sure what more information to provide right now. Help me help you help me :smileyhappy:

0 Kudos
Reply
7 Replies

994 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

Which IDE software are you using?

Have you tried with NXP provided demo project for FRDM-K64F board?

Customer could find the NXP provided demo project at KSDK V2.0 or K64 bare-metal project.


Wish it helps
Have a great day,
Ma Hui

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

0 Kudos
Reply

994 Views
ryanlush
Contributor IV

I am not able to build the example projects I have tried to build. They complain about "orphaned configurations." I was able to create a project with processor expert and debug it on the target. Neither really solved my problem.

0 Kudos
Reply

994 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

For you could debug the new created Processor Expert project, the debugger interface hardware should be worked.

I checked the KSDK software doesn't support CodeWarrior MCU IDE software.

Customer could download and check with NXP MQX RTOS 4.1.0 for the FRDM-K64F software if J-Link works well with this software.


Wish it helps
Have a great day,
Ma Hui

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

0 Kudos
Reply

994 Views
ryanlush
Contributor IV

But I'm not using the KSDK so I don't see how this is relevant.

As it sits I am unable to use the K64 freedom board with Code Warrior but it works with the IAR example projects. I would much rather run my k20 software on the k64 than rewrite the whole thing from scratch. Any help would be appreciated.

0 Kudos
Reply

994 Views
BlackNight
NXP Employee
NXP Employee

Hy Ryan,

you dont' have to rewrite things from scratch. I believe your linker or debugger configuration files are wrong.

I recommend that you start with a new project with the wizard (File > New > bareboard project...) and then verify that this is debugging properly.

Then add the source files to that project.

I hope this helps,

Erich

0 Kudos
Reply

994 Views
ryanlush
Contributor IV

Wow, you answered my question in 2 places! Thanks!

I have tried using processor expert to setup the bare minimum. When I did it using the freescale compiler I was able to debug when I did it using GCC I was not able to program. The code I want to run on here is written in GCC so this is really what I need to see working.

I always get the "unable to write reg" errors when I try to program so it seems likes its getting stuck in the kinetis_init.tcl script.

0 Kudos
Reply

994 Views
ryanlush
Contributor IV

I am using the latest Code Warrior IDE

0 Kudos
Reply