You are here

FX3 ThreadX debugging | Cypress Semiconductor

FX3 ThreadX debugging

Summary: 6 Replies, Latest post by h4tr3d on 26 Nov 2015 08:36 PM PST
Verified Answers: 0
Last post
Log in to post new comments.
user_401386419's picture
23 posts


I have problems with debuggin code with threads on FX3 chip. I use last OpenOCD, that declares ThreadX support, setup my own config ( looks to "-rtos ThreadX" argument). But when I run OpenOCD:

openocd-x64-0.8.0.exe -f fx3.cfg

I take an error:

Open On-Chip Debugger 0.8.0 (2014-04-28-08:42)
Licensed under GNU GPL v2
For bug reports, read
Info : only one transport option; autoselect 'jtag'
jtag_ntrst_delay: 200
adapter speed: 1000 kHz
trst_only separate trst_push_pull
Error: Could not find target in ThreadX compatibility list
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : clock speed 1000 kHz
Info : JTAG tap: fx3.cpu tap/device found: 0x07926069 (mfg: 0x034, part: 0x7926, ver: 0x0)
Warn : gdb services need one or more targets defined

I looks into sources of the OpenOCD and found that ThreadX supports only on CortexM3 and CortexR4 cores. And it requires some low-level information to adopt other CPUs.

Is it possible to debug threads on the FX3 chip in any way?

scutifer's picture
Cypress Employee
134 posts

 You're right.


And adding support for ARM9EJ-S seems to be a case of adding another instance of ThreadX_params and adding this target's stack info. If you do get it running, please send it upstream so that the next version of OpenOCD can use it. You can also post it here for the benefit of others.

user_401386419's picture
23 posts

Stack displayed is incorrectly. You can try Win64 build (tested with Olimex ARM-USB-OCD-H), sources, patch and build instruction is included:!yp0xCK4Y!p6BvsuIzCbaDX9pbejXzPScC-iM1hYfvIfL9867bX1M

I write mail to OpenOCD-develop list with detailed information. When mail thread will be published in the list archive, I put link to it here.

Any suggestions and help to make this patch useful is welcomed!

user_401386419's picture
23 posts

Hi all again,

I found root cause of problem: ThreadX for ARM926EJS does not need stack alignment by 8 bytes. Im my final patch, ThreadX threads info, backtracing, registers info and so on works correctly for ARM926EJS. Patch is attached.

Build for Win32/64 with patched sources and patch (located at the src directory):!igNmwTzR!5FAhh7_TcEsWlGKvW82Cz9Ggl4OhmBZBeV7O8sE9n_g

Patch sended to openocd-develop mail list too.


user_401386419's picture
23 posts

Link to the OpenOCD thread: (incorrectly displayed, click to the Message as HTML)

mjones_1522096's picture
12 posts

I see that the patches are in the OpenOCD sources, does anybody know when Cypress will release an update for Linux?

Also, does the standard OpenOCD work on fx3? Their docs seem to suggest their tweaked version is special. Are they just hiding some initialization code rather than putting it in script for everyone?

user_401386419's picture
23 posts

Yes, I propagate my patches to the OpenOCD tree, at least GIT master branch contains its now. I don't know about any official releases that contains it too: 0.9.0 seems not. I use git-master build, it works well for me. Also, gdb with python support so welcomed: I use my own building and working with source code and debugging in the Qt Creator is a pleasure :-)

PS I also use CMake (see my previous posts: I publish core rules at the Github:

Log in to post new comments.