Skip to content

Conversation

VynDragon
Copy link
Contributor

The location of the cache code file was changed, update it here

The location of the cache code file was changed, update it here

Signed-off-by: Camille BAUD <[email protected]>
@zephyrbot zephyrbot added area: Boards/SoCs platform: Bouffalo Lab size: XS A PR changing only a single line of code labels Oct 15, 2025
@zephyrbot zephyrbot requested a review from josuah October 15, 2025 13:45
@VynDragon VynDragon requested a review from jimmyzhe October 15, 2025 13:48
Copy link

Copy link
Contributor

@josuah josuah left a comment

Choose a reason for hiding this comment

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

Related PR:

Before the current PR:

-- Zephyr version: 4.2.99 (/home/bouffalo/zephyrproject/zephyr), build: v4.2.0-5828-g7c82c06159c3
[122/132] Generating code_relocation.c, include/generated/linker_relocate.ld
/home/bouffalo/zephyrproject/zephyr/scripts/build/gen_relocate_app.py:662: UserWarning: File: /home/bouffalo/zephyrproject/zephyr/arch/riscv/core/xuantie/cache_xtheadcmo.c Not found
  rel_dict, phdrs = create_dict_wrt_mem()
[132/132] Linking C executable zephyr/zephyr.elf

After:

-- Zephyr version: 4.2.99 (/home/bouffalo/zephyrproject/zephyr), build: v4.2.0-5829-g2b345440efeb
[132/132] Linking C executable zephyr/zephyr.elf

@VynDragon
Copy link
Contributor Author

btw if anyone knows how to make that message a error it would be great, that relocation is critical for some functionalities not yet upstreamed but that should be at some point.

@josuah
Copy link
Contributor

josuah commented Oct 15, 2025

As it uses the python warnings module, it's possible to turn a warning into an error.

PYTHONWARNINGS=error:::__main__ west build -p -b ai_m62_12f samples/hello_world
[122/132] Generating code_relocation.c, include/generated/linker_relocate.ld
FAILED: [code=1] zephyr/code_relocation.c zephyr/include/generated/linker_relocate.ld /home/bouffalo/zephyrproject/zephyr/build/zephyr/code_relocation.c /home/bouffalo/zephyrproject/zephyr/build/zephyr/include/generated/linker_relocate.ld 
cd /home/bouffalo/zephyrproject/zephyr/build/zephyr && /home/bouffalo/zephyrproject/.venv/bin/python /home/bouffalo/zephyrproject/zephyr/scripts/build/gen_relocate_app.py  -d /home/bouffalo/zephyrproject/zephyr/build -i /home/bouffalo/zephyrproject/zephyr/build/zephyr/relocation_dict.txt -o /home/bouffalo/zephyrproject/zephyr/build/zephyr/include/generated/linker_relocate.ld -s /home/bouffalo/zephyrproject/zephyr/build/zephyr/include/generated/linker_sram_data_relocate.ld -b /home/bouffalo/zephyrproject/zephyr/build/zephyr/include/generated/linker_sram_bss_relocate.ld -c /home/bouffalo/zephyrproject/zephyr/build/zephyr/code_relocation.c --default_ram_region RAM
Traceback (most recent call last):
  File "/home/bouffalo/zephyrproject/zephyr/scripts/build/gen_relocate_app.py", line 705, in <module>
    main()
    ~~~~^^
  File "/home/bouffalo/zephyrproject/zephyr/scripts/build/gen_relocate_app.py", line 662, in main
    rel_dict, phdrs = create_dict_wrt_mem()
                      ~~~~~~~~~~~~~~~~~~~^^
  File "/home/bouffalo/zephyrproject/zephyr/scripts/build/gen_relocate_app.py", line 626, in create_dict_wrt_mem
    warnings.warn("File: " + file_glob + " Not found", stacklevel=2)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UserWarning: File: /home/bouffalo/zephyrproject/zephyr/arch/riscv/core/xuantie/cache_xtheadcmo.c Not found
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /bin/cmake --build /home/bouffalo/zephyrproject/zephyr/build

I still need to figure out where to insert the environment variable.

Otherwise, also possible to make that particular warning trigger an error by changing it there:

warnings.warn("File: " + file_glob + " Not found", stacklevel=2)
continue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards/SoCs platform: Bouffalo Lab size: XS A PR changing only a single line of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants