openocd & esp32 Freematics ONE+ on Linux

aboaboit
Posts: 9
Joined: Mon Jul 02, 2018 9:02 pm

openocd & esp32 Freematics ONE+ on Linux

Postby aboaboit » Mon Jul 02, 2018 9:22 pm

Hi.

With reference to this other thread on DevKitC I am creating a new thread since my board is different, it's a Freematics ONE+, although I am also using Debian on amd64.

lsusb shows:

Code: Select all

Bus 002 Device 015: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
I have placed a (modified) /etc/udev/rules.d/99-openocd.rules with added lines and restarted udev:

Code: Select all

# Custom (Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light)
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", MODE="664", GROUP="plugdev"
I have no idea whether this board has its own JTAG adapter or not. Neither the manufacturer's website nor their forum make any mention of openocd. I got as far as building openocd-esp32 and trying a few examples, including those mentioned in the thread above.

Now I am a bit lost. How do I find out whether I need an external adapter or just a config tweak?

Thanks,
Andrea.

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: openocd & esp32 Freematics ONE+ on Linux

Postby ESP_igrr » Tue Jul 03, 2018 1:15 am

CP210x is only a USB-UART converter. You need a separate JTAG adapter. FT2232H-based ones are known to work well, for example.

aboaboit
Posts: 9
Joined: Mon Jul 02, 2018 9:02 pm

Re: openocd & esp32 Freematics ONE+ on Linux

Postby aboaboit » Tue Jul 03, 2018 9:12 pm

ESP_igrr wrote:CP210x is only a USB-UART converter. You need a separate JTAG adapter. FT2232H-based ones are known to work well, for example.
Ah-ha, thanks. I must have misinterpreted the documentation: I wrongly assumed an onboard adapter was a common feature of the ESP32, rather than a special feature of that specific board (WROVER). I guess there is no chance of using the onboard adapter to connect to another board, right?

More to the point, I had a look at the adapters you suggested and I have a question: where should I connect them to? According to the programming guide I need to access GPIO 12 to 15. However, the board doesn't seem to have any dedicated JTAG headers and, more worringly, the schematics makes me think some of those pins (IO13, IO15) are already permanently connected to the OBD interface IC and not at all visible on the XBee headers. The 4 empty pads on the flip side of the naked board are not visible in the fully assemled unit. Official Freematics docs make no mention of JTAG anywhere.

I guess my best option now is to either figure out how to core dump through serial port or get a WROVER to debug non-OBD issues.

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: openocd & esp32 Freematics ONE+ on Linux

Postby ESP_igrr » Wed Jul 04, 2018 10:04 am

aboaboit wrote:I guess there is no chance of using the onboard adapter to connect to another board, right?
If you already have a WROVER-KIT board, you can use it to debug external boards. Disconnect 4JTAG jumpers which go to the onboard WROVER module, and connect external board using cables instead. Depending on the cable length you may need to reduce the clock speed from the default 20MHz. Of course, you need to figure out where pins 12-15 are on your board. If these pins are used for some other function, then unfortunately you can't use JTAG with this board.

aboaboit
Posts: 9
Joined: Mon Jul 02, 2018 9:02 pm

Re: openocd & esp32 Freematics ONE+ on Linux

Postby aboaboit » Wed Jul 04, 2018 10:01 pm

I don't have the WROVER board, yet.... I asked merely to get an idea of the options I have and to get a more comprehensive picture.
Regarding pin access, I have posted a question on the Freematics board. Not holding my breath but you'll never know.

Thanks for the help! :)

EDIT: bought a JLink and managed to connect to the board and debug. Thanks again :)

Who is online

Users browsing this forum: No registered users and 27 guests