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.

Compiling DM646x UBL

Other Parts Discussed in Thread: CCSTUDIO, THS8200

I'm trying to build the UBL for DM6467 (for the faster 6467 "T" part number).  The help page (http://wiki.tiprocessors.com/index.php/DM6467_EVM_Installation) says to use CCS 3.3 with Perl version 5.10.  When I install CCS 3.3 it says it is compatible with ActiveState version 5.6 or 5.8 only.  Which Perl version is realy needed?

Also, must the Perl software be from ActiveState?   I can no longer get that version from ActiveState for free.

In the past I used DM646x_FlashAndBootUtils_1_50, which I can compile via Cygwin.  However, I'm not sure what things need to be changed for the faster "T" part.

  • I did some poking around through old emails, etc. and have a few data points for you.

    1. It looks like the latest version of UBL is the 1.50 version which can be downloaded here and is documented here.
    2. In the documentation for this particular utility I don't see any mention of perl.  I don't recall it being a prerequisite (i.e. they may have replaced some of the perl scripts with exe versions or something like that).
    3. In my old emails the few places where ActiveState came up it seemed like 5.10 was problematic!  So if you do need perl (not sure you do) then 5.8 is likely better for this activity.
    4. The main difference between DM6467 and DM6467T is the clock speed, i.e. DM6467T can operate the DSP up to 1 GHz.  I see various defines that look to support this in DM646x_FlashAndBootUtils_1_50\DM646x\Common\src\device.c.
  • Thanks for the answer, which is good news since I have used DM646x_FlashAndBootUtils_1_50 in the past.

    However, it has been my experience that Code Composer v3.3 is needed to compile this source code (but not Perl).  If CCS v3.3 is not installed, you will get "make: timake: Command not found" when doing "make" in Cygwin.  timake.exe is located at C:\CCStudio_v3.3\cc\bin.  Also, my notes say that the CCS TMS470 (ARM) build tools need to be installed (ti_cgt_tms470_4.6.3_setup_win32.exe) and then selected from within CCS (Help->About, Component Manager, expand Build Tools, expand TMS470R1x, TMS470R2x, TMS470R3x). Otherwise, I was getting the error "ERROR: bad argument to option --abi: should be one of { ti_arm9_abi tiabi }".

  • After digging into it some more, it looks like UBL version 1.50 does not contain the proper settings for the 6467T EVM, since the EVM uses a 33 MHz input clock.  Please confirm that I should use the following PLL settings:

    #elif defined(DM6467_1GHz_MICRON_33MHZ)
      static const Uint32 PLL1_Mult = 30;       // DSP=990 MHz @ 33M input
      static const Uint32 PLL1Div4_ratio = 10;  // ATA= 99 MHz @ 33M input
      static const Uint32 PLL2_Mult = 24;       // DDR=792 MHz @ 33M input 

    Can I still use the DDR settings defined in the DM6467_1GHz_MICRON section, since our DDR speed is 792/2=396 instead of 400?
      // For Micron MT47H64M16BT-3 @ 400 MHz
      static const Uint8 DDR_NM = 0;
      static const Uint8 DDR_CL = 5;
      static const Uint8 DDR_IBANK = 3;
      static const Uint8 DDR_PAGESIZE = 2;
      static const Uint8 DDR_T_RFC = 50;
      static const Uint8 DDR_T_RP = 5;
      static const Uint8 DDR_T_RCD = 5;
      static const Uint8 DDR_T_WR = 6;
      static const Uint8 DDR_T_RAS = 18;
      static const Uint8 DDR_T_RC = 23;
      static const Uint8 DDR_T_RRD = 4;
      static const Uint8 DDR_T_WTR = 3;
      static const Uint8 DDR_T_RASMAX = 17;
      static const Uint8 DDR_T_XP = 2;
      static const Uint8 DDR_T_XSNR = 59;
      static const Uint8 DDR_T_XSRD = 0xc7;
      static const Uint8 DDR_T_RTP = 3;
      static const Uint8 DDR_T_CKE = 2;
      static const Uint16 DDR_RR = 0xc57;
      static const Uint8 DDR_READ_Latency = 7;

    Also, what should PLL1Div8_ratio and PLL1Div9_ratio be set to?

  • Sorry, I don't think I realized you were going to be using the EVM.  I thought you had your own hardware...  That being the case it is probably a better idea to use the version of UBL specifically created for the EVM.  A few more data points:

    • There are several differences on the EVMs.  I haven't done a precise comparison, but at a minimum we see the input clocks are different and it looks like there's a difference related to some of the video devices on the board too (THS8200).
    • I compared the clock settings you mentioned.  I agree with the change you made for PLL1_Mult.  That matches up with the numbers in the other package.  The code is structured slightly different, i.e. they use the raw value (29) which gets programmed into the register while the code you're currently using has the multipler (i.e. PLLM+1) and it subtracts one when writing to the register.
    • There are differences between PLL1Div4_ratio in the two code bases.  Both appear to be within spec, though I'm not sure what other things in the software might potentially rely on that frequency.  So likely better to go with the version that was validated specifically on DM6467T.
    • For the DDR settings, I didn't get a chance to see if both EVMs are using the exact same device.  Let's assume that's the case for a moment.  If you simply want to slow down the clock then all the parameters would still be correct with the one exception of the refresh interval.  The register value for that one would need to be reduced, because otherwise with the longer clock period you will have too much time between refresh intervals.  Everything else would simply become more conservative and can be left alone.

    So in the end I expect you can take either path though neither one is perfect.  With the new knowledge that you're using the EVM I think I would recommend trying to use the version that was tested for the EVM (flash-utilis-dm646x).  At least in that scenario the only thing we're "fighting" is the installation of perl.  If you go the other route there may be a bunch of run-time dependencies that will be tougher to debug.

    Sorry to change direction midstream.  I hope you didn't spend too much time going down the other path!

  • Sorry if I confused you, we do have our own 6467T board design based off of the EVM.  Anyways, I have acquired ActiveState Perl version 5.8 and so I can build the UBL from flash-utils-dm646x.tar.gz.  When I execute "makeublrom.bat" per the build instructions I get the following error, which I think I can ignore because it is trying to display a log file that doesn't exist.
    Translating Image/ublDaVinci.out to ASCII-Hex format...
       "Image/ublDaVinci.out"   ==> .boot
       "Image/ublDaVinci.out"   ==> .text
       "Image/ublDaVinci.out"   ==> .cinit
    Found entry point in ublDaVinci.map at 00000100
    The system cannot find the file specified.

    When I execute "makeUBLbin.exe ublDaVinci.bin" I get the following error (even though it creates the davinciUBLais.bin file).  I think I can ignore this error, because I don't believe I need the AIS file since I'm using the serial flash utility to write the bootloader directly to flash.
    Creating I2C AIS mode input binary files
    This program expects a binary input image NOT .out

    Also, to answer my earlier question about the DDR parameters, I need to calculate these parameters using the equations from the TI DDR2 Memory Controller document and the DDR2 datasheet.  The 6467T EVM ARM GEL file contains a good example http://support.spectrumdigital.com/boards/evmdm6467t/revb/files/davincihd1080p_arm.gel.

    All my questions have been answered, thank you.