Hi,
I am using the Unified Bootloader on S32K144, it works very well.
There is a flash driver (i.e., flash_api.bin) which is position independent, I want to learn how to build this driver, could you share the S32DS project?
I read Erich's article, but I still not sure how to generate the flash_api.bin.
Thank you,
Snaku
Solved! Go to Solution.
Hi Snaku,
I have received this answer from the owner of the bootloader:
Unfortunately, we don't have such a project.
The bin file can be created using these steps:
1. Compile flash driver(e.g., erase, program) in P-Flash at fixed address
2. Output S19 over S32DS
3. Copy the flash driver data to another S19 file from the complete S19 file
4. Used the objdump tool to transfer the S19(flash driver) to bin format
Regards,
Daniel
Hi Daniel,
Your help will be appreciated. thank you.
Snaku
Hi Snaku,
I have received this answer from the owner of the bootloader:
Unfortunately, we don't have such a project.
The bin file can be created using these steps:
1. Compile flash driver(e.g., erase, program) in P-Flash at fixed address
2. Output S19 over S32DS
3. Copy the flash driver data to another S19 file from the complete S19 file
4. Used the objdump tool to transfer the S19(flash driver) to bin format
Regards,
Daniel
Hello Daniel,
Where can I find the source files of S32K1xx flash driver?
Hi snaku,
Thanks for your response.
I found the flash_driver.c file in the flash partioning example of S32K DS. It has the alias functions defined in the struct tFlashOptInfo. This file probably can be used to generate the flash_api.bin.
The attached source file is flash driver I take from the example of flash_partitioning_s32k144.
C:\NXP\S32DS_ARM_v2.2\S32DS\software\S32SDK_S32K1xx_RTM_3.0.0\platform\drivers\src\flash
typedef struct
{
status_t (*FLASH_EraseAllBlock)(const flash_ssd_config_t * pSSDConfig);
status_t (*FLASH_VerifyAllBlock)(const flash_ssd_config_t * pSSDConfig,uint8_t marginLevel);
status_t (*FLASH_EraseSector)(const flash_ssd_config_t * pSSDConfig,uint32_t dest,uint32_t size);
status_t (*FLASH_VerifySection)(const flash_ssd_config_t * pSSDConfig,uint32_t dest,uint16_t number,uint8_t marginLevel);
void (*FLASH_EraseSuspend)(void);
void (*FLASH_EraseResume)(void);
status_t (*FLASH_Program)(const flash_ssd_config_t * pSSDConfig,uint32_t dest, uint32_t size,const uint8_t * pData);
status_t (*FLASH_ProgramCheck)(const flash_ssd_config_t * pSSDConfig,uint32_t dest,uint32_t size,const uint8_t * pExpectedData,uint32_t * pFailAddr,uint8_t marginLevel);
status_t (*FLASH_ProgramSection)(const flash_ssd_config_t * pSSDConfig,uint32_t dest,uint16_t number);
status_t (*FLASH_EraseBlock)(const flash_ssd_config_t * pSSDConfig, uint32_t dest);
status_t (*FLASH_CommandSequence)(const flash_ssd_config_t * pSSDConfig);
status_t (*FLASH_VerifyBlock)(const flash_ssd_config_t * pSSDConfig,uint32_t dest,uint8_t marginLevel);
} tFlashOptInfo;
Hi TysonHu ,
Yes, i agree with you, thanks for your information.
Snaku
Hi Daniel,
OK, that sounds interesting.
Thanks for your support.
Snaku