x_heep_gen.linker_section module

class x_heep_gen.linker_section.LinkerSection(name: str, start: int, end: int | None)

Bases: object

Object representing a section in the linker configuration.

If the end address is set to None it will be infered in the building process.

static by_size(name: str, start: int, size: int) LinkerSection

Creates a Linker Section by it’s size rather than end address.

Parameters:
  • name (str) – the name of the section

  • start (int) – the start address

  • size (int) – the size of the section

Returns:

the linker section

Return type:

LinkerSection

check()

Does basic type checking and sanity checking.

  • Checks the type of all members

  • Checks that the name is not empty

  • Checks that the start address and size are positive

Raises:
  • TypeError – when the type of a member is not the correct ine.

  • ValueError – when the name is empty or start or size are negative

end: int | None

The end address

name: str

The name of the section

The name can be anything that does not collide with section names used by the linker, except code and data that are used to configure the size of the code and data part. code and data do not only contain the actual .code and .data section but other related sections.

property size: int | None

The size in Bytes

start: int

The start address