Created
May 24, 2020 12:54
-
-
Save Novakov/14205a8c69424e48704c1d24cc89c5ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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