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.

RTOS/AM5728: Flash memory programming

Part Number: AM5728

Tool/software: TI-RTOS

I've just picked up a project from an employee that is no longer working with us. We are using a custom RTOS for the AM5728 and I need to figure out how to get the image from the SD card onto the flash memory of the Beagleboard. We can copy the image of the file system (4 FAT32 partitions) to a micro SD card and the system runs fine on the Beagleboard X15. However, I can't find anything helpful in the documentation for copying the image to the Beagleboard flash memory. One employee mentioned a custom MLO that was written for a previous product on a different board that would check which device it was loaded from and copy the entire file system to the flash memory on the board if it was booted off the SD card. This sounds insane to me and I feel like there must be a better way. The image I've attached is the structure of the boot partition on the SD card. Please help!

  • Derek,

    Beagleboard X15 is not a supported platform in Processor SDK RTOS as I have indicated in the E2E threads here:

    https://e2e.ti.com/support/processors/f/791/p/721783/2663964#2663964

    https://e2e.ti.com/support/processors/f/791/t/728775?RTOS-BEAGLEBOARD-X15-Board-diagnostics-issue

    The HW is very similar to AM572x GP EVM processor module but there are some key difference that I have highlighted due to which the software can`t be used as is. Processor SDK linux does support the platform since we build our linux offering from community mainline which has the required X15 support. 

    Having said that, since you are only asking for guidance, I am providing some pointers for your consideration. Processor SDK RTOS only support FAT file system driver support so inorder to use eMMC flash on X15, we need a mechanism to format and partition the flash. Since we don`t have a target utility that supports formatting and partitioning of flash, we provide a USB example to connect to eMMC flash on the device as mass storage type device. This allows us to use Windows/Linux Host formatting tools to format and copy images to the eMMC. Once the formatting and partitioning is done the MLO and app can be copied to eMMC to allows for eMMC flash based booting. This process has been described in detail in the Boot section of the software developers guide: 

    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_Foundational_Components.html#booting-via-emmc  

    Regards,

    Rahul

  • The USB example where you can format the flash on the device as a mass storage device is exactly what I need. I was able to successfully create and compile the USB_DevMsc_mmcsd_evmAM572x_armExampleProject. However, I've been unable to find anything useful that describes how to actually use it. Is this project supposed to end up as an MLO and app file that you put on an SD card and it tells the X15 that it's a mass storage device? Or is it a driver for the PC you're mounting the X15 as a storage device on? Does this happen through the micro USB port? Does this project need to be altered to work with the X15?

    I'm completely lost in this whole process. The guy before me decided to make a custom compiler and removed most of the TI stuff.

  • Derek,

    the USB example can be run over JTAG so that the EMMC shows up on the host as a drive which you can format. Can you confirm that you have looked at the section here:

    Summary:

    • You connect to eMMC using USB MSC example and format it. 
    • In windows, the tool we provide to format the drive, also copies boot images (the MLO corresponds to SD boot images and need to be deleted. Same app can be uses)
    • Then copy the MLO from pdk_am57xx_1_0_xx\packages\ti\boot\sbl\binary\evmAM572x\emmc\bin 
    • Change boot switches to eMMC and remove SD card if previously inserted
    • Power on and check boot logs on UART.

    Hope this helps.

    Regards,

    Rahul

  • Yes, I have looked at that example and it does not help.

    I am not having trouble creating SD cards, attempting to boot from eMMC, or properly formatting eMMC.

    What I am having trouble with is "the USB example can be run over JTAG so that the EMMC shows up on the host as a drive which you can format." 

  • Derek,

    HEre is more detailed step by step process description to set this up:

    Preparing the eMMC for boot

    1.From the installed AM57xx package create USB device MMCSD project for AM572x EVM
    (USB_DevMsc_mmcsd_evmAM572x_armExampleProject)
    2.Load the project into CCS and build the project.
    3.Connect the evmAM572x on-board USB JTAG with the PC.
    4.Connect the USB micro cable between USB port of AM572x EVM and the PC.
    5.Open TeraTerm or any console application to view the logs.
    6.After the basic setup, power on the board and connect the ARM core (A15 ) through CCS.
    7.Now load the example binary into the arm core and execute the same.
    8.In the host PC, an USB drive folder will be available in the windows explorer.
    9.When connected for the first time, the windows prompts for formatting the USB device.
    10.Format the eMMC into FAT32 partition.

    Format and boot from eMMC

    11. From the previous procedure of exposing eMMC as UsB device, now eMMC will be accessible
    12. Copy the MLO into the eMMC formatted partition The eMMC should be formated using the create-sdcard script file
    Run the following
    > sudo ./create-sdcard.sh
    13. The script displays the number of storage device available. Enter the eMMC card index.
    14. The script then prompt for number of partitions required to be formatted.
    15. Select 2 partition. It will take time for partitioning.
    16. Once partition is done it will ask for continue, just enter 'n' to exit.
    17. Now copy the eMMC MLO from the following location into the eMMC boot partition.
    <pdk_install_path>\pdk_am57xx_1_0_13 \packages\ti\boot\sbl\binary\evmAM572x\emmc\bin\MLO
    . Followed by
    18 Also any ‘app’ of AM572x EVM example can be copied along with this into the boot partition.
    19 For example the USB_DevMsc_mmcsd_evmAM572x_armExampleProject itself generates a binary named app inside debug folder of the project.
    <pdk_install_path>\pdk_am57xx_1_0_13 \packages\MyExampleProjects\ USB_DevMsc_mmcsd_evmAM572x_armExampleProject \Debug
    20. When the MLO and app is copied disconnect the board from CCS.
    21. Change the boot settings to ensure the eMMC boot.
    22. Reboot the board and check the console logs, the SBL should be running which will be loading the app and executing the same.
    23. As we are loading the same binary of USB_DevMsc_mmcsd_evmAM572x_armExampleProject, eMMC as USB drive will be detected in the host PC.

    Let us know what step, you are having issues with and we can help provide more detail as required.

    Regards,

    Rahul

  • I am unable to get JTAG working with the X15 on the Linux VM I used to compile USB_DevMsc_mmcsd. I am, however, able to get JTAG working with the X15 on Windows. But in Windows I am unable to compile the example project because the pdkProjectCreate.bat script is completely empty. I have tried installing the PDK in C:\ti, as well as my user home directory and the project, create script was blank in both instances. 

    Can I use CCS9 to create example projects instead of the script?

  • Derek,

    As I indicated, BEagle board X15 is not a a TI support evaluation platform so we have no experience setting up the X15 HW as we use the Processor module from AM572x GP EVM.  You may be able to contact the manufacturer or look at community users who may have connected to the SOC in Linux VM. Also, without seeing error log or CCS screenshots on what the error looks like it is hard for us to comment. If you can connect using Windows, can`t you use that environment for performing the flashing over JTAG?

    We are only supporting CCSv9 with Processor SDK RTOS 6.0 and not with the earlier versions.

    Regards,

    Rahul

  • Yes, we can use the Windows environment to flash over JTAG and I understand that the X15 is not directly supported by TI. The X15 is not our problem, it is that the script to create CCS9 projects is an empty file. I have tried rebuilding the SDK with the results below.

    pdksetupenv.bat was the first command run with the output being the long set of "set <...>_PATH = ../../" commands. Again, our issue is not JTAG or the BeagleBoard. Our issue is creating the USB_DevMsc_mmcsd project in Windows. Why is the pdkProjectCreate.bat file a blank file? We have RTOS 6.0 and CCSv9 as seen here:

  • I have installed the version of the Processor SDK RTOS that you are using and don`t see pdkProjectCreate.bat as a blank file. 

    the other thing that I don`t understand is why you are manually setting the PATHs manually to components or why gmake clean and gmake all is being called in the setting up of the USB examples. The driver libraries and CSL are already built.

    All you need to do is install CCSv9 in C:\ti\ccs901. Open CCSv9 and complete component discovery in Processor SDK RTOS as described in getting started guide

    then Open command prompt:

    cd processor_sdk_rtos_am57xx_6_00_00_07
    setupenv.bat
    cd ..\pdk_am57xx_1_0_15\packages
    pdkProjectCreate.bat AM572x evmAM572x little usb all

    This should generate the necessary USB examples in MyExmaples folder in the pdk_am57xx_1_0_15\packages folder. Import projects in CCS and build to generate the USB MSC binary needed for flashing EMMC

    Regards,

    Rahul