Skip to content

Multiple UARTS always consume RAM #1425

Closed
@xxxajk

Description

@xxxajk

If I only use Serial, but not Serial[123] buffers and classes are created for all four.

I have patched iomxx0_1.h to allow me to remove this extra bloat. I verified that it works just fine on my Mega1280.

I do this by defining DISABLE_SERIAL[0-3] on the compiler command line I can disable UARTS I am not using. If I am only using one UART, I can save 510 bytes of ram, which is a huge amount for a micro-controller.

If there is any way of eliminating the bloat without modifying the headers, that would be awesome, however I don't see any way to do this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CoreRelated to the code for the standard Arduino APIComponent: HardwareSerialThe hardware serial functionality of the core libraries

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions