Skip to content

Automatically making immutable const data reside in program memory #74

Open
@gergoerdi

Description

@gergoerdi

It would be useful to have a way of marking a string constant (a &'static [u8]?) explicitly to ensure it is put into PROGMEM. For reference, it can be done in C by using the PROGMEM macro on the definition of a const uint8_t[]:

const uint8_t font_rom[] PROGMEM = {
    0xF0, 0x90, 0x90, 0x90, 0xF0, 0x00, 0x00, 0x00
    };

and then you can use pgm_read_byte to read it one by one.

Out of scope: Automatically promoting static values to PROGMEM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustAffects overall Rust compiler architectureenhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions