nxp-mcuxpresso / vscode-for-mcux

Support for NXP Visual Studio Code for MCUXpresso Extension project.
13 stars 0 forks source link

Restrict 'Go to Definition' to the relevant board only #12

Closed escherstair closed 6 months ago

escherstair commented 9 months ago

I installed the extension and I imported an example from the repository, where I select the evaluation board evkmimx8mp in the SDK. In mcuxpresso-tools.json I can see

  "sdk": {
    "version": "2.14.0",
    "path": "d:\\repos\\SDK_NXP",
    "boardId": "evkmimx8mp",
    "deviceId": "MIMX8ML8xxxLZ",
    "coreId": "cm7_MIMX8ML8xxxLZ",
    "manifestId": "SDK_2.x_EVK-MIMX8MP_manifest_v3_13"
  }

When I use the "Go to Definition F12' feature over the function BOARD_InitMemory(), a lot of possiiblities are shown: immagine They're from all the boards available in the SDK. Is there a way to "restrict" these possiiblities to the board selected in the SDK only?

cristitep-nxp commented 9 months ago

Hi,

This is a feature inside Microsoft C/C++ extension. The good part I see in my tests and also in your picture is that the proper definition is focused so you can easily go to the right code. On the other hand I see some other people raised the same problem https://github.com/microsoft/vscode-cpptools/issues/6471 with a suggested workaround but having some potential side effects (see C_Cpp.definitions.exclude setting) and a potential fix not accepted so far.

Regards, Cristian

escherstair commented 6 months ago

Closed because it's not a vscode-for-mcux issue