Skip to content

Add predefined sections in platform.txt #132

Closed
@slabbi

Description

@slabbi

Please consider to change
compiler.c.elf.flags={compiler.warning_flags} -Os -Wl,--gc-sections
to
compiler.c.elf.flags={compiler.warning_flags} -Os -Wl,--gc-sections,--section-start=.FAR_MEM1=0x10000,--section-start=.FAR_MEM2=0x20000,--section-start=.FAR_MEM3=0x30000

This allows to use sections directly when coding on an e.g. ATmega2560 that has 256kb memory.
Example:

#define HIGHPROGMEM2 attribute((section(".FAR_MEM2")))
const char ttl_short[] HIGHPROGMEM2 = "...";

Thanks :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions