STM32Cube.py Process Utilities Part is a bit odd

Hi there it’s me a again,

After manually add support for STM32CubleWL from my last post.
Been working on it, encountered an odd thing, somehow in .platformio\platforms\ststm32\builder\frameworks\stm32cube.py

#
# Process Utilities
#

utils_dir = os.path.join(FRAMEWORK_DIR, "Utilities")
if os.path.isdir(utils_dir):
    for util in os.listdir(utils_dir):
        util_dir = os.path.join(utils_dir, util)
        # Some of utilities is not meant to be built
        if not os.path.isdir(util_dir) or not any(
            f.endswith((".c", ".h")) for f in os.listdir(util_dir)
        ):
            continue
        build_custom_lib(
            os.path.join(utils_dir, util),
            {
                "name": "Util-%s" % util,
                "dependencies": [{"name": "FrameworkVariantBSP"}],
                "build": {
                    "flags": ["-I $PROJECT_SRC_DIR", "-I $PROJECT_INCLUDE_DIR"],
                    "libLDFMode": "deep",
                },
            },
        )

The “# Some of utilities is not meant to be built” part is
determining an utilities is joined or not by examining with there’s .h or .c in it.
Which is going through the folders with os.listdir(util_dir)
It works for WB, L0, L1, L4, L5 series etcs, but unfortunately in WL’s cases
The Utilities/ is structured a little differently,

Utilities
├── conf
│   └── utilities_conf_template.h
├── lpm
│   └── tiny_lpm
│           ├── stm32_lpm_if_template.h/.c
│           └── stm32_lpm.h/.c
├── misc
│   ├── stm32_tiny_vsnprintf.h/.c
        .......
├── sequencer
│   └── stm32_seq.h/.c
├── timer
│   ├── stm32_timer_if_template.h/.c
│   └── stm32_timer.h/.c
├── trace
    └── adv_trace
        ├── stm32_adv_trace_if_template.h/.c
        └── stm32_adv_trace.h/.c

confirmed that the trace/ is missing by building log as well

|-- Util-misc
|   |-- FrameworkVariantBSP
|-- Util-sequencer
|   |-- FrameworkVariantBSP
|-- Util-timer
|   |-- FrameworkVariantBSP

Any ideas?
(P.S. sorry for accidentially posted when it’s not finished, and edited later)

Updating the builder script to fit the folder structures of newer HAL packages is one thing, but I don’t think devs are actively working on it right now, so if you want the simplest thing that can work, I’d advise you to copy the files that the builder script doesn’t build manually to the src/ folder of the project.

Sry for the late response, was dragged into another project.
Looks like for short term this should be the way, thanks for suggestion.