Skip to content

uno_r4_wifi: link failure — fl::platforms::println unimplemented for Renesas RA platform #2578

Closed

Description

@zackees

Symptom

Every uno_r4_wifi example build on master fails at the link step:

<artificial>:(.text+0x335a): undefined reference to `fl::platforms::println(char const*)'
collect2: error: ld returned 1 exit status
FAILED: AnalogOutput

Same failure for every example (Apa102, Apa102HD, etc.). Reproducible run: https://github.com/FastLED/FastLED/actions/runs/26677701985

Root cause

src/platforms/io.h declares the platform I/O API in fl::platforms namespace:

void println(const char* str) FL_NOEXCEPT;

Each platform supplies a thin glue .cpp.hpp that includes platforms/arduino/io_arduino.hpp (which delegates to Serial.println(...)):

platforms/arm/d21/io_samd21.cpp.hpp   →  #include "platforms/arduino/io_arduino.hpp"
platforms/arm/d51/io_samd51.cpp.hpp   →  same
platforms/arm/mgm240/io_mgm240.cpp.hpp →  same
platforms/arm/nrf52/io_nrf52.cpp.hpp  →  same
platforms/arm/rp/io_rp.cpp.hpp        →  same
platforms/arm/sam/io_sam.cpp.hpp      →  same
platforms/arm/stm32/io_stm32.cpp.hpp  →  same
platforms/avr/io_avr.cpp.hpp          →  same
platforms/esp/32/io_esp.cpp.hpp       →  same

src/platforms/arm/renesas/ has no io_renesas.cpp.hpp — the directory only contains clockless_arm_renesas.h, fastpin_arm_renesas.h, init_renesas.h, is_renesas.h, etc.

It also has no _build.cpp.hpp, and src/platforms/arm/_build.cpp.hpp doesn't include renesas/ either, so even if a file existed it wouldn't be compiled.

Net result: on Renesas RA (uno_r4_wifi, uno_r4_minima) the println declarations have no definitions → every TU that prints anything via the platform I/O layer link-errors.

Affected jobs

  • uno_r4_wifi (every example)
  • uno_r4_minima (same code path — fails identically)

Proposed fix

  1. Add src/platforms/arm/renesas/io_renesas.cpp.hpp mirroring io_sam.cpp.hpp:

    #pragma once
    // IWYU pragma: private
    #include "platforms/arm/renesas/is_renesas.h"
    
    // ok no namespace fl
    
    #ifdef FL_IS_RENESAS
    #include "platforms/arduino/io_arduino.hpp"
    #endif
  2. Add src/platforms/arm/renesas/_build.cpp.hpp:

    // IWYU pragma: private
    /// @file _build.hpp
    /// @brief Unity build header for platforms/arm/renesas/ directory
    #include "platforms/arm/renesas/io_renesas.cpp.hpp"
  3. Add the include to src/platforms/arm/_build.cpp.hpp so the unity build sees it.

Repro

bash compile uno_r4_wifi --examples Blink


Filed automatically while triaging broken builds; intent is to open a PR immediately.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions