Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FT2232H support for Windows, Tigard programmer #1242

Merged
merged 6 commits into from
Dec 27, 2022

Conversation

mariusgreuel
Copy link
Contributor

Fixes #1197

Other changes:

@mcuee mcuee added bug Something isn't working enhancement New feature or request labels Dec 27, 2022
@mariusgreuel
Copy link
Contributor Author

@jackw01, @securelyfitz

You may want to check out this PR. You can grab the CI build from
https://github.com/avrdudes/avrdude/suites/10070794039/artifacts/490409968

Try this:

avrdude -c tigard

@mcuee
Copy link
Collaborator

mcuee commented Dec 27, 2022

Great, I think this shuould be good to be merged before 7.1 release.

@mariusgreuel
Are you able to post the test results? Thanks. I am not so sure if I have the right HW to carry out the test for this PR.

But from my quick glance this PR is safe to merge.

And the changes in avrdude-libftdi seems to be good as well but I am not good at reviewing more complex change.

@mariusgreuel
Copy link
Contributor Author

@mcuee Most of the changes are here:
https://github.com/avrdudes/libftdi/commits/windows

To test an FTDI on interface B, you need an FT2232H board. I have a generic FT2232H break-out board, and I hooked up an ATtiny85. As I was mostly interested in FTDI interface enumeration (the Tigard is on port B), I simply ran

D:\Work\avrdudes\avrdude\out\build\x64-Debug\src>avrdude -c tigard -p t85 -vvv
avrdude: Version 7.0-20221227 (f220656e)
         Copyright the AVRDUDE authors;
         see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

         System wide configuration file is D:\Work\avrdudes\avrdude\out\build\x64-Debug\src\avrdude.conf

         Using Port                    : usb
         Using Programmer              : tigard
I avrftdi_open(700): Using device VID:PID 0403:6010 and SN '(null)' on interface B.
D write_flush(469): Setting pin direction (0x0000) and value (0x0000)
I set_frequency(206): Using frequency: 150000
I set_frequency(207): Clock divisor: 0x0027
D avrftdi_check_pins_mpsse(559): Using valid mask mpsse: 0x0000fff8
D avrftdi_check_pins_bb(524): Using valid mask bitbanging: 0x0000ffff
I avrftdi_pin_setup(633): Pin direction mask: 002b
I avrftdi_pin_setup(634): Pin value mask: 0000
         AVR Part                      : ATtiny85

<snip>

         Programmer Type : avrftdi
         Description     : Tigard interface board

D set_pin(238): Setting pin 3,5 (BDBUS3, BDBUS5) as RESET: low (high active)
D write_flush(469): Setting pin direction (0x002b) and value (0x0000)
D set_pin(238): Setting pin 0 (BDBUS0) as SCK: low (high active)
D write_flush(469): Setting pin direction (0x002b) and value (0x0000)
D set_pin(238): Setting pin 3,5 (BDBUS3, BDBUS5) as RESET: high (high active)
D write_flush(469): Setting pin direction (0x002b) and value (0x0028)
D set_pin(238): Setting pin 3,5 (BDBUS3, BDBUS5) as RESET: low (high active)
D write_flush(469): Setting pin direction (0x002b) and value (0x0000)
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00 s

avrdude: device signature = 0x1e930b (probably t85)
D set_pin(238): Setting pin 3,5 (BDBUS3, BDBUS5) as RESET: high (high active)
D write_flush(469): Setting pin direction (0x002b) and value (0x0028)
I avrftdi_close(793): LED Mask=0x0000 value =0x0028 &=0x0000
D write_flush(469): Setting pin direction (0x0000) and value (0x0000)

avrdude done.  Thank you.

I also confirmed that the ft232h and the ft2232h programmer (on interface A) still work.

@mcuee
Copy link
Collaborator

mcuee commented Dec 27, 2022

@mariusgreuel

I do not have such breakout board. I only have jtagkey2 and it only enable Interface A so I can not really test this PR.

But based on your test results, this is good to be merged.

@mcuee mcuee merged commit 3e08177 into avrdudes:main Dec 27, 2022
@mcuee
Copy link
Collaborator

mcuee commented Dec 27, 2022

@mariusgreuel

Any other things you want to be included in the upcoming 7.1 release?

@mariusgreuel
Copy link
Contributor Author

Any other things you want to be included in the upcoming 7.1 release?

I was planning on going through the issues assigned to me. At least I would like to include #1186 in the next release.

@mcuee
Copy link
Collaborator

mcuee commented Dec 27, 2022

Any other things you want to be included in the upcoming 7.1 release?

I was planning on going through the issues assigned to me. At least I would like to include #1186 in the next release.

Wow, that would be really awesome!

@dl8dtl
Please take note of this.

@mcuee mcuee mentioned this pull request Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix libftdi for MSVC to support port B of FT2232H
2 participants