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.

Problem loading *.bin file to LM4f232 evalua kit

Hi,

I use LM4F232 board. I was able to generate the bin file by writing the following commands in the Post build step:

"${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat"  "${BuildArtifactFileName}"  "${BuildArtifactFileBaseName}.bin"

"${CG_TOOL_ROOT}/bin/ofd470.exe"  "${CG_TOOL_ROOT}/bin/hex470.exe"  "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe"

I used the LM flash programmer (program offset at 0x0000) to load the generated bin file into the controller.

Now i am unable to get the expected output.

Cant understand where I went wrong.

Thanks in advance.

NOTE: The program is to just echo the received (through serial port) character, which is done through Teraterm. 

In debug config, program (through CCS, .out file) is working fine.

  • Still I cant find the answer and this is my program:

    #include <inc/hw_memmap.h>
    #include <inc/hw_types.h>

    #include <driverlib/gpio.h>
    #include <driverlib/sysctl.h>
    #include <driverlib/uart.h>

    #include <inc/hw_uart.h>


    void main(void) {

    long kar1=0;
    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOG |SYSCTL_PERIPH_UART0); //Enebles peripherals

    UARTClockSourceSet(UART0_BASE,UART_CLOCK_SYSTEM); // Set the UART clock source

    UARTConfigSetExpClk(UART0_BASE, SysCtlClockGet(), 4800,
    (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |
    UART_CONFIG_PAR_NONE));

    UARTEnable(UART0_BASE);
    while(1)
    {
     if(kar1!=-1)
     {
       while(!UARTCharsAvail(UART0_BASE))
       {
       }
       kar1=UARTCharGetNonBlocking(UART0_BASE);
       UARTCharPut(UART0_BASE, (unsigned char)kar1);
     }
     else
       break;
    }
    UARTDisable(UART0_BASE);
    }

    Thanks

  • Please try using the prebuilt uart_echo example.  Load that first, using lmflash and see if it works.  Please just use the .bin that comes with the software package, do not rebuild it.  I would like to make sure that works first before proceeding any further.

  • Karthi Prime said:

    void main(void) {

    long kar1=0;
    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOG |SYSCTL_PERIPH_UART0); //Enebles peripherals

    UARTClockSourceSet(UART0_BASE,UART_CLOCK_SYSTEM); // Set the UART clock source

    UARTConfigSetExpClk(UART0_BASE, SysCtlClockGet(), 4800,

    One thing I notice is you are using SysCtlClockGet() before using SysCtlClockSet().  I am pretty sure that SysCtlClockGet() only works if you used SysCtlClockSet() first.  That may or may not be the problem.  But anyway you should try the known working program first and go from there.

  • I have worked on the prebuild uart echo and the example is working fine(with lm flash too).

    Let me work more on the own project, analyse and comeback.

    Thanks