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

p8: Fix build when building for P8 variants #1913

Merged
merged 2 commits into from
Dec 16, 2023
Merged

p8: Fix build when building for P8 variants #1913

merged 2 commits into from
Dec 16, 2023

Conversation

FintasticMan
Copy link
Member

Building with a TARGET_DEVICE set to any of the P8 variants' names caused the build to fail, because they contained hyphens. The build defines a macro TARGET_DEVICE_$VARIANT, which fails if $VARIANT contains a hyphen.

Building with a TARGET_DEVICE set to any of the P8 variants' names
caused the build to fail, because they contained hyphens.
The build defines a macro `TARGET_DEVICE_$VARIANT`, which fails if
`$VARIANT` contains a hyphen.
@FintasticMan FintasticMan added the bug Something isn't working label Nov 16, 2023
@FintasticMan FintasticMan requested a review from a team November 16, 2023 10:01
Copy link

Build size and comparison to main:

Section Size Difference
text 377496B -16B
data 940B 0B
bss 63420B 0B

Copy link
Contributor

@NeroBurner NeroBurner left a comment

Choose a reason for hiding this comment

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

how did that ever work ;)
good catch. changes fixes the builds

@NeroBurner
Copy link
Contributor

@StarGate01 I think you did the initial support for p8 builds, could you have a look at this please

The properties are used for CMake-GUI configuration applications to
provide a set of values by dropdown.
@NeroBurner
Copy link
Contributor

It seems the TARGET_DEVICE_${VARIANT} definition is never used anywhere 🤷 only the TARGET_DEVICE_NAME=${TARGET_DEVICE} one is used

I don't know if the MOY-TFK5 et.al. strings have a meaning, and if the - is important in that name. The changed _ will show up in the info screen of the device.

So if we want to keep the - in the string we should be golden if we just remove the TARGET_DEVICE_${TARGET_DEVICE} define

@FintasticMan
Copy link
Member Author

I did think of that, but I don't think it's very important to keep the strings exactly as they were tbh. It would be good to have @StarGate01 take a look at it. I think it is good to have the TARGET_DEVICE_${TARGET_DEVICE} macro, so that the code can check what device it is without having to use strcmp or something like that.

@StarGate01
Copy link
Contributor

StarGate01 commented Dec 16, 2023

Good catch, I actually fixed this in my fork a while back since I had the same issue: StarGate01@3e0841d .

I'll eventually rebase my fork and update the PRs (https://github.com/InfiniTimeOrg/InfiniTime/pulls/stargate01)

@NeroBurner NeroBurner merged commit a544da9 into main Dec 16, 2023
5 checks passed
@NeroBurner NeroBurner deleted the fix_p8_build branch December 16, 2023 10:43
@NeroBurner
Copy link
Contributor

Thanks for the feedback! Nice we found the same solution independently 😁

@FintasticMan FintasticMan added this to the 1.14.0 milestone Dec 16, 2023
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 this pull request may close these issues.

3 participants