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);

markmentovai added a commit to markmentovai/stm32duino_arduino_tools that referenced this issue Jan 23, 2025
This provides a rebuild of all macOS executables. For reproducibility,
this was done entirely by `build_mac.sh`. I verified that different
machines produce bit-for-bit identical output. A build machine running
Xcode 16.2 16C5032a on macOS 15.2 24C101 was used.

These tools should run on macOS 10.13 and later. This version was
selected as it's the minimum macOS version that the xPack tools declare
support for.

A build of libusb is included, so that the provided `dfu-util` no longer
has an external dependency.

The universal structure was chosen for these tools to avoid changing
paths, anywhere they may be relied on. If desired, `build_mac.sh` can
also be used to produce single-architecture tools, even cross-compiling,
depending on the value of the `ARCH` variable.

The current released versions were selected:
 - libusb 1.0.27
 - dfu-util 0.11 (including dfu-prefix and dfu-suffix)
 - hid-flash from STM32_HID_Bootloader 2.2.2 (this program erroneously
   reports its version as 2.2.1), with a patch from
Serasidis/STM32_HID_Bootloader#68 (comment).
 - upload_reset from this repository at the HEAD of main

Link: stm32duino/BoardManagerFiles#72
Signed-off-by: Mark Mentovai <[email protected]>
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