FreeRTOS hello world application on Cortex-M4 of VF61

I am following this link to load my hello world application to store on flash and run it on boot. Everything goes smooth until I came to following command.

setenv create_m4firmware 'ubi part ubi && ubi remove rootfs && ubi create m4firmware 0xe0000 static && run prepare_ubi'

When I run this command on U-boot, it gives me error that prepare_ubi command not found. The same happen with the update_rootfs command.

Can anyone help me to locate the definition of these commands?

What is the u-boot and image version you have on the module? What is the output of “version” from u-boot command line? You are probably running an older version of things on the module. Please update.

U-boot version is U-Boot 2015.04+fslc+gb66337d (Jun 10 2016 - 12:28:27). Isn’t it latest?

Did you execute “run setupdate” before trying create_m4firmware? Also note that it would be recommended to use the latest 2.6.1 image as it would have the required kernel drivers built as modules and deployed in the root filesystem. If you use an older image, you would have to build the kernel and deploy the modules to the root file system yourself.

The latest U-Boot is V2.6.1 and should have a banner like this:

U-Boot 2015.04+fslc+g46aa70c (Sep 29 2016 - 21:58:20)

I am following the exact steps given in documentation but when I run the m4boot 0x3f000000 command from u-boot, my VF61 is resetting.

Are you using the latest image? Please use the latest image. The u-boot version you shared earlier shows an older u-boot and image version being used.

Which one is latest? Can you share me the link? I have VF61 module with following sticker on it.
Col VF61 256MB IT
V1.2 A

You can download the latest 2.6.1 image for Vybrid from here.

I used this image and prepared SD card. Then I inserted that SD card into VF61 evaluation board and entered following commands.

Colibri VFxx # run setupdate
reading flash_blk.img
710 bytes read in 12 ms (57.6 KiB/s)
## Executing script at 80008000
reading colibri_vf/flash_blk.img
2397 bytes read in 17 ms (137.7 KiB/s)
## Executing script at 80008000
enter "run update" to update the entire module
Colibri VFxx # run update
reading colibri_vf/u-boot-nand.imx
457776 bytes read in 42 ms (10.4 MiB/s)

NAND erase.part: device 0 offset 0x20000, size 0x160000
Erasing at 0x160000 -- 100% complete.

NAND erase.part: device 0 offset 0x180000, size 0x80000
Erasing at 0x1e0000 -- 100% complete.

NAND write: device 0 offset 0x20000, size 0x160000
 1441792 bytes written: OK
UBI: default fastmap pool size: 200
UBI: default fastmap WL pool size: 25
UBI: attaching mtd1 to ubi0
UBI: attached by fastmap
UBI: fastmap pool size: 200
UBI: fastmap WL pool size: 100
UBI: attached mtd1 (name "mtd=3", size 510 MiB) to ubi0
UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
UBI: good PEBs: 4075, bad PEBs: 5, corrupted PEBs: 0
UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
UBI: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0
UBI: available PEBs: 0, total reserved PEBs: 4075, PEBs reserved for bad PEB handling: 75
Remove UBI volume rootfs (id 0)
Creating static volume kernel of size 8388608
Creating static volume dtb of size 131072
No size specified -> Using max size (498380800)
Creating dynamic volume rootfs of size 498380800
reading colibri_vf/zImage
4744320 bytes read in 256 ms (17.7 MiB/s)
4744320 bytes written to volume kernel
reading colibri_vf/vf610-colibri-dual-eth.dtb
** Unable to read file colibri_vf/vf610-colibri-dual-eth.dtb ** 

I checked into colibri_vf directory, there is no vf610-colibri-dual-eth.dtb. What’s the problem?

The u-boot environment variable fdt_file seems to be set to the device tree blob used for Dual Ethernet board. Did you change it at any point of time previously?. Run “env default -a” before executing “run setupdate” and continue please as before.