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.

Starterware/AM3352: FAT booting for eMMC

Part Number: AM3352

Tool/software: Starterware

Hi, Everyone

I have a question about AM335x of Starterware.

My customer want FAT boot from eMMC.
and They want to know how to format for fat boot.

Starterware include bootloader program.
FAT formatting is described  in AM335X StarterWare Booting And Flashing of Users manual(UserGuide_02_00_01_01.pdf).

but I think it is described about SD Card format.
Can I use same way for eMMC ?

Best Regards
Hiroyasu

  • Hi Hiroyasy,


    I usually format using a linux distribution (like Debian) to boot from the SDCard,

    and then access eMMC normally as if it were a card device.

    First format with fdisk, then I create the partition with mkfs.vfat. Then just copy the MLO first after the application "app".

    Best Regards

    Fabio

  • The eMMC will work for booting using the same format as the SD Card. Unfortunately, I've been unable to get elm-chan's FATFS library to create a format that the ROM boot loader will accept. I've resorted to writing a simple app running from the SD Card to copy a disk image to the eMMC using raw disk writes.
  • Hi, Fabio and James

    O.K. Thank you !

    Best Regards
    Hiroyasu
  • Hi James,
    I have a custom board that is loosely based on the BeagleBoneBlack. I've been developing StarterWare apps to test all features, and I haven't been able to talk to the eMMC yet. I have also tried booting linux on it, but it will not enumerate the eMMC either. I'd love to hear more about the app you wrote to copy a disk image to the eMMC using raw disk writes. THANKS!
  • For my application I only needed a few MB of space on the eMMC. I created a disk image of a FAT32 file system sized at 40MB and saved that image on the SDCard as a regular file. The app simply opens that file, reads 512 bytes and then writes them to the eMMC starting at block 0. After that, it opens the eMMC using FATFS and copies the end application's MLO and app to the new file system. If your app is pretty stable, you can simply put the MLO and app in the disk image and skip the step of writing them to the eMMC.

    The block copy is using FATFS to read the disk image file but the write to the eMMC is done by calling directly into the driver to write the raw blocks. I ended up writing new low level drivers because I could never get the Starterware drivers to write quickly or reliably to either the SDCard or eMMC. This was done a couple of years ago so maybe the situation with the drivers has improved.

    Good luck.
  • Hi James,

    Thanks for the response. I believe there have been changes to the drivers recently (claimed eMMC support), but I have not been able to do raw read/writes to it. Is there any chance you could share your drivers and the app that does the initialization and eMMC read/writes?

    Cheers,

    Carlos
  • Apologies Carlos but that code was written under contract and my customer is not interested in releasing it in any form.  I can tell you that it took me less time to write the drivers from scratch than I had spent trying to get the Starterware code working.  Very little of the Starterware code made it into my final product because it is not written to production standards.  To be fair to TI, they are very up front that Starterware is example code only and they don't promote it as anything else.

    It's been a couple of years since I've worked with Starterware and I only visit this site when an email pops up on one of my old postings.  If I understand correctly, TI has shifted support from Starterware to their RTOS and/or some kind of SDK.  Perhaps others here can give you pointers in that direction to find working examples or production tested code.

    Best of luck,

    James

  • Not a problem. I'll look into the RTOS SDK. Thanks for the help James!

    Cheers,

    Carlos
  • James,

    Thank you for chiming in and contributing to the discussion.

    Carlos,

    As James mentioned, Processor SDK RTOS would be the way to go. http://software-dl.ti.com/processor-sdk-rtos/esd/AM335X/latest/index_FDS.html

    Aside of Starterware, there are several examples that you can generate located at C:\ti\pdk_am335x_1_0_7\packages\MyExampleProjects.

    Please keep in mind that the MyExampleProjects needs to be created by running a .bat file as mentioned here processors.wiki.ti.com/.../Rebuilding_The_PDK. They are MMCSD specific, but hopefully this will help you a bit.

    Lali

  • Hello James and Lali,

    Thanks for taking the time to try helping me out.  I've finally found the issue with our design.

    We hadn't been able to mount the eMMC on Linux, and it would only appear under /dev if we lowered the speed below 10MHz.  We identified that this was due to a signal integrity issue.  We finally tracked this bug down to a HW design issue (not all lines had been pulled up properly - we thought they were).

    Anyways, after fixing the HW issue, my eMMC tests now run (under Starterware with the current "fixed" mmcsdlib files), and we can mount it under Linux at 52MHz.  I did manage to run some tests from the RTOS SDK using CCS as well.  All seems to be working properly.  Thanks again!

    Cheers!

    Carlos