Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 231148

Forum Post: TMS570LC4357: OpenOCD debug with HDK

$
0
0
Part Number: TMS570LC4357 Tool/software: Hi, I am trying to debug my Hercules board using OpenOCD and VSCode and I have run into several problems. The one that is currently blocking me is when trying to load the binary into the board. From openOCSD i get the following debug messages: Debug: 262 239 command.c:153 script_debug(): command - tms570.cpu invoke-event reset-end Debug: 263 240 gdb_server.c:400 gdb_log_outgoing_packet(): [tms570.cpu] {1} sending packet: $OK#9a Debug: 264 245 gdb_server.c:383 gdb_log_incoming_packet(): [tms570.cpu] {1} received packet: X0,0: Debug: 265 245 gdb_server.c:400 gdb_log_outgoing_packet(): [tms570.cpu] {1} sending packet: $OK#9a Debug: 266 245 gdb_server.c:375 gdb_log_incoming_packet(): [tms570.cpu] {1} received packet: X0,20: Debug: 267 245 gdb_server.c:400 gdb_log_outgoing_packet(): [tms570.cpu] {1} sending packet: $OK#9a Debug: 268 245 gdb_server.c:1679 gdb_write_memory_binary_packet(): addr: 0x0, len: 0x00000020 Debug: 269 245 target.c:2344 target_write_buffer(): writing buffer of 32 byte at 0x00000000 Debug: 270 245 cortex_a.c:2753 cortex_a_write_phys_memory(): Writing memory to real address 0x00000000; size 4; count 8 Debug: 271 245 cortex_a.c:2251 cortex_a_write_cpu_memory(): Writing CPU memory address 0x0 size 4 count 8 Debug: 272 247 cortex_a.c:292 cortex_a_exec_opcode(): exec opcode 0xee160f10 Debug: 273 248 cortex_a.c:292 cortex_a_exec_opcode(): exec opcode 0xee000e15 Debug: 274 250 cortex_a.c:292 cortex_a_exec_opcode(): exec opcode 0xee150f10 Debug: 275 251 cortex_a.c:292 cortex_a_exec_opcode(): exec opcode 0xee000e15 Debug: 276 253 cortex_a.c:292 cortex_a_exec_opcode(): exec opcode 0xee100e15 Debug: 277 256 gdb_server.c:375 gdb_log_incoming_packet(): [tms570.cpu] {1} received packet: X20,3fa0: Debug: 278 256 gdb_server.c:1493 gdb_error(): Reporting -4 to GDB as generic error Debug: 279 256 gdb_server.c:400 gdb_log_outgoing_packet(): [tms570.cpu] {1} sending packet: $E0E#ba Debug: 280 256 gdb_server.c:1679 gdb_write_memory_binary_packet(): addr: 0x20, len: 0x00003fa0 Debug: 281 256 target.c:2344 target_write_buffer(): writing buffer of 16288 byte at 0x00000020 Debug: 282 256 cortex_a.c:2753 cortex_a_write_phys_memory(): Writing memory to real address 0x00000020; size 4; count 4072 Debug: 283 256 cortex_a.c:2251 cortex_a_write_cpu_memory(): Writing CPU memory address 0x20 size 4 count 4072 Debug: 284 259 cortex_a.c:292 cortex_a_exec_opcode(): exec opcode 0xee160f10 Debug: 285 259 server.c:608 sig_handler(): Terminating on Signal 15 which indicate that I was able to write the vector table but failed when trying to write the next. From what I have been able to research, maybe I need to configure a specific target in the openOCD for my exact flash configuration or I need som kind of specific driver to be able to write succesfully to flash. Can someone help? My launch.json command: { "name" : "Debug ASW_HDK Linux" , "cwd" : "${workspaceFolder}/" , "executable" : "./ASW_HDK.elf" , "request" : "launch" , "type" : "cortex-debug" , "servertype" : "openocd" , "configFiles" : [ "board/ti_tmdx570lc4357.cfg" , ], "searchDir" : [ "${workspaceFolder}/tools/Debug_cfg" ], "runToEntryPoint" : "main" , "showDevDebugOutput" : "raw" , "device" : "TMS570" , "armToolchainPath" : "/tools/gcc-arm-none-eabi-7-2018-q2-update/bin" , "toolchainPrefix" : "arm-none-eabi" , "serverpath" : "/tools/xpack-openocd-0.12.0-6/bin/openocd" , "preRestartCommands" : [ "monitor reset" ], "openOCDLaunchCommands" : [ "debug_level 3" ] // "preLaunchTask": "ASW_PB: Build" }, For OpenOCD config I created a cfg file that contains the following: board/ti_tmdx570lc4357.cfg source [find interface/ftdi/xds100v2.cfg] transport select jtag source [find target/ti_tms570lc4357.cfg] reset_config trst_only init ftdi set_signal PWR_RST 1 jtag arp_init target/ti_tms570lc4357.cfg set DAP_TAPID 0x1B95A02F set JRC_TAPID 0x1B95A02F source [find target/ti_tms570.cfg] the xds100v2 and tms570 are the feault ones that come with the openOCD installation

Viewing all articles
Browse latest Browse all 231148

Latest Images

Trending Articles

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>