
today i started to understand how ld-tigcc is constructed and added in a -flash-app switch, but I have a lot of learning to do....

[code]
/*
Layout of a FLASH application:
1) Flash header (TI-Graph Link)
2) Certificate header
3) Application Header (type FLASH_APP_HEADER defined below)
4a) Relocation Map
4b) Application code
4c) Initial data table
*/
// *** Constants ***
#define FLASH_APP_MAGIC 0x167B533D
#define FLASH_APP_APPHDR_LOCALIZER 0x0001
// *** File Mapping Definitions ***
typedef struct ATTRIBUTE_PACKED
{
TI4 magic; //FLASH_APP_MAGIC
char name[[ 8 ]]; //Internal Name of the FLASH app. Must be unique from all other FLASH apps installed on the calculator.
I1 zeros[24]; //Reserved - initialize to zeros
TI2 flags; //Bit field FLASH_APP_APPHDR_LOCALIZER or zero.
TI4 dataLen; //Amount of static RAM to allocate for the FLASH APP. Contains static initialized (.data) and uninitialized (.bss) RAM sections
TI4 codeOffset; //Byte offset to code is a header-relative pointer to the beginning of the application code image
TI4 initDataOffset; //.data section is initialized by copying the data from this table
TI4 initDataLen; //length of initial data table
TI4 optlen; //optional header can follow this structure of optlen length. Never used by TI. Currently not used by ld-tigcc.
} FLASH_APP_HEADER;
[code]