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

Fix Mynewt build for Microchip PIC32MZ devices. #1263

Merged
merged 1 commit into from
Dec 30, 2021

Conversation

kasjer
Copy link
Collaborator

@kasjer kasjer commented Dec 27, 2021

Describe the PR
Mynewt build fails when xc32 compiler is used.

definition of DEBUG breaks Microchip pic32 builds for Mynewt.
When MCU is not VALENTYUSB_EPTRI there is no need to have any
preprocessor definitions.
It may not look like a big deal but for xc32 builds, compiler
automatically force-includes some file that have structure with field name
DEBUG that result in build error in dcd_eptri.c when this file
is not really needed.

Moving DEBUG and LOG_USB few lines down should not break eptri builds.

Additional context
This is prerequisite to have Microchip mips-arhitecture support for pic32 family
for Mynewt.

definition of DEBUG breaks Microchip pic32 builds for Mynewt.
When MCU is not VALENTYUSB_EPTRI there is no need to have any
preprocessor definitions.
It may not look like a big deal but for xc32 builds, compiler
automatically force-includes some file that have structure with field name
DEBUG that result in build error in dcd_eptri.c when this file
is not really needed.

Moving DEBUG and LOG_USB few lines down should not break eptri builds.
Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

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

look great to me, IMO, it is the better way regardless of the pic32 compiler

@hathach hathach merged commit c8641ee into hathach:master Dec 30, 2021
@kasjer kasjer deleted the kasjer/mynewt-eptri branch December 31, 2021 21:52
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