-
Notifications
You must be signed in to change notification settings - Fork 73
Integrate cortex debugger #398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.0.0-pre-release
Are you sure you want to change the base?
Conversation
Signed-off-by: wxyyy0117 <wxyyy2002@outlook.com>
Signed-off-by: wxyyy0117 <wxyyy2002@outlook.com>
There was a problem hiding this 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>
@ederjc @jaenrig-ifx We can consider whether to integrate this into the developer tools. We can also discuss next steps for improvements and iterations. |
tools/gen_launch.sh
Outdated
|
||
|
||
# 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}" |
There was a problem hiding this comment.
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>
There was a problem hiding this 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}" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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)" |
There was a problem hiding this comment.
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.
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.