-
-
Notifications
You must be signed in to change notification settings - Fork 481
Description
Describe the problem
I am using a third party board, AMB82 MINI and JLink EDU to perform debugging on Arduino IDE 2.3.2, it works on Windows and Linux but not working on macOS Intel.
In debug console, it shows:
I'm sorry, Dave, I can't do that. Symbol format `elf32-littlearm' unknown.
Application.ntz
is the executable, and the file format is in elf32-littlearm
.
However, if I run gdb and gdb server using terminal, it is able to go to breakpoint if I call "file {executable path}
". If "file {executable path}
" is not called before target remote localhost:{port}
the behavior will be the same as shown in Arduino IDE.
When "file {executable path}
" is not called before target remote localhost:{port}
:
When "file {executable path}
" is called before target remote localhost:{port}
:
To reproduce
In Arduino IDE:
debug_custom.json
is written as follows:
[
{
"name": "JLink Attach",
"request": "attach",
"configId": "realtek:AmebaPro2:Ameba_AMB82-MINI",
"server": "jlink",
"servertype": "jlink",
"device": "Cortex-M33",
"serverArgs": ["-timeout", "10000", "-confirm", "0", "-scriptfile", "{replace with your Arduino15 packages directory}/packages/realtek/tools/ameba_pro2_tools/{replace with tools version number}/debug/RTL8735B_Arduino_debug.JLinkScript"],
"interface": "swd",
"serverPath": "/Applications/SEGGER/JLink_V796h/JLinkGDBServerCLExe",
"serverpath": "/Applications/SEGGER/JLink_V796h/JLinkGDBServerCLExe",
"postAttachCommands": [
"pwd",
"monitor clrbp",
"monitor reset",
"continue"
]
}
]
The content in JLinkScript used:
void ConfigTargetSettings(void) {
JLINK_ExecCommand("map add 0x08000000-0x0FFFFFFF N FLASH");
JLINK_ExecCommand("DisableFlashBPs");
JLINK_ExecCommand("DisableFlashDL");
JTAG_WriteClocks(1);
JTAG_Speed = 1000;
}
In the last part of the platform.txt
is shown as follows:
debug_custom.json
is placed with the .ino
that we wish to debug.
After code is uploaded, the "Start Debugging" button is pressed. It successfully connects to the JLink and connect to Target. But after that, it quit unexpectedly.
In Terminal (which is working):
I open 2 terminal, one for gdb server and one for gdb.
The command to start gdb server is:
/Applications/SEGGER/JLink_V796h/JLinkGDBServerCLExe -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device Cortex-M33 -select USB -timeout 10000 -confirm 0 -scriptfile /Users/apple/Library/Arduino15/packages/realtek/tools/ameba_pro2_tools/1.3.3/debug/RTL8735B_Arduino_debug.JLinkScript
After that it will show "Waiting for GDB connection..."
Starting gdb,
- Type
gdb
in terminal. - Enter
file {executable path}
- Then enter
target remote localhost:{port}
Expected behavior
Able to start debugging successfully on MacOS Intel and M1.
Arduino IDE version
2.3.2
Operating system
macOS
Operating system version
Intel
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details