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

Modifications to allow building of toolset in OpenBSD #1392

Merged
merged 1 commit into from
May 29, 2024

Conversation

Ilgrim
Copy link
Contributor

@Ilgrim Ilgrim commented May 8, 2024

I am using OpenBSD for some microcontroller work and I needed these tools. As far I was not able to compile with the vanilla code, I have modified just a little for be able to compile in OpenBSD 7.4. Build tested in OpenBSD 7.4 and Debian 12.5.

I hope this can be somehow useful.

@Nightwalker-87 Nightwalker-87 removed the request for review from Ant-ON May 12, 2024 19:28
@Nightwalker-87 Nightwalker-87 changed the title Making some modifications for be able to build these tools in OpenBSD Modifications to allow building of toolset in OpenBSD May 12, 2024
@Nightwalker-87 Nightwalker-87 changed the base branch from develop to testing May 12, 2024 19:30
@@ -1172,7 +1172,7 @@ stlink_t *stlink_open_usb(enum ugly_loglevel verbose, enum connect_type connect,

if (ret) { continue; } // could not open device

uint32_t serial_len = stlink_serial(handle, &desc, sl->serial);
uint32_t serial_len = (uint32_t)stlink_serial(handle, &desc, sl->serial);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would simply change the type of serial_len variable to size_t.

Copy link
Member

Choose a reason for hiding this comment

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

@Ant-ON: We could alternatively also change stlink_serial() to uint32_t.
This should be safe on all common architectures as well.

@@ -1375,7 +1375,7 @@ static uint32_t stlink_probe_usb_devs(libusb_device **devs, stlink_t **sldevs[],
break;
}

uint32_t serial_len = stlink_serial(handle, &desc, serial);
uint32_t serial_len = (uint32_t)stlink_serial(handle, &desc, serial);
Copy link
Collaborator

Choose a reason for hiding this comment

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

and this too

@Nightwalker-87
Copy link
Member

@Ilgrim: Please address these points in order to proceed.

@Ilgrim
Copy link
Contributor Author

Ilgrim commented May 15, 2024

@Nightwalker-87 Sure! I will make the suggested changes 🙂

@Nightwalker-87
Copy link
Member

Nightwalker-87 commented May 18, 2024

@Ilgrim: I'm looking forward to merge this PR in order to proceed...

@Nightwalker-87
Copy link
Member

I'll merge this with additional changes afterwards, as missing care on this PR delays unnecessarily delays any further proceedings. 👎

@Nightwalker-87 Nightwalker-87 merged commit 91d7033 into stlink-org:testing May 29, 2024
10 checks passed
@Nightwalker-87 Nightwalker-87 removed the request for review from Ant-ON May 29, 2024 17:32
@stlink-org stlink-org locked as resolved and limited conversation to collaborators May 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants