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.

CCS/AM5718: code with out bios

Anonymous
Anonymous
Part Number: AM5718
Other Parts Discussed in Thread: TMDXIDK5718,

Tool/software: Code Composer Studio

I'm trying to write a simple code without TI sys/bios.here is my code

/*******************************************************LED_BLINKING***************************************************************************/

#include <stdio.h>

#include <ti/drv/gpio/soc/GPIO_soc.h>

#include "GPIO_log.h"
#include <ti/board/board.h>

#include <xdc/std.h>

#define GPIO_PIN_VAL_HIGH 1
#define GPIO_PIN_VAL_LOW 0

int main(void)
{
volatile int i;
Board_initCfg boardCfg;
boardCfg = BOARD_INIT_PINMUX_CONFIG |
BOARD_INIT_MODULE_CLOCK |
BOARD_INIT_UART_STDIO;
Board_init(boardCfg);
GPIO_init();
while(1)
{
GPIO_write((USER_LED1), GPIO_PIN_VAL_HIGH);
for(i=0;i<6000;i++);
GPIO_write((USER_LED1), GPIO_PIN_VAL_LOW);
for(i=0;i<6000;i++);
}

return 0;
}

/******************************************************************************************************************************************************/

subdir_rules.mk  shows an error like these..

################################################################################
# Automatically-generated file. Do not edit!
################################################################################

SHELL = cmd.exe

# Each subdirectory must supply rules for building sources it contributes
%.o: ../%.c $(GEN_OPTS) | $(GEN_HDRS)
@echo 'Building file: "$<"'
@echo 'Invoking: GNU Compiler'
"C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a15 -mtune=cortex-a15 -marm -Dam5718 -I"C:/ti/pdk_am57xx_1_0_13/packages" -I"C:/ti/xdctools_3_50_08_24_core/packages" -I"C:/ti/pdk_am57xx_1_0_13/packages/ti/drv/gpio/test/led_blink/src" -I"C:/Users/BCG/Desktop/led_implimenting/test" -I"C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/arm-none-eabi/include" -g -gdwarf-3 -gstrict-dwarf -Wall -specs="rdimon.specs" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" $(GEN_OPTS__FLAG) -o"$@" "$<"
@echo 'Finished building: "$<"'
@echo ' '

%.o: ../%.S $(GEN_OPTS) | $(GEN_HDRS)
@echo 'Building file: "$<"'
@echo 'Invoking: GNU Compiler'
"C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a15 -mtune=cortex-a15 -marm -Dam5718 -I"C:/ti/pdk_am57xx_1_0_13/packages" -I"C:/ti/xdctools_3_50_08_24_core/packages" -I"C:/ti/pdk_am57xx_1_0_13/packages/ti/drv/gpio/test/led_blink/src" -I"C:/Users/BCG/Desktop/led_implimenting/test" -I"C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/arm-none-eabi/include" -g -gdwarf-3 -gstrict-dwarf -Wall -specs="rdimon.specs" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -x assembler-with-cpp $(GEN_OPTS__FLAG) -o"$@" "$<"
@echo 'Finished building: "$<"'
@echo ' '

/****************************************************************************************************************************************************************************************************************************/

but it doesnt shows any error inside my code.can i able to write these code without ti bios.how we will modify these code for achieving it??

currently i'm working with AM5718 PSDK RTOS version: v05.02 & my ccstudio version is 8.0.0...

  • Hi Muhammad,

    What OS you have on your host machine (Ubuntu, Windows, else) ?

    Do you use AM571x IDK TMDXIDK5718 or you have custom board?

    Regards,
    Pavel
  • Anonymous
    0 Anonymous in reply to Pavel Botev

    windows7 and board is  AM571x IDK TMDXIDK5718

  • Muhammad,

    From what I understand, you are trying to run GPIO bare metal application on the Cortex-A15 core of AM571x IDK.

    I would suggest you to start with below pointer:

    software-dl.ti.com/.../index_examples_demos.html

    Check if you are able first to run that "hello world" example appl, then you can add GPIO functionality on top of it.

    We have also GPIO LED bare metal example available at the below location, you might also check and align to it:

    processor_sdk_rtos_am57xx_5_02_00_10/demos/jailhouse-inmate/baremetal/led/led_test.c

    Regards,
    Pavel
  • Anonymous
    0 Anonymous in reply to Pavel Botev

    Yes I'm trying to run GPIO bare metal application on the cortex AM571X IDK. I just added GPIO  functionality on the top of "hello world" as per you mentioned earlier.But during bulid time it shows 2 errors.

    1.error  inside the automatically generated file named sub_dir.mk as shown below.

    2.error (unknown type name) that points to the disabled part of code as shown below. 

    same errors  happened in the case of McASP bare metal code.What is the reason for this errors.How we resolve these errors??.. 

    ################################################################################
    # Automatically-generated file. Do not edit!
    ################################################################################

    SHELL = cmd.exe

    # Each subdirectory must supply rules for building sources it contributes
    %.o: ../%.c $(GEN_OPTS) | $(GEN_HDRS)
    @echo 'Building file: "$<"'
    @echo 'Invoking: GNU Compiler'
    "C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a15 -mtune=cortex-a15 -marm -Dam5718 -I"C:/Users/BCG/Desktop/led_am5718/led_am5718" -I"C:/Users/BCG/Desktop/led_am5718/led_am5718/STAGE _1" -I"C:/Users/BCG/Desktop/led_am5718/led_am5718/STAGE_2" -I"C:/Users/BCG/Desktop/led_am5718/led_am5718/STAGE_3" -I"C:/Users/BCG/Desktop/led_am5718/led_am5718/STAGE_4" -I"C:/Users/BCG/Desktop/led_am5718/led_am5718/STAGE_5" -I"C:/Users/BCG/Desktop/led_am5718/led_am5718/STAGE_6" -I"C:/ti/pdk_am57xx_1_0_13/packages/ti/drv/uart/build" -I"C:/ti/pdk_am57xx_1_0_13/packages/ti/drv/uart" -I"C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/arm-none-eabi/include" -g -gdwarf-3 -gstrict-dwarf -Wall -specs="rdimon.specs" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" $(GEN_OPTS__FLAG) -o"$@" "$<"
    @echo 'Finished building: "$<"'
    @echo ' '

    %.o: ../%.S $(GEN_OPTS) | $(GEN_HDRS)
    @echo 'Building file: "$<"'
    @echo 'Invoking: GNU Compiler'
    "C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a15 -mtune=cortex-a15 -marm -Dam5718 -I"C:/Users/BCG/Desktop/led_am5718/led_am5718" -I"C:/Users/BCG/Desktop/led_am5718/led_am5718/STAGE _1" -I"C:/Users/BCG/Desktop/led_am5718/led_am5718/STAGE_2" -I"C:/Users/BCG/Desktop/led_am5718/led_am5718/STAGE_3" -I"C:/Users/BCG/Desktop/led_am5718/led_am5718/STAGE_4" -I"C:/Users/BCG/Desktop/led_am5718/led_am5718/STAGE_5" -I"C:/Users/BCG/Desktop/led_am5718/led_am5718/STAGE_6" -I"C:/ti/pdk_am57xx_1_0_13/packages/ti/drv/uart/build" -I"C:/ti/pdk_am57xx_1_0_13/packages/ti/drv/uart" -I"C:/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/arm-none-eabi/include" -g -gdwarf-3 -gstrict-dwarf -Wall -specs="rdimon.specs" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -x assembler-with-cpp $(GEN_OPTS__FLAG) -o"$@" "$<"
    @echo 'Finished building: "$<"'
    @echo ' '

  • MUHAMMAD SHAN A S said:
    currently i'm working with AM5718 PSDK RTOS version: v05.02 & my ccstudio version is 8.0.0...

    Muhammad,

    RTOS v5.02 is compatible and should be used with CCS 8.2.0:

    Could you please switch from 8.0.0 to 8.2.0 and report back if there will be any improvement?

    Regards,
    Pavel

  • Anonymous
    0 Anonymous in reply to Pavel Botev

    I switched to v8.2.0. But there is no change.Same error is repeated..

  • Muhammad,

    I will suggest you to try first the LED diagnostic test:

    pdk_am57xx_1_0_13/packages/ti/board/diag/led/src/led_test.c

    Once you run it successfully, you can modify it per your specific needs. Please refer also to the below e2e threads for more info:

    e2e.ti.com/.../2700715
    e2e.ti.com/.../666842

    Regards,
    Pavel
  • If you have no more questions related to the subject of the e2e thread, please close/verify/resolve this thread.

    Regards,
    Pavel