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.

Ethernet boot loader for TMS5703137

Other Parts Discussed in Thread: TMS570LS3137, HALCOGEN

Hi,

    This is Abhijith working for Advanced Rail Controls Pvt.ltd , we are using TMS570ls3137 Micro-controller in our projects , till now we were using JTAG to program the flash which is not acceptable in our project we are  looking for program flash using Ethernet . this is because in one product there will be more than four TMS570LS3137 processors , so it is not good to program each uc by connecting JTAG and maintenance will not be easy if we do that so we have decided to connect all the uc's to one switch and connecting laptop to that switch and sitting in one place program all the TMS micro-controllers. For this what is the procedure and you help us with this ?.

Thanks And Regards .

 Abhijith Raghavendra

  • Abhijith,


    Can you have a look at the following page:

    In Tools & Software section, there is a link for:

    SafetyMCU_Ethernet_Bootloader.zip

    This is an example of bootloader using Ethernet. Please have a look and let me know if this is useful.

  • Dear Jean,

                    I have downloaded the file but i am not able to compile and run the project.

    Thanks & Regards

    Abhijith Raghavendra.

  • Jean ,
    I compiled the example code and installed Tftpd32 software also in my host , can you tell what exactly i have to do after this ?

    Regards.
    Abhijith Raghavendra.
  • Abhijith,

    Here are some additional information about the Ethernet bootloader.

    By default the code is using fixed IP with the following IP address for the Micro controller: 10.219.61.175
    If you connect the board to a DHCP server, than there is a need to change an argument in the following function call:

    In sys_main.c
        lwIPInit(0, emacAddress,  htonl(inet_addr("10.219.61.175")) , htonl(inet_addr("255.255.254.0")), htonl(inet_addr("10.219.60.1")), IPADDR_USE_DHCP ); 

    Change IPADDR_USE_STATIC by IPADDR_USE_DHCP and recompile the code.
    Flash the code on the device.
    On the board, there is a 4 DIP Switch S2. It is necessary to enable the Ethernet phy by moving the first switch to the ON position (ETHERNET)

    To check that the code is running correctly, connect the mini USB to your PC and start a windows terminal with the following attributes:

    Run the code, you should see on the terminal the following log:

    In my case, I'm using DHCP. On my DHCP switch, I have my PC and the HDK connected.
    The DHCP switch can show me the connected client:

    In my case, the IP address is 192.168.2.3

    Start TFTPD and configure the Tftpd Client as shown below:

    Host = your board IP address (192.168.2.3) in my case.
    Local file is the path and filename of the code to be downloaded to the Micro-Controller.
    In my case, I'm using an RM48 device, there is a code example in the SafetyMCU_enet_bootloader\App Example directory.

    Than click on Put.

    This will start the download and flash process. A pop up windows and the windows terminal should show you the status:

    Once the application code is flashed in the device, on the next power cycle, the bootloader will jump directly to the application.
    If you have to download a new application, during power cycle, press the GIOA7 push button. This will force the bootloader to wait for a new download.

    Please let me know if I've answered your question.

  • Jean,

              Thank you for your support, i have two more queries regarding this .

    1> how to get ( .bn) file after compilation in ccs 6.1 ?

    2> You mentioned that on power cycle we have to press GIO7 switch then the flash can be programmed.

     This does not solve our problem as i told we cannot keep a switch on each processor ,as i told we will be having more than 4 processor boards in our projects which will be located in different places in side the locomotive .so what we are looking is connecting all the processors ie uc to one switch each will be having different IP addresses and if we want to program we will connect  laptop to that switch and program the flash.

     But pressing that switch during powercycle will not help. Is there any other method which will be good for our requirement ?? 

    Regards 

    Abhijtih Rghavendra.

  • Hi Jean-Marc,
    I've been working on Hercules FreeRTOS-PLUS-TCP port.
    I've found some issues in the HALCoGen generated HL_emac.c code.
    Could you tell me, where should I send them?

    Best Regards: Szilard
  • Abhijtih,

    1] To generate a bin file after compile and link, add the following command line in the CCS Build Post-Build steps as shown in screen shot.

    "${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/armofd.exe" "${CG_TOOL_ROOT}/bin/armhex.exe" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe"

    2] The bootloader that we provide an example, not a final solution.
    It provides the concept of booting on a "blank" device (aside from bootloader), and allowing a default first application download.
    On subsequent boot, now that a valid application is already programmed, the device will start this application.
    Now it is up to you, in your application to define a mechanism (by receiving a special command via ethernet) to decide to erase your application and download a new one.

  • Szilard,

    You can post your finding here, we will forward your comments to the Halcogen team.
  • Hi Jean-Marc,

    My findigns are in C:\ti\Hercules\HALCoGen\v04.05.00\drivers\TMS570LC4357ZWT\EMAC570v000\emac.c sorurce file.

    line 1145:
    last_txbd->next = txch_dma->free_head;
    proposal:
    last_txbd->next = (emac_tx_bd_t *)EMACSwizzleData(txch_dma->free_head);

    line: 1488:
    curr_bd->next = active_head;
    proposal:
    curr_bd->next = (emac_tx_bd_t *)EMACSwizzleData(active_head);

    line 1680:
    curr_tail->next = rxch_int->free_head;
    proposal:
    curr_tail->next = (emac_tx_bd_t *)EMACSwizzleData(rxch_int->free_head);

    line 1484:
    while (((uint32)0U != *((uint32 *)0xFCF78600U)))
    problem description:
    checking of TXHDPx register doesn't follow the change of EMAC_CHANNELNUMBER - so the code is waiting for zero value of TXHDP0 while DMA channel number 1-7 is beeing used.

    Best Regards: Szilard
  • Sorry,

    the curr_tail->next is actually (emac_rx_bd_t *).

    line 1680:

    curr_tail->next = rxch_int->free_head;

    proposal:

    curr_tail->next = (emac_rx_bd_t *)EMACSwizzleData(rxch_int->free_head);

    Best regards: Szilard

  • Dear Jean,

                       This is in continuation with our conversation regarding boot loaders, i have few queries .

    1> I have trying from past few days for erasing the flash after receiving particular message through Ethernet but till now we are not successful in that. Can you please help us with this as we have got stuck with our project.

    2> This is more important we are  very much indeed of UDP server program example which will be able to send and receive data from host system . we tried some of the examples in which we only able to either send the data or receive data , And in server how to find the ip address of the client which has requested the service?.

    3> Is there any Boot loader (Ethernet boot loader) without TFTP protocol and which uses TCIP of  UDP protocols?. This is for other project . 

    4> Is there any controller which is having 5 to 6 UART, 256kb or more RAM, 3MB or above flash.

    Thanks and regards.

    Abhijith Raghavendra

  • Dear jean ,

                      Thank you for your support . I am trying to generate .bin so that i can dump that through Ethernet boot loader but when i try to put my bin file it is not executing in hdk board. in the same way if i put blinky example which is there in that boot loader example. i am attaching my project here.

    One more question is it possible to call boot loader from our application?

    8132.led.rar 

  • Hi Abhijith,

    Can you please tell the steps to load other .bin files from ethernet bootloader if you have been successful. I have the same issue..

    Thanks in advance.

    Regards,

    Shruthi