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.

dsplink can't work

Other Parts Discussed in Thread: OMAPL138

When I using JFFS2 on NAND Flash,my program using dsplink can't work,and comes with some error like "Alignment trap: thttpd (844) PC=0x00014bf8 Instr=0xe5950010 Address=0xac457356 FSR 0x001".If I run any other program without using dsplink ,the system can works  properly.

But when I using  NFS,everything can  works properly.

Please help me to solve this problem.Thanks!

PS:

My linux kernel is 2.6.33.

Dsplink version is 1.65.00.02.

I'm using OMAPL138 .

Both mounting way use the same root file system.

  • Hi Muzhen,

    I am not aware of a limitation of running DSPLINK programs in flash. Do the DSPLINK samples provided in the product work when you put them into your flash FS? Also, you may want to track down which specific part of your code is causing this alignment trap. That'd help you track down what could be causing the issue.

    Best regards,

    Vincent

  • Hi Vincent,

    Thanks for replying this .I have been tested the dsplink samples today.It seems just like the result I got on my own program.

    Those samples work properly when using NFS.But when using JFFS2 , sometimes the sample works properly ,but most time it will make the system crash.

    And the crash seems to happen in everywhere which make me don't know how to track down the error.

    I catch some error information when the sample didn't  work. Please help me to check it, Thanks.

    8865.dsplinksample information.txt

  • Hi Muzhen,

    Could you try mounting a different filesystem (e.g. NFS, SD card, your pick) after booting from your JFFS2 flash filesystem, put the files from the 'scale' sample over there (including all dsplink-related files like dsplinkk.ko), and see if it works when you run it from there? I expect this to work. Then try these permutations:

    dsplinkk,ko            ARM executable                DSP executable 

    on JFFS                   on JFFS                             on JFFS                                 (can skip this one since we already know it is failing)

    on JFFS                   on JFFS                             not on JFFS

    on JFFS                   not on JFFS                      on JFFS

    on JFFS                   not on JFFS                      not on JFFS

    not on JFFS            on JFFS                              on JFFS

    ... (you get the gist)

    What I'd like to know is which binary(ies) need to be on the JFFS for this to fail.

    Also, could you pass on the steps you have followed in order to create your Linux kernel and the JFFS2 filesystem for the OMAPL138 EVM (assuming that is your board)? I'd like to reproduce your setup if possible on my end.

    Best regards,

    Vincent

  • 4265.scale_result.txt


    Hi,Vincent

    I have done what you said above.

    I mounted the NFS after booting from my JFFS2 flash filesystem, and put the copies of all files into the NFS.
    Then I ran dsplinkk.ko,ARM executable and DSP executable on NFS,but it didn't work properly and there was the detailed results of my execution in file
    scale_result.txt. Since this couldn't work, so I didn't test all the items on your permutations (tested some,but also proved to not work properly.).If you think it's
    necessary to test all of it ,I will test them next time.

    There are some steps I followed to do my work.
    1.linux kernel is linux2.6.33-rc4 got from seeddsp which is TI's agents in China.
    2.The JFFS2 filesystem is arago-base-tisdk-image-da850-omapl138-evm.tar.gz come from dvsdk_omapl138-evm_04_03_00_06_setuplinux.
    3.put jffs2 tarball image to nandflash:
        1).boot from NFS;
        2).flash_erase the filesystem partition in nandflash(when using "flash_eraseall -j ",it come with some error about "unaligned address" ,so I use flash_erase and it
    can work)
        3).mount the filesystem partition in nandflash
        4).untar the contents of the tarball file system image to the nandflash
        5).umount
        6).done.
    4.test the dsplink sample on JFFS2
        1).boot from JFFS2
        2).get all test files by tftp
        3).chmod +x files
        4).insmod dsplinkk.ko and test the samples.

    Best regards

  • Hi muzhen,

    I am suspecting your jffs2 filesystem is corrupted. In any case, I tried to reproduce your results on the OMAPL138 evm by downloading the dvsdk 4.03 (ti-dvsdk_omapl138-evm_04_03_00_06) and simply used the supplied version of dsplink (dsplink_1_65_01_05_eng), kernel (uImage-da850-omapl138-evm.bin) and filesystem (arago-base-tisdk-image-da850-omapl138-evm.tar.gz). I verified that the scale example worked after setting this up over NFS. Then I proceeded to do the following:

    > flash_eraseall -j /dev/mtd4
    No alignment problems. Erased all 0x400000 bytes.

    > mkdir /mnt/flash
    > mount -t jffs2 /dev/mtdblock4 /mnt/flash

    Then I copied the scale example files (scalegpp, scale.out, dsplinkk.ko) into /mnt/flash. I ran the example as follows

    root@arago:/mnt/flash# ls
    dsplinkk.ko  scale.out    scalegpp

    root@arago:/mnt/flash# insmod dsplinkk.ko

    root@arago:/mnt/flash# ./scalegpp scale.out 1000 100 0
    =============== Sample Application : SCALE ==========
    Entered SCALE_Create ()
    Leaving SCALE_Create ()
    Entered SCALE_Execute ()
    Changed the scale factor to: 2
    Changed the scale factor to: 3
    Changed the scale factor to: 4
    Changed the scale factor to: 5
    Changed the scale factor to: 6
    Changed the scale factor to: 7
    Changed the scale factor to: 8
    Changed the scale factor to: 9
    Changed the scale factor to: 10
    Transferred 100 buffers
    Leaving SCALE_Execute ()
    Entered SCALE_Delete ()
    Leaving SCALE_Delete ()
    ====================================================
    :

    This seems to run successfully with the dsplink files on the jffs2 filesystem. Can you do the same and verify that this works for you?

    Now, I noticed that the partition for the filesystem, mtd4, is only 0x400000 bytes for me. This is too small to hold the filesystem arago-base-tisdk-image-da850-omapl138-evm.tar.gz (11 MB compressed). What did you have to do to put the filesystem in there, or do you have a larger amount of nand flash?

    root@arago:~# cat /proc/mtd
    dev:    size   erasesize  name
    mtd0: 00010000 00010000 "UBL"
    mtd1: 00080000 00010000 "U-Boot"
    mtd2: 00010000 00010000 "U-Boot-Env"
    mtd3: 00280000 00010000 "Kernel"
    mtd4: 00400000 00010000 "Filesystem"
    mtd5: 00010000 00010000 "MAC-Address"


    root@arago:/mnt/flash# ls -al /home/root/arago-base-tisdk-image-da850-omapl138-e
    vm.tar.gz
    -rw-r--r--    1 36564    users    11023034 Jan 15  2013 /home/root/arago-base-ti
    sdk-image-da850-omapl138-evm.tar.gz


    Best regards,

    Vincent

  • Hi,Vincent,
    The size of nandflash on my board is 512MB,but I don't use all of it,and there are some informaiton about it:
    root@arago:/mnt# cat /proc/mtd
    dev: size erasesize name
    mtd0: 00020000 00020000 "u-boot env"
    mtd1: 00020000 00020000 "UBL"
    mtd2: 00080000 00020000 "u-boot"
    mtd3: 00400000 00020000 "kernel"
    mtd4: 02000000 00020000 "jffs2"                                                                ----->32M,enough for filesystem


    In order to get rid of the effect of different versions of the software,this time ,I use dsplink (dsplink_1_65_01_05_eng), kernel (no easy to change,so still the old one) and filesystem (arago-base-tisdk-image-da850-omapl138-evm.tar.gz) to test the example. For the problem about flash_eraseall, I try to make a new mtd-utils(version 1.4.4),and now there is no problem when I use the flash_eraseall.

    root@arago:/mnt# flash_eraseall -j /dev/mtd4
    flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it
    Erasing 128 Kibyte @ 0 -- 0 % complete flash_erase: Cleanmarker written at 0
    ......
    Erasing 128 Kibyte @ 1fe0000 -- 99 % complete flash_erase: Cleanmarker written at 1fe0000
    Erasing 128 Kibyte @ 1fe0000 -- 100 % complete
    root@arago:/mnt#mount -t jffs2 /dev/mtdblock4 ./nand
    root@arago:/mnt#cd nand
    root@arago:/mnt/nand# ls -al /home/root/arago-base-tisdk-image-da850-omapl138-evm.tar.gz
    -rwxr--r-- 1 1000 1000 11023034 Jan 8 2013 /home/root/arago-base-tisdk-image-da850-omapl138-evm.tar.gz
    root@arago:/mnt/nand# tar zxvf /home/root/arago-base-tisdk-image-da850-omapl138-evm.tar.gz


    Did you test the example several times? Because the first time to boot from JFFS2 after rewriting the filesystem,the scale example seemed to work properly.But after I tested it for a while, it couldn't work again. When I tested the example ,I not only ran the program repeatedly, but also sometimes downloaded some files by tftp, or sometimes rebooted the system. I don't know whether these opration will have effect on the JFFS2.

    Thanks to reply.


    Best regards

  • Hi Muzhen,

    I ran the scale example over 500 times without seeing any errors after placing the application files and dsplinkk.ko into /mnt/flash. At this point, I think your jffs2 filesystem is probably corrupted somehow. Maybe your nand flash is bad? Have you tried this on a different board?

    Also, you can easily switch to the kernel image provided in the DVSDK if you set up tftp. See DVSDK documentation for details. Maybe it is worth doing since the filesystem you got was tested against that version of the kernel.

    Best regards,

    -Vincent