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.

evmskAM335x_diag CCsv5 linking and compiling errors.

Other Parts Discussed in Thread: AM3358

I have been advised by TI to use some diagnostic code to do quick tests of DDR memory by compling some code that will fit into SRAM upon bootup. The code was 'evmskAM335x-diag', I did a git from a linux repository and have the souce code in my windows workspace. I imported the project and made sure some of the directory locations for libarys and include files were implictly spelled out in the properties of the project.

After getting my project loaded I noticed a bunch of StarterWare include files were missing from my envirnoment, so I downloaded ( AM335X_STARTERWARE_02_00_00_07) and have my build environment pointing to them now. I am using the ccsv5 code composer, and my hardware is the BeagleBone(white).

 I would have thought that the project would have built with no problem, but that is NOT the case. There are a number of fatal errors building the DEBUG version. I also setup the envirnoment for the Release version and have gotten even more errors!

I would like to compile the entire evmskAM335x_diag project and run it on my hardware to see how well it works and to prove out the tool chain before moving into more of a customization mode where I strip functions out of the project to make it smaller and to fit into SRAM. but for right now I can't get the code to link. I have attached a few screen shots to see if you can see anything wrong. or help me get the code to link properly.

Later I will need instruction on how to specify the locations of memeory and their respective sizes to work form SRAM. I will also need to compile a Release version. But my Release version is throwing more errors than my debug version right now, so I my focus on getting the Debug version to compile and link. maybe you can help me with the Release version as well, because I have read in the TI forum that the STARTERWARE was built for the RELEASED version. That is where all my libaries are pointing to now.

In general : I have a few symbols redefined that are throwing errors and the DDR_MEM and INT_MEM merory ranges are overlapping in my Debug version. For right now I don't need a lot in SRAM, I just need it to fit into memory- any memory!

I also have a ton of these warning messages about white space- how Do I turn those warnings off?

 

 

 

  • I have split down your post into 3 queries/problems and provided my feedback against each below:

    i) Diagnostics running from SRAM:

    The full Diagnostics software binary will be big and cannot fit into the SRAM available in AM335x, what you can do is comment out the other tests/remove files in the project and have only the Memory test and try compiling to fit into the SRAM.

    ii) Linking issue - .cmd file:

    Only one command file need to be used for the compilation build.cmd(as part of the project) or your custom AM3358.cmd. If you are not using the AM3358.cmd which is in the project folder then you can choose to "Exclude from Build" through the option available from Right-click on to the .cmd file in the CCS project.

    If you want to use only the AM3358.cmd you should remove the build.cmd included in the ARM Linker->File search Path->Include command file as input.

    Also regarding the other errors: I see you are using the "STARTERWARE_ROOT" in the library search path but the files you are directly pointing to the 2.0.0.7 libraries folder. If you are having a different version starterware directory mentioned in the "STARTERWARE_ROOT" build variable, then there will be some conflicts while compiling causing errors.

    iii) Diagnostics Release configuration compilation issue:

    The "evmskAM335x-diag" project currently supports only the Debug configurations and have no plans for a Release configuration. If you want to compile for the "Release" you need to properly configure referring to the "Debug" configuration for the ARM compiler and ARM linker and other build configurations.

    Hope this helps.

    Benjamin

  • Ben, Thanks for the reply- after a few days I was able to sort through most of the compliing issues and get the EVMskdiagnostic code to compile and link.

    My next step was to test each of the individual test options that the diagnostic code provides. I discovered that only the DDR test would run and complete sucessfully on the beaglebone. Knowing that I must tailor the evmskdiag code to run on a beaglebone I needed to know where each test fuction hung up.

    I have disabled those test functions that cannot be supported on the beaglebone; Raster, Graphics, Touchscreen, Acceleration & Audio.

    But need to have  the I2C/EEPROM; USB MSC device & Host; Ethernet; microSD test functions working.

    I realized that there were some platform differences between the evmskAM335x board and beaglebone so I changed some of the include files to point to the beaglebone.h instead of evmskAM335x.h for platform. I changed a few other files to point to the beaglebone.h file instead as well, initially I tried to replace all of the evmskAM335x.h includes, but received too many compiling and linking errors, claiming re-declaration of symbols. I was able keep the beaglebone.h replacement to a few files only and still get the code to compile, link and run on the beaglebone board.

    But as I ran the each test I recorded where the code hung and stopped. I will list ecah test and how and where it hung- hopeful there are some simple things I can try that will accomidate the difference between the evmAM335x and the beaglebone board.

    EEPROM test:  The debugger stopped at SetupE2PROMReception().

    It seems to be stuck at a blocking function waiting for the I2CMasterBusBusy function, indicating that something is not configured properly for the beaglebone platform.

    This test console would also indicate that the EEPROM was not programmed.

    microSD / Flash Test: The test console would return >NODEVICE and hang.

    There seems to be some flags to indicate sucessful access to the SD disk that are never satified. Again this looks to be some sort of hardware platform issue.

    Ethernet test: The EMAC Loopback tests seem to run ok- but fail while running the EMAC PHY Internal loopback at AR8031PHY_Configure(). The code runs through  MDIOInit() in ar8031.c but stopps at the delay(100) func.

    I have inserted comments to track where the code fails. The ethernet test fail the same way for both ports.

    USB Device test: Hangs at USBDMSCInit() in usb_dev_msc.c. It seem to stop at a sysdelay func. I coundln't put debugging comments because it is a major file that is part of the libary.

    USB Host test: This seems to run partially, I had to disable the define for MMU_CACHE_ENABLE- to #ifdef from #ifndef else the code did not get to the usb_host_msc_init() or usb_host_msc_test() funcs.

    here is the snippit where the MMUConfigAndEnable was re-defined to get the code to run a little farther.

    Here is what the console looks like for the USB Host test.

    These are the tests that are critical to our mfg operation that I need to resolve.

    I am somewhat confused by the MMU requirements for this code?

    when do I need the MMU and when isn't it needed?

    Also are there connections required for some of the loopback test for USB and Ethernet?

    do I need to have a crossover cable attached to a port?

    what are the capabilites of the USB Host test? is it to detect a USB device attached?

    same question for the USB Device test what is this check doing exactly? does the USB Device test need a USB connection to something?

    I also was able to format an SD flash disk and format it so that it is bootable- it took a little research to find how to do that but it does boot. I stored the MLO boot file from starterware and an 'app' that I knew to run and it worked. But when I replaced the 'app' with my new executable to see if it would start up like the other 'app' that did run at bootup- nothing started.. the console just displayed the StarterWare banner stuff and halted.. So it looks like there is something configured wrong for my application to run at bootup, I guessing some memory management!  

    below are some configurations that I have:

    Build cmd file.- locations of code.

    Linker runtime- ROM model??

    Linker basic options- Stack & heap size

  • Don Welch,

    Good to hear that you have the code compiled successfully. I would like to inform you that we are not supporting the evmskdiag source to be ported for any other platforms and is meant only for the AM335x starterkit, it is the responsibility of the user to port for any other platforms. I went through your detailed e-mail, please find my input how to approach to your problem:

    i) Most of the test cases are taken directly from the Starterware examples and integrated to the diagnostics with minimal changes. I would suggest you to first reproduce the Beaglebone Starterware 2.0.0.7 projects one by one and then understand how it works and then integrate it together for your diagnostics or debug the diagnostics source you have.

    ii) Issues that you are facing for MMC, USB, I2C: This could be due to the improper pinmuxing. There will be pinmux differences between AM335x Starterkit and the Beagle bone, hence you should use the beaglebone's platform libraries for your diagnostics compilation. If platform source/libraries are not available for your board you need to create one similar to the AM335x starter kit platform source for the interfaces of interest for your diagnostics.

    iii) Answer to your queries:

    >I am somewhat confused by the MMU requirements for this code? when do I need the MMU and when isn't it needed?

    In the evmskdiag USB test cases are the only one that support MMU enabled(taken from the starterware), all other testcases were not tested with MMU enabled. Please refer to the starterware examples.

    >Also are there connections required for some of the loopback test for USB and Ethernet? do I need to have a crossover cable attached to a port?

    For USB and ethernet hardware dependencies refer to the wiki of the starter kit diagnostics diagnostics:

    http://processors.wiki.ti.com/index.php/AM335x_Starter_Kit_Diagnostics#Hardware

    >what are the capabilites of the USB Host test? is it to detect a USB device attached? 

    Yes

    >same question for the USB Device test what is this check doing exactly? does the USB Device test need a USB connection to something?

    You need a USB cable to be connected to a PC and on running the USB device test you will observe a drive detection for formatting, after detection  you need to press "ESC" key in the console for the test to quit.