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.

M4 microcontroller debbuging



dear, ia m anew with tiva c cortex m4 series lanchpad, when i try to debug the code to my board,i got this message: load program error: C:\users........could not open file and i see interrogation on these files on my mainc  thank you

  • Hi,

    What program are you trying to debug at your Tiva Launchpad? Are there any build errors? What IDE are you using?

    - kel
  • Hi, thank you very much for your response, i am trying to debug 02 small codes, one is to display number in hexadecimal and decimal via putty(in the window i can see the printed senteses but the number are just displayed like this 0x), ths second is to toggle the 03 LEDs of mylaunchpad board but it didn't work as it displays launch error, files couldn't find
    i am using ccs(code composer studio)
    i hope i have answerd your questions for better help
  • Hi tarik,

    Post your second program "toggle 3 LEDs" code here for review.

    - kel
  • Hi ROBERTO, it shows me that there is an error in workspace

    #include <stdint.h>
    #include <stdbool.h>
    #include "inc/hw_memmap.h"
    #include "inc/hw_types.h"
    #include "driverlib/sysctl.h"
    #include "driverlib/gpio.h"
    uint8_t ui8PinData=2;
    int main(void)
    {
        SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
        SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
        GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3);
    while(1)
       {
        GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1| GPIO_PIN_2| GPIO_PIN_3, ui8PinData);
        SysCtlDelay(2000000);
        GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, 0x00);
        SysCtlDelay(2000000);
        if(ui8PinData==8) {ui8PinData=2;} else {ui8PinData=ui8PinData*2;}
       }
        }

  • Memory Map Initialization Complete
    CORTEX_M4_0: GEL: Encountered a problem loading file: C:\Users\toshiba\workspace_v6_1\lab12\Debug\lab12.out Could not open file
  • Hello Tarik,

    Can you check if the compilation does not have any errors and that the out file was generated?

    Regards
    Amit
  • Hello Amit,
    yes there is a problem with the compilation, i am trying to add the tivaware c series libraries but don t know how
  • Hello Tarik

    What is the compilation log in CCS Showing?

    It would be better if you can import one of the existing examples and then make the modifications in the imported example.

    Regards
    Amit
  • hi amit,
    this is the message from the ccs: unable to launch CCS debug session based on current selection, the specified file"c:\users\toshiba\workspace_v6_1\......, i tried to blink a LED with the imported project and it worked correctly, Now i am trying to display an hexadecimal and decimal numbers but i does just display the 0x this the code below;

    #include <stdio.h>
    #include <stdbool.h>
    #include <stdint.h>
    #include "UART.h"

    /*the binary number */
    uint8_t num1=0xA5; /*0xA5 and 165 */
    uint8_t num2=0xFF; /*0xFF and 255 */
    uint8_t num3=0xD7; /*0xD7 and 215*/
    uint8_t num4=0xFF; /*0xFF and 215 */
    uint8_t num5=0xDF; /*0xDF and 223*/
    uint16_t num6=0x1f5a;
    uint8_t num7=0x00;
    uint16_t num8=0xff55;


    int main(void)
    {

    UART_Init();


    printf("the value of num1 in hexadeciaml and decimal are: 0x%.2x(%d),",num1 ,num1);

    num2 &=0xF7;
    printf("the value of num2 in hexadeciaml and decimal are: 0x%x\n(%u)",num2,num2);

    num3 <<=1;
    printf("the value of num3 in hexadeciaml and decimal 0x%x\n(%u)",num3,num3);

    num4 &=0xBF;
    printf("the value of num4 in hexadeciaml and decimal 0x%x\n(%u)",num4,num4);

    num5 &=0x04;
    printf("the value of num6 in hexadeciaml and decimal 0x%x\n(%u)",num5,num5);


    num6 &=0xFDFF;
    printf("the value of num6 in hexadeciaml and decimal 0x%x\n(%u)",num6,num6);

    num7 |=0x80;
    printf("the value of num7 in hexadeciaml and decimal 0x%x\n(%u)",num7,num7);

    num8 ^=0x0100;
    printf("the value of num8 in hexadeciaml and decimal 0x%x\n(%u)",num8,num8);

    while(1);

    return 0;
    while(1);
  • Hello Tarik,

    I see the code, but what is the compilation error?

    Regards
    Amit
  • hello amit,
    i am so sorry for being late, the problem is solved ,the error was because i didn;t unclude the tivaware librairies,thank you very much
  • Hello Tarik,

    Normally a post of the compilation log would be useful for a faster resolution.

    Regards
    Amit
  • hello Amit,
    okay, i will take your advices for the next problems,thank you very much