Skip to content

Relax ID matching for the misc_dev#351

Open
UweBonnes wants to merge 1 commit intotrabucayre:masterfrom
UweBonnes:misc_dev
Open

Relax ID matching for the misc_dev#351
UweBonnes wants to merge 1 commit intotrabucayre:masterfrom
UweBonnes:misc_dev

Conversation

@UweBonnes
Copy link
Contributor

Detect STM32

Example output:

./openFPGALoader -c ftdijtag --detect
Jtag frequency : requested 6.00MHz -> real 6.00MHz
index 0:
idcode 0x6411041
type STM32 Device
irlength 4
index 1:
idcode 0x4ba00477
type ADIv5 JTAG-DP port
irlength 4

Detect STM32 and AVR8
Comment on lines +186 to +188
{0x0ba00077, {"ADIv5 JTAG-DP port", 4}},
{0x06400041, {"STM32 Device", 5}},
{0x0ff00ffe, {"ZynqMP dummy device", 12}},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea here is to provides the full idcode to display exact device (ARM cortex A9 and A53 differs only by upper nibble).
With this modification openFPGALoader will no more able to deal with zynq7000 & zynqMP

Comment on lines +203 to 206
found = search_and_insert_device_with_idcode(tmp);
if (!found) /* if masked not found -> search for full */
found = search_and_insert_device_with_idcode(tmp);

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really happy by the original code because some devices (lattice) with high nibble equal to 0 matches wrong version.
I think both mask & unmask search must be switched, but I have to check to be sure to not introduces a regression.
But If you remove mask most of the devices will never been found because in the idcode list most of devices have highest nibble masked to match all revisions, only a few number of them have full idcode.

@UweBonnes
Copy link
Contributor Author

What about adding a per-vendor handling after looking for the exact match and before the misc match used to long?

@trabucayre
Copy link
Owner

I have planned to convert the one big list to multiple list (one per vendor) yes.
But not yet made this modification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants