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.

HUA demo + ethernet boot on the EVM 6678?

Other Parts Discussed in Thread: SYSBIOS

Hi all,

I am developing for the TMDXEVM6678L. My goal is to make a program that boots from ethernet and uses sockets to read a .out and then execute it in another core.
By now, I have succesfully tested the HUA demo and the ethernet boot example (separately).
So, now I am trying to mix them. That is, booting the HUA demo (C:\Program Files\Texas Instruments\mcsdk_2_00_07_19\demos\hua\evmc6678l\Release\hua_evmc6678l.out) from Ethernet.

What I ahve done is taking the ethernet boot sample and change it to use hua_evmc6678l.out instead of simple.out

My file simple.rmd contains this:

hua_evmc6678l.out
-a
-boot
-e _c_int00
-order L

ROMS
{
   ROM1:  org = 0x0400, length = 0x0080, memwidth = 32, romwidth = 32
          files = { simple.btbl }
}

which is the same as simple.rmd (from C:\Program Files\Texas Instruments\mcsdk_2_00_07_19\tools\boot_loader\examples\ethernet\simple).

However, when I run hex6x simple.rmd I get some warnings of the type "warning: boot table falls in unconfigured memory at 0480h"
and the command bconvert64x -le simple.btbl simple.le.btbl fails.

I suppose that the problem is that, hua_evmc6678l.out size is 5.54 MB and I am specifying org = 0x0400, length = 0x0080 for ROM1. So, it does not fit.
Therefore, I have changed these parameters so that the program can fit. For example:

org = 0x0400, length = 0x1000080

This way, I get no warnings and I can run without problems

bconvert64x -le simple.btbl simple.le.btbl
bootpacket simple.le.btbl simple.eth

to get a simple.eth file (3.12 MB) which I then send to the board via ethernet (like I did with the original simple.eth).
However, this does not work. When I try to connect the browser to the board (like I did to test the basic HUA demo) I get no response from the board.

So I have some doubts:
-can I put the length that I need in the rmd file? I think that using 0x1000080 as I did, I may be overwriting memory that I shouldn't :(
-are there any restrictions on the program that can be booted via Ethernet? (maximum size, libraries that can or cannot be used...)
-for a program that uses NDK like the HUA demo, which entry point should I specify? (_c_int00, main...)
-which is the relationship between the memory map on the cmd file and the one on the rmd file? are both referred to the same memory map? can/cannot they overlap? should the be on a specific memory block?

In addition to this, I have seen in the documentation (spruh58, p.16), that the org address for the ROM1 section of the example corresponds to Local L2 RAM.
Do I have to put there the bootable program, or can I use any section? (like DDR3, for example, since it is much bigger).

Some advice would be great!

Alejandro

  • Hi Alejandro,

    The size seems to be really big. But I don't think that should matter. You can try reducing the size to check that for sure. Also after you connect, do you know where the program counter is? Also can you check if the boot magic address(0x87fffc) is populated correctly.

    Thanks,

    Arun.

  • Hi Arun,

    thanks for replying. I have seen through CCS the content of address 0x87FFFc. The value is 0x80108D20, which according to my .map, corresponds to _c_int00. So, I think this is correct.
    However, when I connect from CCS, I see that the PC register is at different locations like 0xD94E2EFC or 0xA71ED27C which do not map to any known memory position (according to my memory map)

    By the way, when I run hex6x.exe simple.rmd I get the following output:

    Translating to ASCII-Hex format...
       "hua_evmc6678l.out"   ==> .cinit     (BOOT LOAD)
       "hua_evmc6678l.out"   ==> .text.1    (BOOT LOAD)
       "hua_evmc6678l.out"   ==> .text.2    (BOOT LOAD)
       "hua_evmc6678l.out"   ==> .const.1   (BOOT LOAD)
       "hua_evmc6678l.out"   ==> .const.2   (BOOT LOAD)
       "hua_evmc6678l.out"   ==> .switch.1  (BOOT LOAD)
       "hua_evmc6678l.out"   ==> .switch.2  (BOOT LOAD)
       "hua_evmc6678l.out"   ==> .vecs      (BOOT LOAD)

    and, since the output file (.btbl) is much smaller than the .out, and there are sections in the .out that do not show in the hex6x output (.nimu_eth_ll2, .far.1...), I wonder if hex6x could be missing some sections.

    On the other hand, I have tried to reduce the size of the .out file as you suggested. Basically, I have written this program:


                    #include <string.h>
                    #include <stdlib.h>
                    #include <ti/sysbios/BIOS.h>
                    #include <platform.h>

                    int main() { BIOS_start(); }

                    void EVM_init()
                    {
                        platform_init_flags sFlags;
                        platform_init_config sConfig;
                        memset( (void *) &sFlags,  0, sizeof(platform_init_flags));
                        memset( (void *) &sConfig, 0, sizeof(platform_init_config));
                        sFlags.tcsl = 1;
                        sFlags.phy  = 1;
                        if (platform_init(&sFlags, &sConfig) != Platform_EOK) {
                            while (1) {
                                (void) platform_led(1, PLATFORM_LED_ON, PLATFORM_USER_LED_CLASS);
                                (void) platform_delay(50000);
                                (void) platform_led(1, PLATFORM_LED_OFF, PLATFORM_USER_LED_CLASS);
                                (void) platform_delay(50000);     
                            }
                        }
                    }

                    int hpdspuaStart()
                    {
                        int i, k;
                        for (;;)
                        {
                            for (k = 0; k < 4; k ++)
                            {
                                for (i = 0; i < 4; i ++)
                                {
                                    platform_led(i, PLATFORM_LED_OFF, PLATFORM_USER_LED_CLASS);
                                    (void) platform_delay(50000);
                                }

                                platform_led(k, PLATFORM_LED_ON, PLATFORM_USER_LED_CLASS);
                                (void) platform_delay(50000);
                            }
                        }

                        return(0);
                    }

                    uint8_t *Osal_platformMalloc (uint32_t num_bytes, uint32_t alignment) {    return malloc(num_bytes); }
                    void Osal_platformFree (uint8_t *dataPtr, uint32_t num_bytes) {  if (dataPtr) free(dataPtr); }
                    void Osal_platformSpiCsEnter(void){ return; }
                    void Osal_platformSpiCsExit (void){ return; }

    For linking I use the same flags/libraries as in the original HUA demo. This way the size reduces to 3.47 MB.
    When I run this program through CCS, it works (the LEDs flash). However, when I try to send it via Ethernet for booting, it does not work: the LEDs do nothing and the state of PC register and boot magic address are similar to the previous case.

    Any suggestions?


  • I have made some progress on this topic.

    I have built the Example 2 from the BIOS_MCSDK_2.0 User Guide which consists of a BIOS program that plays with the LEDs (but with no NDK involved). The .out size is around 3 MB. The only thing I did not have was the rmd file used to convert the .out in a .eth that can be booted via ethernet.
    I tried with this rmd file:

    led_play.out
    -a
    -boot
    -order L

    ROMS
    {
       ROM1:  org = 0x90000000, length = 0x100000, memwidth = 32, romwidth = 32
              files = { led_play.btbl }
    }

    which should use DDR3 and it works!

    Then, I have been adding NDK support to the cfg file and what I have found out is the following:
    When I put everything on MSMCSRAM, it works fine.
    When I put a section on DDR3, it does not work.

    For example, if I change
      Program.sectMap[".const"] = "MSMCSRAM";
    to
      Program.sectMap[".const"] = "DDR3";

    the program does not work. So, is it possible that I am not able to start the HUA demo from Ethernet because it has lots of sections on DDR?
    I have read about a problem with revision 1.0 of the board (SPRZ334D.pdf, advisory 8) relating the PLL, and it says that there could be problems with DDR. Do you think this could be my problem?

  • Hi Alejandro,

    There are too many unknows. Is it possible for you try a NDK hello world example without MAD and try the Ethernet boot?

    Thanks,

    Arun.

  • Hi Arun,

    first of all, sorry for the delay, but I have had some technical issues trying to post.

    Thanks for the suggestion. I have tried the NDK hello world example with Ethernet boot and it did not worked.
    Then I have changed the .cfg file, by replacing all instances of DDR3 with MSMCSRAM so that nothing went to DDR3 and now it works!

    So, it seems that I have problems booting from ethernet when the program has someting placed in DDR3.
    I think I will try to continue with the rest of my program, since it should fit in non-DDR3 memory, and when I can get a rev 2.0 board I will try again
    just in case the problem is related to the PLL bug.

    On the other hand, when I run it from CCS, I always run the GEL script, that seems to initialize some DDR stuff.
    I wonder if it is possible that I have to make some similar initialization when booting from Ethernet...

    Best regards Arun!