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.

Problem running the DM368 PSP demo



Hi 

I am trying to get familiar with the DM368EVM by playing with the PSP example. following the instruction on

UG: DaVinci PSP Installation on DM36x EVM

    Topic:     Building and using the MT9P031 CMOS image sensor driver

         3. running the demo

when I boot up the DVM board and enter the command :

# /etc/init.d/load-module-rc restart

# ./capture_prev_rsz_onthe_fly_bayer_mew -i1 -m4 -h50

I got an error of : CMEM Error: allocPool: ioctl CMEM_IOCALLOC failed from pool 0: -1

 

Could someone tell me how to fix this in order to run the demo?

 

Thank you

 

Ming

 

 

Attached is the capture from the console:

ROOT@DM368-EVM:~# REBOOT
 
BROADCAST MESSAGE FROM ROOT (TTYS0) (FRI MAR 25 08:05:16 2011):
 
THE SYSTEM IS GOING DOWN FOR REBOOT NOW!
ROOT@DM368-EVM:~#
DM36x initialization passed!
TI UBL Version: 1.50
Booting Catalog Boot Loader
BootMode = SD/MMC
Starting SDMMC Copy...
   DONE
Jumping to entry point at 0x81080000.
 
 
U-Boot 2010.12-rc2 (Mar 24 2011 - 16:49:26)
 
Cores: ARM 432 MHz
DDR:   340 MHz
I2C:   ready
DRAM:  128 MiB
NAND:  2048 MiB
MMC:   davinci: 0, davinci: 1
Bad block table found at page 524224, version 0x01
Bad block table found at page 1048512, version 0x01
Bad block table found at page 524160, version 0x01
Bad block table found at page 1048448, version 0x01
nand_read_bbt: Bad block at 0x00001a120000
nand_read_bbt: Bad block at 0x000020e60000
nand_read_bbt: Bad block at 0x00002fec0000
nand_read_bbt: Bad block at 0x000033420000
nand_read_bbt: Bad block at 0x000047500000
nand_read_bbt: Bad block at 0x000047520000
nand_read_bbt: Bad block at 0x000047cc0000
nand_read_bbt: Bad block at 0x00004ee00000
nand_read_bbt: Bad block at 0x00004ee20000
nand_read_bbt: Bad block at 0x00004ee80000
nand_read_bbt: Bad block at 0x00004eea0000
nand_read_bbt: Bad block at 0x00004fb00000
nand_read_bbt: Bad block at 0x00004fb20000
nand_read_bbt: Bad block at 0x00004fbc0000
nand_read_bbt: Bad block at 0x00004fbe0000
nand_read_bbt: Bad block at 0x00004fc00000
nand_read_bbt: Bad block at 0x00004fc20000
nand_read_bbt: Bad block at 0x000051520000
nand_read_bbt: Bad block at 0x000054ac0000
nand_read_bbt: Bad block at 0x000055780000
nand_read_bbt: Bad block at 0x00006bbe0000
Net:   Ethernet PHY: GENERIC @ 0x00
DaVinci-EMAC
Hit any key to stop autoboot:  0
DM36x EVM # echo $bootargs
console=ttys0,115200n8 noinitrd rw ip=dhcp root=/dev/nfs nfsroot=192.168.155.49:/home/mhe/targetfs,nolock mem=60M video=davincifb:vi
d0=OFF:vid1=OFF:osd0=1920x1080x4,32400K dm365_imp.oper_mode=0 vpfe_capture.interface=1 vpfe_capture.bufsize=4147200 davinci_enc_mngr
.ch0_mode=1080I-30
DM36x EVM #
console=ttys0,115200n8 noinitrd rw ip=dhcp root=/dev/nfs nfsroot=192.168.155.49:/home/mhe/targetfs,nolock mem=60M video=davincifb:vi
d0=OFF:vid1=OFF:osd0=1920x1080x4,32400K dm365_imp.oper_mode=0 vpfe_capture.interface=1 vpfe_capture.bufsize=4147200 davinci_enc_mngr
.ch0_mode=1080I-30
DM36x EVM # boot
BOOTP broadcast 1
DHCP client bound to address 192.168.155.36
Using DaVinci-EMAC device
TFTP from server 192.168.155.49; our IP address is 192.168.155.36
Filename 'uImage-dm368-evm.bin'.
Load address: 0x80700000
Loading: #################################################################
 #################################################################
 #################################################################
 #################################################################
 #################################################################
 #################################################################
 ##############################
done
Bytes transferred = 2148096 (20c700 hex)
## Booting kernel from Legacy Image at 80700000 ...
   Image Name:   Linux-2.6.32.17-davinci1
   Created:      2011-07-28  14:40:03 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2148032 Bytes = 2 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK
 
Starting kernel ...
 
Uncompressing Linux.................................................................................................................
........................... done, booting the kernel.
 
 _____                    _____           _         _
|  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
|     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
|__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
              |___|                    |___|
 
Arago Project http://arago-project.org dm368-evm ttyS0
 
Arago 2011.02 dm368-evm ttyS0
 
dm368-evm login: root
root@dm368-evm:~# /ect/init.ed
-sh: /ect/init.ed: not found
root@dm368-evm:~#
root@dm368-evm:~# ls /ect/init.rd
ls: /ect/init.rd: No such file or directory
root@dm368-evm:~#
root@dm368-evm:~# ls /ect/int
ls: /ect/int: No such file or directory
root@dm368-evm:~#
root@dm368-evm:~# cd /etc
root@dm368-evm:/etc#
root@dm368-evm:/etc# ls
angstrom-version   hosts              nsswitch.conf      resolv.conf
asound.conf        init.d             opkg               rpc
asound.state       inittab            pam.d              scsi_id.config
busybox.links      inputrc            passwd             security
dbus-1             ipkg               pointercal         services
default            iproute2           profile            skel
dev.tar            issue              profile.d          terminfo
device_table       issue.net          protocols          timestamp
device_table-opkg  localtime          rc0.d              tinylogin.links
environment        mke2fs.conf        rc1.d              ts.conf
fb.modes           modules            rc2.d              udev
filesystems        modules.conf       rc3.d              udhcpc.d
fstab              modutils           rc4.d              version
group              motd               rc5.d              volatile.cache
host.conf          mtab               rc6.d
hostname           network            rcS.d
root@dm368-evm:/etc#
root@dm368-evm:/etc# cd ..
root@dm368-evm:/#
root@dm368-evm:/# cd /usr/share
root@dm368-evm:/usr/share#
root@dm368-evm:/usr/share# cd ti
root@dm368-evm:/usr/share/ti#
root@dm368-evm:/usr/share/ti# ls
data                      dvtb                      ti-codec-engine-examples
dvsdk-demos               linux-driver-examples     ti-dmai-apps
root@dm368-evm:/usr/share/ti#
root@dm368-evm:/usr/share/ti# /etc/init.d/loadmodule-rc restart
root@dm368-evm:/usr/share/ti#
root@dm368-evm:/usr/share/ti# cd linux-driver-examples
root@dm368-evm:/usr/share/ti/linux-driver-examples#
root@dm368-evm:/usr/share/ti/linux-driver-examples# ls
edma          fbdev         imp-prev-rsz  v4l2
root@dm368-evm:/usr/share/ti/linux-driver-examples#
root@dm368-evm:/usr/share/ti/linux-driver-examples# cd imp-prev-rsz
root@dm368-evm:/usr/share/ti/linux-driver-examples/imp-prev-rsz#
root@dm368-evm:/usr/share/ti/linux-driver-examples/imp-prev-rsz# ls
capture_prev_rsz_onthe_fly_bayer      display
capture_prev_rsz_onthe_fly_bayer_mew  do_preview_resize
capture_prev_rsz_onthe_fly_yuv        do_resize
capture_prev_rsz_ss_raw_yuv           do_resize_420_420
root@dm368-evm:/usr/share/ti/linux-driver-examples/imp-prev-rsz#
root@dm368-evm:/usr/share/ti/linux-driver-examples/imp-prev-rsz# ./capture_prev_
rsz_onthe_fly_bayer_mew -i1 -m4 -h50
input_std_params: name = V4L2_STD_720P_30
input_std_params: output size = 1280 * 720
calling cmem utilities for allocating frame buffers
CMEM Error: allocPool: ioctl CMEM_IOCALLOC failed from pool 0: -1
Failed to allocate cmem pool
Unable to Allocate user buffers
root@dm368-evm:/usr/share/ti/linux-driver-examples/imp-prev-rsz#
root@dm368-evm:/usr/share/ti/linux-driver-examples/imp-prev-rsz#

 

 

 

  • Hey,

    error indicates that either CMEM module is not loaded or it was not loaded with appropriate parameters.

    There are various posts on this forum which address the same issue. You can refer them.

  • Thank you, Nagabhushana.

    I am sure the CMEM module is loaded.

    root@dm368-evm:~# lsmod
    Module                  Size  Used by
    dm365mmap               1712  0
    edmak                  12265  0
    irqk                    6010  0
    cmemk                  20482  0
    ipv6                  228951  12
    root@dm368-evm:~#

    root@dm368-evm:~# cat /proc/cmem
     
    Block 1: Pool 0: 1 bufs size 28672 (28672 requested)
     
    Pool 0 busy bufs:
     
    Pool 0 free bufs:
    id 0: phys addr 0x1000
    root@dm368-evm:~#

    here is the parameters I find in the loadmodule-rc.sh

    load () {
        modprobe cmemk phys_start=0x83C00000 phys_end=0x88000000 allowOverlap=1 phys_start_1=0x00001000 phys_end_1=0x00008000 pools_1=1x28672 useHeapIfPoolUnavailable=1

    Do I need to define something like "pools_0=...." for the block_0 after phys_end=0x88000000.   ?

     

    On the other hand, the loop-back demo under the ti-dmai-apps folder is working, I can see the captured image on the monitor

     

    Regards

     

    Ming

  • I'm getting the same errors and the cmem has the same parameter any solution?