Can anyone create a simple working project for me?

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

Can anyone create a simple working project for me?

Jump to solution
1,255 Views
randenewberry
Contributor IV

I posted the below earlier because the project was running so I marked it as solved..but the error is back again. but this time a little different..

First, I know it was running because I added the code to make a variable = to 10 if it was 0 (initial state), and it worked..BUT...

The Debug failed with the same error (No source available for "0x4d8") after I used Processor expert to create 1 input and 1 output.

The difference now is that when the debugger starts it does stop at a "temporary break point" and provides the green resume button to continue..

I am wondering if anyone can send me a simple example..maybe toggle an LED on PTD7 (that is what I was trying to do),

Also I noticed the attachments I included in the original did not show up in the discussion, any advice on how to include an attachment would be helpful.

 

Thank you

 

BELOW IS ORIGINAL POST..

My Coder retired, and I'm taking over for now..I'm new to C, but OK with assembler.

I'm using: KDS3.0.0 and SDK 1.3.0, Win8 machine, debugging with a P&E Mutlilink Universal, with SWD

I was left with a working project using an MK20DX128VLH7_QFP64, which I can run, edit and debug with no problems, so I feel confident the tools are OK.

My new project:is a custom PCB uses an MK02FN64VLH10_QFP64

Problem is I can not create a simple project without getting the error:  No source available for "0x4d8" in what looks like a C file when I try to debug.

Here are the steps I used to create a new project:

Created new Kinetis project, Named it SR3kD, kept default location. Clicked next

Selected processors> Kinetis K >MK0x > MK02FN64xxx (my processor is MK02FN64VLH10, in a QFP64 pin package) Clicked Next

Kept defaults: KSDK_1.3.0 and Absolute path checked, Selected Processor Expert, kept defaults: use current perspective and Standalone Clicked Next

Kept Default GNU C compiler Clicked Finish.

 

I modified Main.c by un-commenting out the endless loop example:

/* Write your code here */

for(;;) { }

 

Compiled the project, no errors

 

Selected Debug Configurations > GDB PEMicro…> Highlighted SR3kD_Debug_PNE (I am using a P&E Multilink Universal)

Then click the Debug button at the bottom.

 

The debugger launched and ran (I did not need to click the green resume arrow..)

Program appears to be running: except the Red message No Source available “0x4d8, in a “c” file of the same name.  Attached PIC 1

I put a break point at my endless "for loop" in Main.c…never gets there.

When I pause the program, it crashes.

No resume, no Pause, no steps..Attached PIC2.

 

Can anyone help here?

 

Message was edited by: Rande Newberry After a dozen or so attempts since I posted this, using the same project, the debugger locked up, and I was not able disconnect or anything, so I closed the project, reopened it, and was able to "remove all disconnected" that was still in the debug window, launched debug (just clicking the bug), it said no recent launches, (which was a new message..first time I seen this) and it did not start the debugger.So I used the Debug configurations window, and its now worked! I've been at this for days, have no clue what caused it to start working. temporally same problem came back after I used Processor Expert to add 1 input and 1 output port..

Labels (1)
0 Kudos
Reply
1 Solution
932 Views
randenewberry
Contributor IV

David, I missed the pin_mux:PinSettings Component..

It seemed like PE created all the necessary files, Pin definitions and GPIO initialization per the manual, and assigned the pin as an output as it seems..

Anyway Thank you very much for the assistance!.

View solution in original post

0 Kudos
Reply
7 Replies
932 Views
BlackNight
NXP Employee
NXP Employee

Hi Rande,

the "no source availble..." message comes from this:

- the debugger is asked to stop or show the source file for a given address (0x4d8 for example)

- the debugger scans the debug information in your .elf file which object (function, well, source information (file name, line number)) is at this address. Kind of information what is in the linker map file (well, the debugger has more details)

- if the debugger does not find that source information, it shows that message

Reasons that it cannot find the source information are many. The most obvious one is that you have removed the debug information from the .elf file, or that you have created the object files and .elf file without debug information.

Another case is that there is the debug information, but the source file has been moved or cannot be found.

Or that you are not debugging what you mean you are debugging: for example you are debugging an application on the board which does not match the binary/elf file on your host PC. Making a Project > Clean followed by a full build should solve that problem.

Or that you are trying to debug code of the GNU ANSI and runtime library (which typically does not include debug information).

I hope this helps,

Erich

0 Kudos
Reply
932 Views
randenewberry
Contributor IV

Hi Erich,

I created a new project, Clean project, Build Project.

I started debug and it did not crash.

I added a statement to change a variable from 0 to 10, and it changed

OK, so I know it was running.

I configured 1 pin PTD7 as an output, compiled OK but crashed upon

Debug, same error:

Can I send you the program, maybe you can see something?

Please let me know.

Rande Newberry

H-ITT, LLC, a Hyper-Interactive Teaching Technology Company

420 Shearer Blvd.-Cocoa, FL, 32922

PH: 888-322-0089

rande@h-itt.com

0 Kudos
Reply
932 Views
DavidS
NXP Employee
NXP Employee

Hi Rande,

Did you enable clocking to the Port D before trying to program the pin?

Kinetis defaults to most peripherals disabled.  Accessing the registers of a disabled peripheral causes hard fault (loss of debugging).

Regards,

David

0 Kudos
Reply
932 Views
randenewberry
Contributor IV

Hi David,

I'm using Processor expert, and I do not see any option to "enable

clocking to a Port".

Where could I find this option?

Thank you for the help!

Rande Newberry

H-ITT, LLC, a Hyper-Interactive Teaching Technology Company

420 Shearer Blvd.-Cocoa, FL, 32922

PH: 888-322-0089

rande@h-itt.com

0 Kudos
Reply
932 Views
DavidS
NXP Employee
NXP Employee

Hi Rande,

To verify your setup, you are using KDS_3.0+KSKD_1.3+PE for a MK02FN64VLH10 Kinetis device.  Correct?

If yes, then attached is a quick example of setting up the PTD7 as an output GPIO signal.  Note I haven't tested on hardware...don't have K02.

I setup the pin as a GPIO output in the pin_mux:PinSettings Component.  I then added a gpio1:fsl_gpio Component and disabled the Input features, then changed the Output pins default pin to be PDT7 and un-checked the Open Drain.

Then added simple infinite loop in main to toggle PDT7.

I am using the default clocking mode as fyi.

Regards,

David

0 Kudos
Reply
932 Views
randenewberry
Contributor IV

Hi David,

It is running!

I am going to try and duplicate what you describe about how you set up

the port..

I was using PE classic view, it created all the files described in the

manual for the GPIO Peripheral driver, and I did find the component

init_GPIO where the clock was disabled, but enabling it did not fix the

problem.

Thank you very much!

Rande Newberry

H-ITT, LLC, a Hyper-Interactive Teaching Technology Company

420 Shearer Blvd.-Cocoa, FL, 32922

PH: 888-322-0089

rande@h-itt.com

0 Kudos
Reply
933 Views
randenewberry
Contributor IV

David, I missed the pin_mux:PinSettings Component..

It seemed like PE created all the necessary files, Pin definitions and GPIO initialization per the manual, and assigned the pin as an output as it seems..

Anyway Thank you very much for the assistance!.

0 Kudos
Reply