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

Hid-flash 64-bit binaries #68

Open
fpistm opened this issue Mar 19, 2024 · 1 comment
Open

Hid-flash 64-bit binaries #68

fpistm opened this issue Mar 19, 2024 · 1 comment

Comments

@fpistm
Copy link

fpistm commented Mar 19, 2024

Hi @Serasidis

Hope you are fine 🙂

Did you test 64-bit binaries ?
I would like to switch on 64-bit version as the arm-none-eabi toolchain only support 64-bit since 1 year.
I've built hid-flash for Windows ans Linux.
On windows it works while on Linux a segmentation fault is raised.
I will try to debug to understand why.
It would be fine to also provides this version

@fpistm fpistm changed the title 64-bit binaries Hid-flash 64-bit binaries Mar 19, 2024
@fpistm
Copy link
Author

fpistm commented Mar 20, 2024

Digging into the code, I've found the issue.
It is linked to #30.
Since I've change my Laptop, the udev rule was not present causing the fail on Linux and so the seg fault.
Applying the patch fix the issue (thanks @matthijskooijman)

I've just add a specific warning for Linux about the udev rule:

@@ -131,12 +131,15 @@ int main(int argc, char *argv[]) {
     goto exit;
   } 
   
   handle = hid_open(VID, PID, NULL);
   
-  if (i == 10 && handle != NULL) {
+  if (handle == NULL) {
     printf("\n> Unable to open the [%04X:%04X] device.\n",VID,PID);
+#if defined(__linux__)
+    printf("> Please, ensure to have installed udev rule.\n");
+#endif
     error = 1;
     goto exit;
   }
  
   printf("\n> [%04X:%04X] device is found !\n",VID,PID);

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

No branches or pull requests

1 participant