VF50: Flashdisk not formated automatically after BSP update to 1.5

I have updated from the BSP release 1.5b2 to release 1.5 and installed the needed updates from Microsoft.
With BSP version 1.5b6 a bug was fixed which lead to a corrupt filesystem (Issue 28617) and because of that the flashdisk should get formated automatically after the update according to the description.
But it seems not to be the case. My system hangs for around a minute in Wait4FlashDisk and only then continues. When I want to shut down the system it gets stuck. I can resolve the problem by executing the eraseflash filesystem command through the bootloader. But of course this is not an option for our customers.

How can I format the flashdisk from the application, e.g. with the update tool? An older version of the update tool supported the command /wu but this is no longer working in the newest version.

Dear @andreas

As you already mentioned, wiping the flashdisk is currently not supported in the UpdateTool. I wrote a small utility which does nothing else than erasing all flash blocks in the region of the filesystem, I called it

Edit (Refer to this comment below):
Do not use VFxx_EraseflashFilesystem.exe. Use the following tool instead:

Because it is dangerous to start the application, I added a small layer of safety: you need to call the executable like this:
VFxx_EraseflashFilesystem /wue

After calling this function the data in the flash is corrupted, therefore you should reboot the system. During the boot process, WinCE will detect the erased flashdisk and reformat it.

In the long run our plan is to integrate the wiping functionality into the UpdateTool again.

Have a nice weekend
Andy

Hi Andy

Unfortunately it doesn’t work with this executable. When I want to reboot the system after I executed this utility it always ends in the following log output of the bootloader:

Loading OS Image
Error reading pToc from FLASH.
Error reading OS Image from flash

The system can’t be rebooted afterwards. Even the eraseflash filesystem command of the bootloader doesn’t help then. WindowsCE somehow doesn’t reformat the flashdisk during startup.

How should we proceed, what are my possibilities?
The problem seem to have existed already here: Question 9012.

Thanks in advance.

Hi @andreas

Please tell us precisely what your start configuration was and which steps you did to force the error.

I successfully did the following steps:

Configure the module to the initial state (WEC7 V1.5b2)

  1. Using Update Tool to load Eboot 1.5b2 and WEC7 V1.5b2 onto a Colibri VF50
  2. Clear the registry
  3. Reboot
  4. Enter the bootloader command prompt and execute
    eraseflash filesystem
    Verify that V1.5b2 boots

Update to WEC7 V1.5

  1. Use the UpdateTool 7.5.0(2.0) to flash Eboot V1.5 and WEC7 V1.5
  2. Execute VFxx_EraseflashFilesystem.exe /wue
    Verify on the debug output that the Erasing was done.
  3. Reboot
    Verify that V1.5 boots.

If it still doesn’t work, can you please send me a log of the boot process with V1.5b2. While booting, please break into the bootloader menue and enter

X
set part
exit
L

To get some additional information.

Regards, Andy

Hi Andy

I have Eboot 1.5 and an OS Image with version 1.5b installed.
Then I did now the update with the newest UpdateTool 7.5.0(2.0). First again the Eboot and then our newest OS Image with BSP 1.5. Following that I executed the VFxx_EraseflashFilesystem.exe utility. I don’t get it to work.

Here is the output of the bootloader:

Toradex Bootloader 1.5 for Vybrid Built Dec 18 2017
CPU  :  400 Mhz
Flash:  128 MB
RAM  :  128 MB
Colibri VF50 module version 1.2A Serial No.: 2917383

Press [SPACE] to enter Bootloader Menu

Initiating image launch in 0 seconds.
Loading OS Image
.......................................................................................
Done.
OEMLaunch 80004000
Windows CE Kernel for ARM (Thumb Enabled)

Toradex Windows CE 7.0 1.5b2 for Vybrid Built Jul 19 2017
Registry - registry is empty.
Loading EDMA...
Done EDMA
Loading NAND...
Done NAND
Loading UARTA...
Port is used for OS debug!.
Loading I2C1...
Done I2C1
Loading WKU...
WakeupSources:
    SODIMM 43  wake up when toggling.
