Skip to content

Addition of PICO_32BIT guard to pico_add_hex_output #2690

@thytom

Description

@thytom

Mentioned in #1829 previously.

efe2103 removes the function pico_add_extra_outputs from src/rp2_common.cmake and adds it to src/cmake/on_device.cmake. In the process, the call to pico_add_hex_output gained an if statement:

if (PICO_32BIT)
    pico_add_hex_output(${TARGET})
endif()

Removing the if still enables my projects to build, and hex file output works fine.

It's not really explained why this was done. PICO_32BIT appears to have little consequence other than enabling a static assertion in src/common/pico-sync/critical_section.c.

At the time of efe2103, this caused hex files to no longer be generated without an explicit set(PICO_32BIT 1) in the parent project. c08710c simply just sets PICO_32BIT to 1 in the chip-specific .cmake files to work around the if.

While the flag itself seems pretty benign, I'm still confused as to why the if is there in the first place. Why not remove it, generate hex files unconditionally?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions