Skip to content

Conversation

wxyyy0117
Copy link
Collaborator

By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md
--- DO NOT DELETE ANYTHING ABOVE THIS LINE ---
This branch added two files to integrate cortex-debugger in XMC-for-Arduino, after installing the cortex-debugger extension in vscode and copy the tasks.json under .vscode, the task Arduino Debug can be directly run.

Signed-off-by: wxyyy0117 <wxyyy2002@outlook.com>
Signed-off-by: wxyyy0117 <wxyyy2002@outlook.com>
Copy link
Collaborator

@LinjingZhang LinjingZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

Signed-off-by: wxyyy0117 <wxyyy2002@outlook.com>
Signed-off-by: wxyyy0117 <wxyyy2002@outlook.com>
Signed-off-by: wxyyy0117 <wxyyy2002@outlook.com>
@LinjingZhang LinjingZhang requested review from LinjingZhang, ederjc and jaenrig-ifx and removed request for jaenrig-ifx September 24, 2025 07:13
@LinjingZhang
Copy link
Collaborator

@ederjc @jaenrig-ifx
Sorry, this PR wasn't discussed much beforehand. Xinyan's been working full-time lately, so I gave her this topic to explore. Surprisingly, she quickly delivered the first usable demo. I tested this PR a few days ago, and it works perfectly in xmc at least.

We can consider whether to integrate this into the developer tools. We can also discuss next steps for improvements and iterations.



# Allow GDB_PATH as optional 5th parameter, default to Infineon toolchain path
GDB_PATH="${5:-$HOME/.arduino15/packages/Infineon/tools/arm-none-eabi-gcc/10.3-2021.10/bin/arm-none-eabi-gdb}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 4.0.0, "Infineon" should be "infineon" or?

Signed-off-by: wxyyy0117 <wxyyy2002@outlook.com>
Copy link
Collaborator

@LinjingZhang LinjingZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! You made my dreams come true.

Areas for improvement in documentation:
Are the debugging examples identical to debugging tests?
If build files are required, it would be helpful to include a brief note about debugging test for new users/developers.

BUILD_PATH="$2"
SKETCH_PATH="$3"
# Allow BOARDS_TXT as optional 4th parameter, default to original absolute path
BOARDS_TXT="${4:-$HOME/Arduino/hardware/arduino-git/xmc/boards.txt}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest set the default path to the working dir and relativ path- so os independent and less confusing

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one another idea will be set the default in task.json

fi
cat > "$LAUNCH_DIR/launch.json" <<EOF
{
"version": "0.2.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a better way to separate the JSON format from the shell script?
Consider this: if we update Cortex Debug in the future, we'll have a new version of the JSON...

exit 3
fi

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like to place all optional variables at the beginning of the shell script, as this makes modifications later easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants