SEGMENT_ADDRESS

Supported by Ginmake 2.19+

[SEGMENT_ADDRESS,<segment_name>,<gemscom_address>,<size>[,<physical_address>[,gcc_section]]]

Defines address / size of a segment previously defined by a SEGMENT definition. This removes the need for PAGETBL / PAGETBLv2 – memory segments can be defined purely with SEGMENT and SEGMENT_ADDRESS since ginmake 2.19. This is preferable for code that does not use a page table for gemscom address translation.

Parameter Description

<segment_name> Name of the segment to match that in its SEGMENT definition
<gemscom_address> Address of the segment used over the gemscom protocol. This is a virtual address and is remapped by the ECU to a physical address.
Size of the segment, in bytes. At time of writing, GWv4 will read/write entire calibration (NVM) segments.
<physical_address> Optional physical address of the segment from the perspective of the target computer (the ECU). This may be useful for diagnostic purposes in future.
<gcc_section> Section name used by linker for this segment that will appear in the GNU linker map file.

Example

An example of using SEGMENT and SEGMENT_ADDRESS to define memory segments without needing a page table (PAGETBL / PAGETBLv2).

1// [LSB_FIRST][SEGMENT,ram,Measurements,SEG_RAM,,none]
2// [LSB_FIRST][SEGMENT,nvm,Calibration,SEG_NVM,,none]
3// [LSB_FIRST][SEGMENT,rom,Identity,SEG_ROM,,none]
4// [SEGMENT_ADDRESS,Measurements,0x0000,0x0100,.modelData]
5// [SEGMENT_ADDRESS,Calibration,0x0100,0x1E00,0x20009000,.modelDataNVM]
6// [SEGMENT_ADDRESS,Identity,0x1F00,0x0100,0x2000F000]