**** BEGIN LOGGING AT Mon Mar 25 02:59:59 2013 Mar 25 11:27:26 Can openocd+GDB with freerunner debug threads? Mar 25 11:40:44 txor: in Linux? Mar 25 11:40:50 I mean on the target Mar 25 11:44:11 txor: the generic answer: gdb either works on the system itself, natively or communicates with something using its gdb serial protocol (via real serial or tcp or whatever). When it's using the protocol, it's responsibility of the other side to supply thread-specific information. In OpenOCD + gdb combo OpenOCD acts as a gdb server, implementing the serial protocol. OpenOCD has support for Linux, FreeRTOS, eCOS and probably some ... Mar 25 11:44:17 ... other schedulers. Mar 25 12:07:28 PaulFertser, I am asking this because I receive "warning: RMT ERROR : failed to get remote thread list." response from GDB when debugging a program that supposedly creates a thread. Does OpenOCD needs some concrete configuration for that? Mar 25 12:11:09 PaulFertser, About SDRAM contoller, I readed the SDRAM section from the datasheet but I didn't see where it explains what is needed to configure the full access to memory. Maybe it would be interesting to hear how it works on i.MX25 :) It is pretty possible that I can learn a lot from that. Mar 25 12:18:20 txor: what kernel is running on the target when you're trying to connect to it via OpenOCD with gdb? Mar 25 12:21:07 txor: the SDRAM controller needs to be told about the size of the memory, the type (SDRAM/DDR/DDR2/mDDR), the timings of the memory etc. And also the special procedure is needed to set one register in memory itself and the settings should match the controller's. I'd expect most on most SoC this procedure would look like an ordered set of constant writes to particular memory-mapped registers. Mar 25 12:37:38 PaulFertser, the kernel is eCos, thanks for the info on SDRAM! Mar 25 12:38:38 txor: there's some support for eCos threads in OpenOCD, check it out. It requires specific compile-time settings (to get struct layouts exactly matching OpenOCD expectations) though. Mar 25 12:38:48 PaulFertser, Maybe I need to add to eCos some extra GDB stubs? Mar 25 12:39:20 PaulFertser, Do you mean settings for OpenOCD? Mar 25 12:40:00 txor: no, for eCos. It's not possible for OpenOCD to easily get struct fields offsets from gdb, so OpenOCD has them hardcoded. Mar 25 12:44:24 PaulFertser, Ok thanks, there is a "package" on eCos for supporting GDB. Mar 25 12:45:14 txor: yes, but how will it communicate with gdb? I think that if you attach gdb via serial to it, that'd be easier and cooler and saner than trying to use JTAG. Mar 25 12:50:35 PaulFertser, xD I'll try to communicate them via serial... Mar 25 12:51:47 txor: but you understand that you need to configure your eCos kernel somehow to not output serial console to the UART and to attach gdb stubs there instead, right? Mar 25 12:52:14 And then you can use your debug board and in gdb just "target extended-remote /dev/ttyUSB0" Mar 25 12:53:32 PaulFertser, GDB can't handle both his protocol and noisy output? Mar 25 12:54:16 PaulFertser, I will need the UART to get the output from the program... Mar 25 12:55:17 txor: no, not both. Mar 25 12:55:35 Why do you need serial if you can control your program via gdb? ;) Mar 25 12:56:17 PaulFertser, I'll print pretty feedback for the final demo! :D Mar 25 12:56:27 txor: after you debug, yes Mar 25 12:56:37 PaulFertser, You're right. Mar 25 12:56:59 PaulFertser, But what about debugging the printing? ;) Mar 25 12:57:46 PaulFertser, Anyway at this stage I don't really need printing. Mar 25 13:01:53 txor: are you still after porting a6000 driver to eCos Mar 25 13:08:19 Yes... Mar 25 13:32:32 txor: it'll take several months **** ENDING LOGGING AT Tue Mar 26 02:59:58 2013