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

CODE_DATA_RELOCATION wrongly puts add_compile_definitions() into relocation dictionary #76300

Closed
nordicjm opened this issue Jul 25, 2024 · 1 comment
Assignees
Labels
area: Userspace Userspace bug The issue is a bug, or the PR is fixing a bug

Comments

@nordicjm
Copy link
Collaborator

nordicjm commented Jul 25, 2024

Describe the bug
Seeing an issue whereby in a project add_compile_definitions() is used to add a compile definition for the code, upon building however a warning it emitted when doing the code relocation part:

/tmp/aa/zephyr/scripts/build/gen_relocate_app.py:547: UserWarning: File: MIN_SECTOR_COUNT=866 Not found
  warnings.warn("File: "+file_glob+" Not found")

grepping for this yields this in the code relocation file:

./zephyr/relocation_dict.txt:|RAM:COPY:/tmp/aa/zephyr/soc/nxp/imxrt/imxrt5xx/cm33/flash_clock_setup.c|RAM_TEXT:COPY:/tmp/aa/zephyr/drivers/flash/flash_mcux_flexspi_mx25um51345g.c|RAM_TEXT:COPY:/tmp/aa/zephyr/drivers/memc/memc_mcux_flexspi.c|RAM_TEXT:COPY:/tmp/aa/modules/hal/nxp/mcux/mcux-sdk/drivers/flexspi/fsl_flexspi.c;MIN_SECTOR_COUNT=866

I'm not really sure why that is being put there?

To Reproduce
Get mcu-tools/mcuboot#2019
Then build MCUboot using cmake -GNinja -DBOARD=mimxrt595_evk/mimxrt595s/cm33 .. and warning will show

Expected behavior
No warning

Impact
Annoyance in this case, could be more if other definitions start getting put there

Environment (please complete the following information):

  • Commit SHA or Version used: c3dd1e8
@nordicjm nordicjm added bug The issue is a bug, or the PR is fixing a bug area: Userspace Userspace labels Jul 25, 2024
@nordicjm
Copy link
Collaborator Author

Invalid bug, missed that add_compile_definitions() is the raw cmake function and should not be used, zephyr_compile_definitions() is the correct function

@nordicjm nordicjm closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Userspace Userspace bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

2 participants