Skip to content

Why assert _stext is within FLASH? #574

Open
@meowcakes

Description

@meowcakes

In link.x.in there is an ASSERT to prevent _stext being outside of flash. This prevents e.g. running the code from RAM after loading .text into RAM inside a pre_init with .text configured like

.text :
  {
      ...
  } > RAM AT > FLASH

ASSERT(_stext >= ORIGIN(FLASH) && _stext < ORIGIN(FLASH) + LENGTH(FLASH), "

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