How to build the image file, flash_api.bin, of the Unified Bootloader?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to build the image file, flash_api.bin, of the Unified Bootloader?

ソリューションへジャンプ
3,808件の閲覧回数
snaku_lee
Contributor III

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

0 件の賞賛
返信
1 解決策
3,732件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

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

元の投稿で解決策を見る

0 件の賞賛
返信
8 返答(返信)
3,786件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @snaku_lee,

I'm sorry for the delay.

I'm currently trying to get the project.

 

BR, Daniel

0 件の賞賛
返信
3,767件の閲覧回数
snaku_lee
Contributor III

Hi Daniel,

Your help will be appreciated. thank you.

Snaku

0 件の賞賛
返信
3,733件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信
3,205件の閲覧回数
TysonHu
Contributor II

Hello Daniel,

 

Where can I find the source files of S32K1xx flash driver?

0 件の賞賛
返信
3,193件の閲覧回数
snaku_lee
Contributor III

Hi TysonHu,

NXP doesn't release the source code for the flash driver, 

but there is a post introduced how to extract the machine code by arm-none-eabi-objcopy.exe and then generate the flash_api.bin file.

FYI,

Snaku

 

 

0 件の賞賛
返信
3,185件の閲覧回数
TysonHu
Contributor II

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;

 

0 件の賞賛
返信
3,174件の閲覧回数
snaku_lee
Contributor III

Hi TysonHu ,

Yes, i agree with you, thanks for your information.

Snaku

0 件の賞賛
返信
3,720件の閲覧回数
snaku_lee
Contributor III

Hi Daniel,

OK, that sounds interesting.

Thanks for your support.

Snaku

0 件の賞賛
返信