Skip to content

Link on lower-memory microcontroller #2281

@jacobschloss

Description

@jacobschloss

I'm trying to use cyclone on a microcontroller with Zephyr 4.2 with 320kB of sram, of which about 250kB is free before using cyclone. It seems to build ok after applying a few small patches for header files, the networking patch in cyclone's tree, and removing a few things like cyclone's version of recvmsg which zephyr seems to provide now (CONFIG_POSIX_NETWORKING, CONFIG_XSI_REALTIME).

The first call to dds_create_participant makes me overflow sram by 86kB, so it seems like cyclone is pulling about 300kB-400kB of compile time data into the noinit section.

Are there any tunables to reduce static ram use?
Any thoughts on the minimum ram requirements for a microcontroller to use cyclone?

... did some looking around ...

It looks like the bulk of it is from the threads stacks with defaults sizes defined at thread.c lines 239 / 243.
CYCLONEDDS_THREAD_COUNT
CYCLONEDDS_THREAD_STACK_SIZE

Any thoughts on a reasonable number of threads for a low message rate (eg ~100-500Hz, small <100B messages)? Eg, setting CYCLONEDDS_THREAD_COUNT to 2?

I'll do some testing with CYCLONEDDS_THREAD_COUNT=2 and CYCLONEDDS_THREAD_STACK_SIZE=16384. This is able to fit easily.

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