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.

AM3354: bin2nand application, to generate ECC from binary

Part Number: AM3354

Good afternoon,

I would like to ask for support. In our company we have to program NANDs before being mounted on board, so that we want to use a programmer.

I know that only binaries are not enough, since it is necessary to generate EEC data, to merge it with the binary, and I saw in an old thread from this forum:

https://e2e.ti.com/support/processors/f/processors-forum/675560/am3354-nand-ecc-for-production

that this can be done with "bin2nand" application, but I am not able to find it

Could you help, please?

Thank you very much

        Jorge

  • Hi Jorge,

    I'll send you a friend request to get connected. Then I'll email you this tool privately.

    Thanks for your patience.

    Jianzhong

  • Hi Jianzhong,

    Thanks for the tool you sent me.

    Unfortunately, I was not able to install it. I followed the steps you described, but the the installation process seems to do nothing, and the tool is not installed.

    I tried in three machines with different Linux versions, unsuccessfully

    By the way, does this tool "bin2nand" exists for windows as well??

    Thank you very much for your help

    Best regards

           Jorge

  • Hi Jorge,

    Below is what I did:

    • unzip ./bin2nand-1.0.5.0-linux-x86-install.zip
    • chmod +x bin2nand-1.0.5.0-linux-x86-install
    • ./bin2nand-1.0.5.0-linux-x86-install --help
    • ./bin2nand-1.0.5.0-linux-x86-install --mode silent --prefix ./bin2nand

    Following are in the installation folder "bin2nand":

    bch_encoder.c bch_global.c bin2nand.c makefile nand_errors.h nand_image.c romcode_types.h
    bch_encoder.h bin2nand LICENSE.txt nand_errors.c nand.h nand_image.h uninstall

    There is no windows version for this utility.

    Regards,

    Jianzhong

  • Hi Jianzhong,

    Thanks for the instructions. I was finally able to install and use bin2nand tool. Now, we have a new issue, and I do not know whether it might be caused by a misconfiguration of the options, or any other cause.

    We have 5 files, to put into 8 partitions in NAND:

    dev:    size                     erasesize          name
    mtd0: 00020000            00020000        "xload"                        <=== MLO
    mtd1: 00020000            00020000        "xload_backup1"        <=== MLO
    mtd2: 00020000            00020000        "xload_backup2"        <=== MLO
    mtd3: 00020000            00020000        "xload_backup3"        <=== MLO
    mtd4: 00080000            00020000        "barebox"                    <=== barebox.bin
    mtd5: 00020000            00020000        "bareboxenv"              <=== barebox.env
    mtd6: 00400000            00020000        "kernel"                       <=== uImage-pcm051
    mtd7: 1fae0000             00020000        "root"                          <=== rootfs.ubi

     

    We processed each file with bin2nand tool, so that every file has ECC data now.

    With these files, a merge process is done, and NANDs are programmed.

    Once mounted on board, the system seems to boot and run propperly, but after rebooting the board for the first time, it does not boot any more. It seems that some data has been corrupted, once run for the first time...

    Our suspects are pointing to some diffeent rootcauses:

        * ECC data might have been calculated including the empty area or similar issue

        * UBI filesystem might have been corrupted once running for the first time, due to any misconfigured parameter

        * Memory mapping might be incorrect, due to adding the newly generated ECC data, that makes the file bigger

    Not sure about the real root cause, and we do not know how to procceed.

    My questions:

    Is it correct to process all five files with bin2nand tool (I mean, one by one)?? Should this process be avoided in any of these files??

    Is there any parameter in bin2nand tool, to avoid calculating ECC for empty space?

    Thank you very much for your support

    Best regards

            Jorge

  • Hi Jorge,

    Glad that the tool works for you.

    Is it correct to process all five files with bin2nand tool (I mean, one by one)?? Should this process be avoided in any of these files??

    Please check this thread for reference: https://e2e.ti.com/support/processors/f/processors-forum/683734/am3354-nand-programming-for-production.

    Is there any parameter in bin2nand tool, to avoid calculating ECC for empty space?

    Let me check on this.

    Regards,

    Jianzhong

  • Hi Jorge,

    I don't think there is an option to skip ECC for empty space.

    Regards,

    Jianzhong