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

Windows compilation #56

Closed
Kabron287 opened this issue Apr 26, 2022 · 3 comments · Fixed by #57
Closed

Windows compilation #56

Kabron287 opened this issue Apr 26, 2022 · 3 comments · Fixed by #57
Assignees
Labels
bug Something isn't working

Comments

@Kabron287
Copy link

All this of course is very good, but is there a way to compile it in Windows, preferable with known instruments: Cube, Keil, IAR...?

@Kabron287
Copy link
Author

Well, I tryed to compile With CubeIDE as MakeFileProject and got sevral errors:
usb_descriptors.c:96:27: error: initializer element is not constant
.bMaxPacketSize = usb_endpoints[usb_endpoint_address_control].rx_size,

@Kabron287
Copy link
Author

Kabron287 commented Apr 26, 2022

When I changed:
// .wMaxPacketSize = usb_endpoints[usb_endpoint_address_cdc_0_data].tx_size,
to
.wMaxPacketSize = USB_CONTROL_ENDPOINT_SIZE,

Compilation was success

@r2axz r2axz self-assigned this Apr 26, 2022
@r2axz r2axz added the bug Something isn't working label Apr 26, 2022
@r2axz r2axz linked a pull request Apr 26, 2022 that will close this issue
@r2axz
Copy link
Owner

r2axz commented Apr 26, 2022

Hi,

Thanks for this issue. My bad. I used non-const initializes in a few places in the code. Although recent versions of gcc and clang can live with that, this violates the C standard. Older versions of gcc (which you probably use with you installation of CubeIDE) consider this an error. Anyhow, fixed in #57, please test it should work with CubeIDE now.

As for Keil and IAR, I don't think I care for those at this point.

@r2axz r2axz closed this as completed in #57 May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants