MCUXpresso IDE: debugging of cmake project

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

MCUXpresso IDE: debugging of cmake project

跳至解决方案
1,487 次查看
aleksejshch
Contributor II

Hi! I can't setup LinkServer (CMSIS-DAP) debugging in MCUXpresso IDE for imported cmake project. Is it possible? I can't find any solution.

Details:

I created simple cmake project: using source from evkmimxrt1160_iled_blinky_cm7 example from SDK, written my own cmake for project. So, I can build project from terminal. Also, I can load binary to MCU using crt_emu_cm_redlink utility from IDE folder with required parameters from terminal. And as LED blinks, I'm sure that all is ok.

Then I imported project to MCUXpresso IDE (File -> Import -> General -> Existing Project into Workspace ). There I can also build my project, and load binary to MCU (adding crt_emu_cm_redlink with parameters to "Build Targets" -> "create build target").

But I can't setup LinkServer (CMSIS-DAP) for debugging in IDE. 

 

My setup:

MCUXpresso IDE version: v11.7.0 [Build 9198] [2023-01-17]

Board: MIMXRT1160-EVK

SDK version: SDK_2_13_0_MIMXRT1160-EVK

 

Kind Regards,

Oleksii

0 项奖励
1 解答
1,476 次查看
ErichStyger
Senior Contributor V

Instead using crt_emu_cm_redlink, I recommend that you use the new LinkServer, see https://mcuoneclipse.com/2023/05/14/linkserver-for-microcontrollers/

在原帖中查看解决方案

6 回复数
1,464 次查看
ErichStyger
Senior Contributor V

Not sure what problem your are facing with the debug configuration.

I'm using MCUXpresso IDE with CMake and LinkServer, see https://mcuoneclipse.com/2023/04/19/building-a-triumvirate-from-eclipse-cdt-to-cmake-cmd-and-visual-...

 

0 项奖励
1,431 次查看
aleksejshch
Contributor II

Yes, my project and cmake files has the same structure. 

Maybe I did something wrong?

That's my sequence:

1. Prepared Eclipse files:

$ cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_ECLIPSE_VERSION="4.24" -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE -DCMAKE_ECLIPSE_MAKE_ARGUMENTS=-j8 ..

2. Import project into IDE:
File -> Import -> General -> Existing Project into Workspace

Here I can build project from IDE.

Then I try to debug:

In Project Explorer right click on project -> Debug as -> 2 MCUXpresso IDE LinkServer (inc. CMSIS-DAP) probes. Opened window "Probes discovered", I can see attached one, press "OK" and nothing happens.

I can try another option:

In Project Explorer right click on project -> Debug as -> Debug Configurations ... Can see window "Debug Configuartions", in right side try to create new "C/C++ (NXP Semiconductors) MCU Application", and nothing happens.

Maybe I do something wrong?

Thanks.

0 项奖励
1,279 次查看
lpcxpresso_supp
NXP Employee
NXP Employee

The project you generate is an Eclipse project but lacks some target-specific information required by MCUXpresso IDE. Only projects created by MCUXpresso IDE have this kind of information. This being said, you have the option to import your cmake project inside the IDE and use it for building and source editing, but for debugging you'll need another project. The latter can be created using the Executable Importer wizard (see ch. 10 from User Guide). You should be able to debug afterwards.

Regards,
MCUXpresso IDE Support

1,423 次查看
ErichStyger
Senior Contributor V

Check that you have selected in your launch configuration the correct binary:

ErichStyger_0-1685027547209.png

 

0 项奖励
1,477 次查看
ErichStyger
Senior Contributor V

Instead using crt_emu_cm_redlink, I recommend that you use the new LinkServer, see https://mcuoneclipse.com/2023/05/14/linkserver-for-microcontrollers/

1,433 次查看
aleksejshch
Contributor II

Thanks, using external LinkServer I can debug my project from IDE. Do you now, is it possible to start dbgserver from IDE instead of manual start from terminal?

0 项奖励