MCUXpresso Jlink debug error 'Program file does not exist'

cancel
Showing results for 
Search instead for 
Did you mean: 

MCUXpresso Jlink debug error 'Program file does not exist'

Jump to solution
1,617 Views
mkoc
Contributor I

Hello guys,

I'm trying to make first 'blinky' project with MCUXpresso. Unfortunately I stuck over debugging starting, i got 'Program file does not exist' error:

pastedImage_1.png

My debug configurations below :

pastedImage_2.png

Buliding is done without errors :

pastedImage_3.png

I don't have .elf file inside my project catalog, without attention to the project settings :

pastedImage_4.png

What may be wrong with my configuration ?

0 Kudos
1 Solution
929 Views
BlackNight
NXP Employee
NXP Employee

Somehow in your launch config the binary file to debug is not specified:

pastedImage_1.png

Use the Browse button to select the .axf file and you shall be able to debug it.

I hope this helps,

Erich

View solution in original post

0 Kudos
6 Replies
929 Views
lpcxpresso_supp
NXP Employee
NXP Employee

There are various steps that can be taken to reduce the code size of generated applications - as the primary goal of these example projects is to function correctly, rather than to be of a minimum code size.

For instance, the code inside the generated project is sufficient to allow you to easily swap between semihosting and UART output for any debug I/O.

But if you are happy to use semihosting and never switch your project over to UART output, then you can potentially remove code inside your project that enables to UART. Similar if you are going to always use UART, then you can switch the IDE over to using a non-semihosted version of the C library.

For more background see the following sections of the MCUXpresso IDE v10.1 User Guide...

  • Section 13.4, "What is Semihosting"
  • Section 13.5.5, "Printf when using SDK"
  • Section 16.1, "Quick Settings"

Regards,

MCUXpresso IDE Support

0 Kudos
929 Views
lpcxpresso_supp
NXP Employee
NXP Employee

With regards to you comment about code size of a blank project, we have noticed that there is an issue with the MCUXpresso IDE v10.1.1 new project wizard for SDK-based MCUs, such that the default compiler options are not being set correctly. This causes unused code from the various source files in your project not to be discarded by the linker

Can you please try the following

  • Right click on your project in the Project Explorer view
  • Select Properties
  • Open up C/C++ Build -> Settings on the left hand side
  • Now in the Tool Settings tab, open up MCU C Compiler -> Miscellaneous
  • Change the value in the Other Flags from:
-c -fmessage-length=0

to

-c -ffunction-sections -fdata-sections -ffreestanding -fno-builtin
  • Now change the Configuration at the top of the page from "Debug" to "Release" and repeat the change.

Now click "OK", then try rebuilding your project. This should make a noticeable difference to the size of the linked application.

[We will be fixing this issue with the new project wizard in the next IDE release.]

With regard's to SEGGER's RTT mechanism : No, the IDE has no built in support for making use of this.

Regards,

MCUXpresso IDE Support

929 Views
mkoc
Contributor I

pastedImage_1.png

It works indeed, now is 44%. Is it everything what can be done with ?

0 Kudos
929 Views
mkoc
Contributor I

Thanks for really fast response, my debugger is works now like a charm.

After all i have additional two questions :

-Why almost blank project takes around 60% from 32kB mcu ROM ?

-Is there any easy option to configure functions for RTT Jlink viewer ?

0 Kudos
929 Views
lpcxpresso_supp
NXP Employee
NXP Employee

How did you try to start the debug session? Did you use the Quickstart Panel's "Debug" button which will trigger the IDE's probe discovery and automatic creation  of the launch configuration?

If not, I suggest that you delete any .launch files from inside your project. Then try using the Quickstart Panel "Debug" button.

For more details, please see the supplied MCUXpresso IDE v10.1 User Guide - in particular  chapter 3, "Debug Solutions Overview" and chapter 10, "Debugging a Project".

Regards,

MCUXpresso IDE Support

0 Kudos
930 Views
BlackNight
NXP Employee
NXP Employee

Somehow in your launch config the binary file to debug is not specified:

pastedImage_1.png

Use the Browse button to select the .axf file and you shall be able to debug it.

I hope this helps,

Erich

View solution in original post

0 Kudos