SWD Bitbanging with Arduino Portenta x8

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SWD Bitbanging with Arduino Portenta x8

167 Views
AditiV
Contributor I

Hello,
I’ve been using the Blinkinlabs JTAG Hat with a Raspberry Pi 3 and OpenOCD successfully for debugging devices. I followed the example from their github for the setup. I’m now trying to use it with an Arduino Portenta X8 (with Hat Carrier), for which I created a custom sysfsgpio config:
adapter driver
sysfsgpio sysfsgpio_swd_nums 162 166
sysfsgpio_srst_num 188

With this setup, I can flash the target device when wiring Portenta's GPIOs directly. However, when routing through the JTAG Hat I get:
Error: Error connecting DP: cannot read IDR

I believe the issue is the swdio_dir pin, which sysfsgpio doesn’t support.
Is there an adapter/driver compatible with the NXP i.MX8 mini that allows SWD direction pin control?
Thanks for your help.

Kind regards,
Aditi Verma

0 Kudos
Reply
0 Replies
%3CLINGO-SUB%20id%3D%22lingo-sub-2171875%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ESWD%20Bitbanging%20with%20Arduino%20Portenta%20x8%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2171875%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EHello%2C%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EI%E2%80%99ve%20been%20using%20the%3CA%20href%3D%22https%3A%2F%2Fshop.blinkinlabs.com%2Fproducts%2Fjtag-hat%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%20Blinkinlabs%20JTAG%20Hat%3C%2FA%3E%20with%20a%20Raspberry%20Pi%203%20and%20OpenOCD%20successfully%20for%20debugging%20devices.%20I%20followed%20the%20example%20from%20their%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FBlinkinlabs%2FJTAG_hat%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Egithub%3C%2FA%3E%20for%20the%20setup.%20I%E2%80%99m%20now%20trying%20to%20use%20it%20with%20an%20Arduino%20Portenta%20X8%20(with%20Hat%20Carrier)%2C%20for%20which%20I%20created%20a%20custom%20sysfsgpio%20config%3A%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Eadapter%20driver%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Esysfsgpio%20sysfsgpio_swd_nums%20162%20166%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Esysfsgpio_srst_num%20188%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EWith%20this%20setup%2C%20I%20can%20flash%20the%20target%20device%20when%20wiring%20Portenta's%20GPIOs%20directly.%20However%2C%20when%20routing%20through%20the%20JTAG%20Hat%20I%20get%3A%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EError%3A%20Error%20connecting%20DP%3A%20cannot%20read%20IDR%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EI%20believe%20the%20issue%20is%20the%20swdio_dir%20pin%2C%20which%20sysfsgpio%20doesn%E2%80%99t%20support.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EIs%20there%20an%20adapter%2Fdriver%20compatible%20with%20the%20NXP%20i.MX8%20mini%20that%20allows%20SWD%20direction%20pin%20control%3F%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EThanks%20for%20your%20help.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EKind%20regards%2C%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EAditi%20Verma%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E