Done WKU
Waiting for flash disk \FlashDisk for 60 seconds
Folder mounted
Loading USB Device...
Done USB Device
EDID: parameter:pclk did not change
EDID: update Registry: pcp, orig:0x1, edid:0x0
EDID: parameter:pcp did not change
EDID: parameter:hsw did not change
EDID: update Registry: blw, orig:0x28, edid:0x2d
EDID: parameter:blw did not change
EDID: parameter:elw did not change
EDID: parameter:vsw did not change
EDID: update Registry: bfw, orig:0x8, edid:0x10
EDID: parameter:bfw did not change
EDID: parameter:efw did not change
EDID: update Registry: hsp, orig:0x0, edid:0x1
EDID: parameter:hsp did not change
EDID: update Registry: vsp, orig:0x0, edid:0x1
EDID: parameter:vsp did not change
EDID: parameter:oep did not change
Loading ENET2...
Done ENET
ENET: Using mac from serial number
The name for the external PHY is KSZ8041
ENET Auto-Negotiation
ENET : Auto-negotiation is on
Loading ESDHC2...
Done ESDHC2
WKPU interrupt received
Loading ADC1...
Done ADC1...
Loading ADC2...
Done ADC2...
Loading Display Driver...
Done Display Driver
Loading PS2...
Failed PS2
Loading Touch...
Done Touch
+OEMSetAlarmTime(2007/1/1 0:0:15.000)
-OEMSetAlarmTime(rc = 1)
Erasing block....Erasing done. Please Reset the system...
Toradex Bootloader 1.5 for Vybrid Built Dec 18 2017
CPU  :  400 Mhz
Flash:  128 MB
RAM  :  128 MB
Colibri VF50 module version 1.2A Serial No.: 2917383

Press [SPACE] to enter Bootloader Menu

Initiating image launch in 1 seconds.


BootLoader Configuration:

C) Clear Flash Registry
X) Enter CommandPrompt Mode
D) Download image to RAM now
F) Download image to FLASH now
L) Launch existing flash resident image now


Enter your selection: x

>set part
part.nonfssize: 64              (Size of the non-filesystem partition (in MB))

>exit


BootLoader Configuration:

C) Clear Flash Registry
X) Enter CommandPrompt Mode
D) Download image to RAM now
F) Download image to FLASH now
L) Launch existing flash resident image now


Enter your selection: l
Loading OS Image
Error reading pToc from FLASH.
Error reading OS Image from flash

Dear @andreas

Thank you for the bootloader log.
The issue is probably the non-matching bootloader (V1.5) and OS image (V1.5b2).

Try to update or downgrage both the bootloader and the OS image to identical versions, before rebooting.

Regards, Andy

Hi Andy

Unfortunatelly this is not the problem. I did again the whole procedure as you described above with the bootloader and BSP versions you used.

I mean it is not the case that my newest BSP of version 1.5 is not working, but to make it work I currently have to wipe the flashdisk with the bootloader command eraseflash filesystem. Then it works as expected. But wiping the flashdisk with the utility you delivered me the system wont start anymore afterwards. Somehow it does not exactly the same as the bootloader command.

What might be the problem?

Dear @andreas

I slightly modified the tool to match the behavior of the bootloader (the previous tool erased 1 block more than the bootloader, which I think should be correct, too. So I don’t believe this is the issue. However, you can give it a try:

I tested the whole update procedure again, without any issues. I edited my previous comment to add more details.

Am I correct that you try to load your own custom OS image based on BSP V1.5? Please repeat the procedure using our standard V1.5 image. Does the problem still remain?

Regards, Andy

Hi Andy

With this new VFxx_EraseflashFilesystem2.exe tool it works now. It is very likely (must be the case) that erasing this extra block in the flash (don’t know where it is located) was too much in certain circumstances.

Thanks for the support.

Andreas