Skip to content

Invalid autocode for .init of components with async+serial port #1093

Description

@Kronos3
F´ Version
Affected Component

Problem Description

For an active/queued component that declares an async, serial-kind port, fpp-to-cpp generates a component init() with an extra, non-defaulted msgSize parameter ahead of the (defaulted) instance parameter:

// Generated in WasmSequencerComponentAc.hpp
void init(
    FwSizeType queueDepth, //!< The queue depth
    FwSizeType msgSize,    //!< The message size
    FwEnumStoreType instance = 0 //!< The instance number
);

fpp-to-cpp is generating the wrong .init invocation in the topology autocode

// Generated in RefTopologyAc.cpp
Ref::wasmSeq.init(QueueSizes::Ref_wasmSeq, InstanceIds::Ref_wasmSeq);
Ref::wasmSeq2.init(QueueSizes::Ref_wasmSeq2, InstanceIds::Ref_wasmSeq2);

We are calling init with the instance id in the msgSize spot instead. The instance defaults to 0 so all components get the same ID

Context / Environment

Latest devel

Execute fprime-util version-check and share the output.

Operating System: Darwin
CPU Architecture: arm64
Platform: macOS-26.5.2-arm64-arm-64bit-Mach-O
Python version: 3.13.11
CMake version: 3.26.0
Pip version: 25.1.1
Pip packages:
    fprime-tools==4.3.0
    fprime-gds==4.3.0
    fprime-fpp==3.3.0
Project submodules:

How to Reproduce

  1. Create a component with a an async input port portNameIn: serial
  2. Instantiate it into the topology

Expected Behavior

We should be calling .init with three arguments in the autocode

Activity

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

Metadata

Metadata

Assignees

Labels

code generationIssues related to code generation

Type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions