Skip to content

Instantly share code, notes, and snippets.

@Novakov
Created May 24, 2020 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Novakov/14205a8c69424e48704c1d24cc89c5ab to your computer and use it in GitHub Desktop.
Save Novakov/14205a8c69424e48704c1d24cc89c5ab to your computer and use it in GitHub Desktop.
def use_terminal_descriptors() -> Iterable[SectionItem]:
yield Symbol('__terminal_start').assign(here)
yield UseInput(section='.terminal.description').keep()
yield Symbol('__terminal_end').assign(here)
class MyScript(ArmQEMU):
def __init__(self):
super(MyScript, self).__init__()
self.FLASH = Segment(origin=0x0, length=10 * 1024 * 1024, attributes=SegmentAttributes.ProgramMemory)
self.RAM = Segment(origin=0x20000000, length=1 * 1024 * 1024, attributes=SegmentAttributes.DataMemory)
def section_rodata(self) -> Iterable[SectionItem]:
yield from use_terminal_descriptors()
@property
def segment_program(self):
return self.FLASH
@property
def segment_data(self):
return self.RAM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment