MCUXpresso IDE: debugging of cmake project

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MCUXpresso IDE: debugging of cmake project

ソリューションへジャンプ
2,230件の閲覧回数
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 解決策
2,219件の閲覧回数
ErichStyger
Specialist I

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 返答(返信)
2,207件の閲覧回数
ErichStyger
Specialist I

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 件の賞賛
返信
2,174件の閲覧回数
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 件の賞賛
返信
2,022件の閲覧回数
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

2,166件の閲覧回数
ErichStyger
Specialist I

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

ErichStyger_0-1685027547209.png

 

0 件の賞賛
返信
2,220件の閲覧回数
ErichStyger
Specialist I

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

2,176件の閲覧回数
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 件の賞賛
返信