This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how to Store the video to flash in DM6446EVM

Hi,

I am using spectrum digital Davinci DM6446EVM board. We are working with video loop back application . The captured video is going to the input buffer of DDR2. From the output buffer of DDR2, vpbe is reading the video and displays it.

Now i want to store the captured video data into flash, or SRAM or SD Card peripherals. any one guide me.. how to move the video from DDR2 to Flash or any storage device. What are the steps (algorithm) to be followed to store the video in peripherals. we are working with CCS5.0.(windows xp). Is there any example codes on how to store the video. please help us out... 

  • Hi Azhagiri,

    Apologies, As per my knowledge we are not having any example code for your requirement.
    You need to develop your own code.

    I will suggest you to use DVSDK Encode example code.

    dvsdk_2_00_00_22/dvsdk_demos_2_00_00_07/dm6446/encode
    You can refer encode code to store captured video and can modify it as per your requirement.
  • Hi sir thank you..
    we ll try this code.. i searched for the code which keyword you have given. i am getting only SPRAA96A document. where i can get the encode demo example codes, can you provide me any link..

    Regards,
    azhagiri
  • Hi Azhagiri,

    You can download DVSDK packages from below mentioned link.
    processors.wiki.ti.com/.../DMAI_GStreamer_Plug-In_Getting_Started_Guide

    Do let me know if you face any difficulty.
  • Hi,

    Which release are you using dvsdk/psp ?

    Cheers,
    --Prabhakar Lad
  • sir,

    we have received the demo cd, with in that we have (mvl_5_0_demo_sys_setuplinux.bin). will it possible with this encode demo code to do this task in windows xp with ccs5.0
  • sir,
    this is the first time we are trying this exercise. In our demo cd we got this bin file
    (mvl_5_0_demo_sys_setuplinux.bin).
  • Hi Azhagiri,

    mvl_5_0_demo_sys_setuplinux.bin is a installation file which contains MontaVista tool chain and the target file system.

    This installation file is developed for linux environment only not for windows.

    You need to install dvsdk_setuplinux_#_#_#_#.bin (DVSDK installer) and  mvl_5_0_demo_sys_setuplinux.bin.

  • Hi Arvind,

    Thank you. I have installed DVSDK and since it is a spectrum digital DVEVM "mvl_5_0_demo_sys_setuplinux.bin"is already installed- when I run in uboot i get as below:


    davinciDM644x initialization passed!
    TI UBL Version: 1.50
    Booting Catalog Boot Loader
    BootMode = NAND
    Starting NAND Copy...
    Valid magicnum, 0xA1ACED66, found in block 0x00000006.
    DONE
    Jumping to entry point at 0x81080000.


    U-Boot 1.2.0 (Apr 13 2009 - 12:08:08)

    I2C: ready
    DRAM: 256 MB
    unknown vendor=0 Flash: 0 kB
    NAND: NAND device: Manufacturer ID: 0xec, Chip ID: 0x36 (Samsung NAND 64MiB 1,8
    V 8-bit)
    64 MiB
    In: serial
    Out: serial
    Err: serial
    ARM Clock :- 297MHz
    DDR Clock :- 162MHz
    MSP430 Firmware supports AM/PM Feature
    Hit any key to stop autoboot: 0

    Loading from NAND 64MiB 1,8V 8-bit, offset 0x200000
    Image Name: Linux-2.6.18_pro500-davinci_evm-
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 2018280 Bytes = 1.9 MB
    Load Address: 80008000
    Entry Point: 80008000
    ## Booting image at 80700000 ...
    Image Name: Linux-2.6.18_pro500-davinci_evm-
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 2018280 Bytes = 1.9 MB
    Load Address: 80008000
    Entry Point: 80008000
    Verifying Checksum ... OK


    Now where can I get editable video demo or sample ?where/how shall i write edit compile the code? how to run the video application here? should I try spraap3a.zip samples? i need drivers for this?

    Regards,

    Azhagiri
  • Hi Azhagiri,

    DM6446 encode/decode demos are included in dvsdk itself.

    ~/dvsdk_2_00_00_22/dvsdk_demos_2_00_00_07/dm6446/ . Here encode, decode and encodedecode demos are available.

    Try to understand the source code flow by running these demo examples.

    You can refer below mentioned link to run demos.

    processors.wiki.ti.com/.../Using_the_community_kernel_on_DM6446_with_the_DVSDK
  • Hi,

    Which Linux os u suggest for host pC? or any OS distribution is fine?

    Regards,

    Venkatraman Bhat
  • I will recommend you to use Ubuntu12.04 for host pc
  • @Arvind Singh :

    I have installed the dvsdk and was trying to run the commands, I got struck in how to run below commands? how to go to target linux shell?

    Target $ cd /opt/dvsdk/dm6446

    Target $ ./loadmodules.sh

    REF: Refer: sprue66e.pdf page 35:

    When you power on the EVM, you will see boot sequence messages.

    You can press a key to interrupt the boot sequence and type

    commands in the U-Boot command shell. In this guide, commands to

    be typed in the U-Boot shell are indicated by an

    EVM # prompt.

    "4.1.1 Command Prompts in This Guide

    In this guide, commands are preceded by prompts that indicate the

    environment where the command is to be typed. For example:

    ? host $

    Indicates command to be typed into the shell window of the host

    Linux workstation.

    ? EVM #

    Indicates commands to be typed into the U-Boot shell in a console

    window connected to the EVM board's serial port. (Section 2.2)

    ? target $

    Indicates commands to be typed into the Linux shell in the terminal

    window connected to the EVM board's serial port."

    Refer: sprue66e.pdf page 30:

    "Running the Demos from the Command Line:

    You can run the demo applications from the Linux shell in a terminal

    window connected to the EVM board’s serial port. These are the same

    demos described in Section 3.2, Starting the Standalone Demos.

    1) See Section 2.2, Connecting to a Console Window for instructions

    regarding communicating with Linux running on the EVM.

    2) Login to the target as root. No password is required.

    3) Move to the appropriate directory on the target using the following

    command. (See Section 4.1.1 for the meanings of command prompts

    shown in this document.)

    Target $ cd /opt/dvsdk/dm6446

    4) Before running demo applications from the command line, the CMEM

    and accelerator kernel modules must be loaded.

    ¦ Use "lsmod" to see if they are loaded. You should see output

    similar to the following:

    Target $ lsmod

    Module Size Used by

    dsplinkk 98220 0

    cmemk 20072 0

    ¦ If they are not loaded, use the following commands to load these

    modules.

    Target $ ./loadmodules.sh

    5) If a standalone demo is running, kill that process. You can do this by

    pressing the Power button on the remote from the main menu. Or,

    use the following commands:

    Target $ killall -9 interface

    6) To see the command-line options for the demos, use one of the

    following commands with the -h or --help option:

    Target $ ./encodedecode -h

    Target $ ./encode -h

    Target $ ./decode -h "

    I have logged in as root

    and ran command as below :

    #minicom

    and on minicom I am getting UBOOT messages and if i abort it by pressing any key I get

    EVM#

    then where to run the

    Target $ ./loadmodules.sh  

    command? have to exit from the root? I am not getting target$ prompt or if I type this target commands in my normal linux shell I am getting below error:

    "U-Boot 1.2.0 (Apr 13 2009 - 12:08:08)

    I2C:   ready

    DRAM:  256 MB

    unknown vendor=0 Flash:  0 kB

    NAND:  NAND device: Manufacturer ID: 0xec, Chip ID: 0x36 (Samsung NAND 64MiB 1,8V 8-bit)

    64 MiB

    In:    serial

    Out:   serial

    Err:   serial

    ARM Clock :- 297MHz

    DDR Clock :- 162MHz

    MSP430 Firmware supports AM/PM Feature

    Hit any key to stop autoboot:  0

    DaVinci EVM #

    CTRL-A Z for help |115200 8N1 | NOR | Minicom 2.1    | VT102 |      Offline                                                                                                    

    [root@fed14testpc testuser]# root

    Command not found.

    [root@fed14testpc testuser]# cd /home/dvsdk_2_00_00_22/dvsdk_demos_2_00_00_07/dm6446/

    [root@fed14testpc dm6446]# ./loadmodules.sh

    insmod: can't read 'cmemk.ko': No such file or directory

    insmod: can't read 'dsplinkk.ko': No such file or directory

    mknod: missing operand after `0'

    Try `mknod --help' for more information.

    [root@fed14testpc dm6446]# ./encodedecode -h

    bash: ./encodedecode: is a directory"

     

    I got EVM#, host$ but not clearly getting how to go and where to type target$ commands? how get into it?

     

    Regards,

    Azhagiri

  • @Arvind Singh :

    I have installed the dvsdk and was trying to run the commands, I got struck in how to run below commands? how to go to target linux shell?

    Target $ cd /opt/dvsdk/dm6446

    Target $ ./loadmodules.sh

     

    5) If a standalone demo is running, kill that process. You can do this by

    pressing the Power button on the remote from the main menu. Or,

    use the following commands:

    Target $ killall -9 interface

    6) To see the command-line options for the demos, use one of the

    following commands with the -h or --help option:

    Target $ ./encodedecode -h

    Target $ ./encode -h

    Target $ ./decode -h "

    I have logged in as root

    and ran command as below :

    #minicom

    and on minicom I am getting UBOOT messages and if i abort it by pressing any key I get

    EVM#

    then where to run the

    Target $ ./loadmodules.sh  

    command? have to exit from the root? I am not getting target$ prompt or if I type this target commands in my normal linux shell I am getting below error:

    "U-Boot 1.2.0 (Apr 13 2009 - 12:08:08)

    I2C:   ready

    DRAM:  256 MB

    unknown vendor=0 Flash:  0 kB

    NAND:  NAND device: Manufacturer ID: 0xec, Chip ID: 0x36 (Samsung NAND 64MiB 1,8V 8-bit)

    64 MiB

    In:    serial

    Out:   serial

    Err:   serial

    ARM Clock :- 297MHz

    DDR Clock :- 162MHz

    MSP430 Firmware supports AM/PM Feature

    Hit any key to stop autoboot:  0

    DaVinci EVM #

    CTRL-A Z for help |115200 8N1 | NOR | Minicom 2.1    | VT102 |      Offline                                                                                                    

    [root@fed14testpc testuser]# root

    Command not found.

    [root@fed14testpc testuser]# cd /home/dvsdk_2_00_00_22/dvsdk_demos_2_00_00_07/dm6446/

    [root@fed14testpc dm6446]# ./loadmodules.sh

    insmod: can't read 'cmemk.ko': No such file or directory

    insmod: can't read 'dsplinkk.ko': No such file or directory

    mknod: missing operand after `0'

    Try `mknod --help' for more information.

    [root@fed14testpc dm6446]# ./encodedecode -h

    bash: ./encodedecode: is a directory"

     

    I got EVM#, host$ but not clearly getting how to go and where to type target$ commands? how get into it?

     

    Regards,

    Azhagiri

  • Hi Azhagiri,

    You cannot run these examples form u-boot prompt. you need to boot kernel and file system.
    First of all you try to boot kernel and file system sucessfully.
    In sprue66e.pdf all mentioned steps can be followed after booting filesystem sucessfully.


    [root@fed14testpc testuser]# cd /home/dvsdk_2_00_00_22/dvsdk_demos_2_00_00_07/dm6446/
    [root@fed14testpc dm6446]# ./loadmodules.sh
    insmod: can't read 'cmemk.ko': No such file or directory
    insmod: can't read 'dsplinkk.ko': No such file or directory

    You can not load modules on your host system as they are been compiled for target.
    Also before loading modules, you need to cross-compile them.

    Follow these steps to compile.
    1. There is a Rules.make file in dvsdk directory.

    Edit Rules.make file , and sync it with your installed packages.

    2. sudo make PLATFORM=dm6446

    After getting compiled successfully, An install directory will be created which will be having all encode decode and encodedecode executables, also dsplinkk.ko and cmem.ko.
  • Thank you Arvind,

    ok. i ll do these steps. i have seen sudo make PLATFORM=dm6446 part, but how can i edit and compile these .make file? any particular tool? and also how to boot the kernel and file system, which steps i have to follow?

    Regards,
    azhagiri.s
  • Hi Azhagiri,
    Their is no need of any particular tool to edit mkae file. you can use vim editor of gedit to open and can edit it.

    You can boot kernel and file system in lot of ways. TFTP etc
    You need to set proper boot arguments.
    Please refer below mentioned threads , hope they will help you out.
    e2e.ti.com/.../23819
    e2e.ti.com/.../6317

  • Hi,

    I have tried the steps in the user guide I am getting below error in the installation steps in the section 4.3.5 NFS file sharing (SPRUE66E.pdf) :

    root@venkat-linux:/home/DM6446/workdir/filesys#
    root@venkat-linux:/home/DM6446/workdir/filesys# ls
    bin dev home media opt root srv tmp var
    boot etc lib mnt proc sbin sys usr
    root@venkat-linux:/home/DM6446/workdir/filesys# cd etc/
    root@venkat-linux:/home/DM6446/workdir/filesys/etc# vi exports
    root@venkat-linux:/home/DM6446/workdir/filesys/etc# /usr/sbin/exportfs -av
    bash: /usr/sbin/exportfs: No such file or directory
    root@venkat-linux:/home/DM6446/workdir/filesys/etc# cd ..
    root@venkat-linux:/home/DM6446/workdir/filesys# usr/sbin/exportfs -av
    bash: usr/sbin/exportfs: cannot execute binary file
    root@venkat-linux:/home/DM6446/workdir/filesys# /etc/init.d/nfs status
    bash: /etc/init.d/nfs: No such file or directory
    root@venkat-linux:/home/DM6446/workdir/filesys# etc/init.d/nfs status
    bash: etc/init.d/nfs: No such file or directory
    root@venkat-linux:/home/DM6446/workdir/filesys# etc/init.d/iptables status
    bash: etc/init.d/iptables: No such file or directory
    root@venkat-linux:/home/DM6446/workdir/filesys#

    Can you suggest whats wrong here?

    Regards,

    Azhagiri S
  • Hi further to previous querries I have moved a little bit in this, I am able to "exporting a shared file system for target "(SPRUE66E.pdf section 4.3.6) but when performing step 6 ie EVM # boot Iam getting below log and it is hanging after
    Starting kernel ...

    Uncompressing Linux.............................................................


    1) the log below for your review:

    Hit any key to stop autoboot: 0
    DaVinci EVM # setenv nfshost 192.168.50.217
    DaVinci EVM # setenv rootpath root@venkat-linux:/home/DM6446/workdir/filesys
    DaVinci EVM # setenv bootargs
    DaVinci EVM # setenv bootargs video=davincifb:vid0=720x576x16,2500K:vid1=720x576x16,2500K:osd0=720x576x16,2025K d
    avinc_enc_mngr.ch0_output=COMPOSITE davinci_enc_mgr.ch0_mode=$(videostd) console=ttys0,115200n8 noinitrd rw ip=dh
    cp root=/dev/nfs nfsroot=$(nfshost):$(rootpath),nolock mem=120M
    DaVinci EVM #

    DaVinci EVM # saveenv
    Saving Environment to NAND...
    Erasing Nand...Writing to Nand... done
    DaVinci EVM # boot

    Loading from NAND 64MiB 1,8V 8-bit, offset 0x200000
    Image Name: Linux-2.6.18_pro500-davinci_evm-
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 2018280 Bytes = 1.9 MB
    Load Address: 80008000
    Entry Point: 80008000
    ## Booting image at 80700000 ...
    Image Name: Linux-2.6.18_pro500-davinci_evm-
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 2018280 Bytes = 1.9 MB
    Load Address: 80008000
    Entry Point: 80008000
    Verifying Checksum ... OK
    OK

    Starting kernel ...

    Uncompressing Linux.............................................................

    (it hangs after this I have tested memory by EVM# memtst and it is fine). what is the boot message I shall get for NFS boot?
    ---------------------------------------------------------------------------------------

    2)for exportfs I get as below:

    root@venkat-linux:/usr/sbin# exportfs -av
    exportfs: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export "*:root@venkat-linux:/home/DM6446/workdir/filesys".
    Assuming default behaviour ('no_subtree_check').
    NOTE: this default has changed since nfs-utils version 1.0.x

    exporting *:root@venkat-linux:/home/DM6446/workdir/filesys
    exportfs: Failed to stat root@venkat-linux:/home/DM6446/workdir/filesys: No such file or directory
    root@venkat-linux:/usr/sbin# exportfs -a
    exportfs: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export "*:root@venkat-linux:/home/DM6446/workdir/filesys".
    Assuming default behaviour ('no_subtree_check').
    NOTE: this default has changed since nfs-utils version 1.0.x

    exportfs: Failed to stat root@venkat-linux:/home/DM6446/workdir/filesys: No such file or directory
    root@venkat-linux:/usr/sbin# service nfs restart
    nfs: unrecognized service

    ---------------------------------------------------------------------------------------------------------
    3) also before this i got following errors for NFS service restart command as below:

    root@venkat-linux:/sbin# service nfs restart
    nfs: unrecognized service
    root@venkat-linux:/sbin# service nfs start
    nfs: unrecognized service
    root@venkat-linux:/sbin# cd ..
    root@venkat-linux:/# cd etc/init.d/
    root@venkat-linux:/etc/init.d# iptables status
    Bad argument `status'
    Try `iptables -h' or 'iptables --help' for more information.
    root@venkat-linux:/etc/init.d# iptables stop
    Bad argument `stop'
    Try `iptables -h' or 'iptables --help' for more information.
    root@venkat-linux:/etc/init.d# cd/bin
    bash: cd/bin: No such file or directory
    root@venkat-linux:/etc/init.d# cd /sbin/
    root@venkat-linux:/sbin# service nfs-kernel-server status
    nfsd running
    root@venkat-linux:/sbin# cd ..
    root@venkat-linux:/# cd etc/init.d/
    root@venkat-linux:/etc/init.d# iptables status
    Bad argument `status'
    Try `iptables -h' or 'iptables --help' for more information.
    root@venkat-linux:/etc/init.d# iptables --help
    iptables v1.4.12

    what might be wrong here?

    Regards,

    Azhagiri