Hello Piotr Cerba:
Bob Paddock is correct, the FlashProgram() function of the driver expects a pointer to a raw array of bytes, not a structure. You can cast the parameter to match the uint8_t* expected by the driver, like this:
FlashProgram(&flashSSDConfig, destAdrss, sizeof(first), (uint8_t*)&first, g_FlashLaunchCommand);
This is what I get in KDS with GCC using your code (except that I used address 0x80000) and considering that the ARM Cortex-M core in Kinetis uses little endianness:

Since the structure is stored in Flash in the same order as the variable in RAM, then you can retrieve the data from flash by using a simple pointer to the same kind of structure, something like this:
typedef struct
{
int x, y;
char name[40];
} myStruct, *myStructPtr;
//...
myStruct first = { .custom = "ON", .x = 1, .y = 123, .name = "George" };
myStructPtr firstPtr = (myStructPtr)0x80000;
//...
destAdrss = 0x80000;
FlashProgram(&flashSSDConfig, destAdrss, sizeof(first), (uint8_t*)&first, g_FlashLaunchCommand);
//Erasing "first"
first.x = 0;
first.y = 0;
//Recovering "first"
first.x = firstPtr -> x;
first.y = firstPtr -> y;
:smileyalert: Note that the core processor is 32-bit (4 bytes), but the smallest programming size for the flash memory controller in K64 (FTFE) is 8-bytes (phrase). Therefore the flash driver expects that the size parameter is a multiple of 8 and the dest address parameter is aligned to an 8-bytes boundary. The size of your structure is 40 + 4 + 4 = 48 bytes, which is good, but if you add more members and the size is not a multiple of 8, then you may need to add padding bytes, considering that the compiler may add its own padding bytes to a member which is not 4-bytes long, as mentioned by Bob.
I hope this information is helpful.
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------