cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong partition size and "Error while reading the file" while programming flash layout to STM32MP157

Mischo5500
Associate II

Hi,

after changing some kernel settings probably, I suddenly can not flash it to our custom STM32MP157 based board. Process fails around 100% of last partition with error: "Error: Error while reading the file"

Looks like Cube reads file size incorrectly. Cube output:

 16:30:48:454 :  Size         : 1.27 GB

 16:30:48:454 :  Partition ID : 0x12

 16:30:48:454 : Download in Progress:

 16:30:48:454 :  Size         : 104857600 Bytes

Real file size in explorer is

Size: 1,26 GB (1 363 148 800 bytes)

Size on disk: 1,26 GB (1 363 148 800 bytes).

Size of other partition images is read correctly.

When I use other image, the printed size is same (but still wrong)

 16:52:06:736 :  Size         : 104857600 Bytes

Should be 1,22 GB (1 312 153 600 bytes)

but Cube is able to flash it correctly

I'm using v2.13.0 version.

What could be causing the problem? I can't see, how changing of kernel configuration alone can affect flashing process.

Thanks in advance,

Michal

3 REPLIES 3
Erwan SZYMANSKI
ST Employee

Hello @Michal Špánik​ ,

Are you still stuck with your issue ?

Can you precise a little bit your setup (OSTL version ? way to generate your flash image ? Do you use Distribution package with Yocto ?)

Did you try to revert your kernel modification and see if it has an effect ? And if yes, what change bring you the trouble ?

What is the flash memory used with your custom board ?

Kind regards,

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
PatrickF
ST Employee

Hi @Michal Špánik​ ,

I first think it could be a similar issue than https://community.st.com/s/question/0D53W000025BLVDSA4/cube-programmer-cant-handle-numbers-larger-than-32-bits-in-the-offset-field

This particular issue (display only as far as I know) would be solved in CubeProgrammer v2.14

Maybe share your TSV, complete CubeProg log and UART console LOG

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Mischo5500
Associate II

Hi @Erwan SZYMANSKI​ @PatrickF​ ,

sorry for late response.

I'm building openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15 repo tag using Kirkstone Yocto on Debian machine. I'm using own distribution and modified machine file.

I can test to revert kernel changes selectively to see, what could break it (if problem is not image size dependent).

I'm flashing and booting from IS21ES08G eMMc memory.

I'm attaching TSV file and logs.

I can send you binary image files too, if it helps, there is nothing proprietary in them yet.

Thanks in advance,

Michal