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: CCS, PDK, GPIO, RTOS, Bare Metal, evmK2G

Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

Hi,

after a new installation of CSS 6.1.3, a new pdk installation for the evmK2G and testcase generation for

GPIO_LedBlink_evmK2G_armTestProject

I run into 2 bugs:

First bug in RTOS mode:

Without any code modification, the XDS2xx USB Debug comes up with:

CortexA15: Trouble Reading Memory Block at 0x80000000 on Page 0 of Length 0x4: (Error -1205 @ 0x80000000) Device memory bus has an error and may be hung. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.504.4)

CortexA15: File Loader: Verification failed: Target failed to read 0x80000000

CortexA15: GEL: File: C:\ti\pdk_k2g_1_0_4\packages\MyExampleProjects\GPIO_LedBlink_evmK2G_armTestProject\Debug\GPIO_LedBlink_evmK2G_armTestProject.out: Load failed.

CortexA15: Unable to terminate memory download: NULL buffer pointer at 0x3aa4

I get the same error after setting the PDK_RAW_BOOT as defined here:

http://processors.wiki.ti.com/index.php/Processor_SDK_RTOS_DIAG#Running_or_debugging_on_CCS

 

Second bug in Bare Metal mode:

After setting

#define BARE_METAL 0x1

at the beginning of the main_led_blink.c, I get the following error:

 

**** Build of configuration Debug for project GPIO_LedBlink_evmK2G_armTestProject ****

 

"C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all

'Building file: C:/ti/pdk_k2g_1_0_4/packages/ti/drv/gpio/test/led_blink/src/main_led_blink.c'

'Invoking: GNU Compiler'

"C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a15 -mtune=cortex-a15 -marm -mfloat-abi=hard -Dk2g02 -Darm0 -DSOC_K2G -DEVM_K2G -I"C:/ti/pdk_k2g_1_0_4/packages/ti/drv/gpio" -I"C:/ti/pdk_k2g_1_0_4/packages" -I"/packages" -I"C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/arm-none-eabi/include" -g -gdwarf-3 -gstrict-dwarf -Wall -c -finstrument-functions -MMD -MP -MMD -MP -MF"main_led_blink.d" -MT"main_led_blink.o" -o"main_led_blink.o" @"configPkg/compiler.opt" "C:/ti/pdk_k2g_1_0_4/packages/ti/drv/gpio/test/led_blink/src/main_led_blink.c"

C:/ti/pdk_k2g_1_0_4/packages/ti/drv/gpio/test/led_blink/src/main_led_blink.c:158:6: warning: return type of 'main' is not 'int' [-Wmain]

void main()

     ^

C:/ti/pdk_k2g_1_0_4/packages/ti/drv/gpio/test/led_blink/src/main_led_blink.c: In function 'main':

C:/ti/pdk_k2g_1_0_4/packages/ti/drv/gpio/test/led_blink/src/main_led_blink.c:212:5: warning: implicit declaration of function 'Task_exit' [-Wimplicit-function-declaration]

     Task_exit();

     ^

'Finished building: C:/ti/pdk_k2g_1_0_4/packages/ti/drv/gpio/test/led_blink/src/main_led_blink.c'

' '

'Building target: GPIO_LedBlink_evmK2G_armTestProject.out'

'Invoking: GNU Linker'

"C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc.exe" -mfloat-abi=hard -Dk2g02 -Darm0 -DSOC_K2G -DEVM_K2G -g -gdwarf-3 -gstrict-dwarf -Wall -Wl,-Map,"GPIO_LedBlink_evmK2G_armTestProject.map" -nostartfiles -static -Wl,--gc-sections -L"C:/ti/bios_6_46_01_38/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/fpu" -L"/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/fpu" -Wl,--defsym,ARM_CORE=1 -Wl,--defsym,STACKSIZE=0x10000 -Wl,--defsym,HEAPSIZE=0x400 -o"GPIO_LedBlink_evmK2G_armTestProject.out" "./GPIO_board.o" "./main_led_blink.o" -Wl,-T"configPkg/linker.cmd" -Wl,--start-group -lrdimon -lgcc -lm -lnosys -lc -Wl,--end-group

makefile:146: recipe for target 'GPIO_LedBlink_evmK2G_armTestProject.out' failed

C:\ti\pdk_k2g_1_0_4\packages\MyExampleProjects\GPIO_LedBlink_evmK2G_armTestProject\Debug\configPkg\package\cfg\gpio_arm_pa15fg.oa15fg:(.data.ti_sysbios_knl_Task_Object__table__V+0x28): undefined reference to `gpio_test'

collect2.exe: error: ld returned 1 exit status

gmake: *** [GPIO_LedBlink_evmK2G_armTestProject.out] Error 1

gmake: Target 'all' not remade because of errors.

 

**** Build Finished ****

 

 

Please try to help. Thanks.

  • Hi MotorControl,

    I've forwarded this to the SW experts. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • Here are my responses for Bug number one. The memory location where you are reporting the error refers to external memory or DDR3 address space on this device. It indicates to me that your DDR may not be initialized. Is it possible that you didn`t run the GEL initialization script when connecting to the platform.

    The process to connect to the EVM hardware using CCS has been described here:

    It is important that you set tthe EVM in no boot mode (check LCD screen to confirm) and in thee target configuration select the target as EVMK2G. When you connect to the cores, you will see the clocks being initialized in the IO window and the DDR EMIF configuration and clocks being configured to allow external memory usage.

    For the second issue, the example that comes with the GPIO driver, the examples can`t be simply be run in BARE_METAL form by defining the macro. This is because, the example by default includes a .cfg file that specifies some TI RTOS/SYSBIOS setting. To compile the example in BARE_METAL form, you need to add "BARE_METAL" macro in the compiler pre-defines and removing "USE_BIOS" macro  under Project Properties as shown below:

    You then need to comment out  the following lines of code that defines the gpio_test as an OS task for TI RTOS:

    /* ================ Task configuration ================ */
    /*var task0Params                 = new Task.Params();
    task0Params.instance.name       = "echo";
    task0Params.stackSize           = 0x1000;
    Program.global.echo             = Task.create("&gpio_test", task0Params);*/

    you can now compile and run the example without running it as an TI RTOS task.

    Please Note that these examples included as part of the LLD driver are primarily built to be run as TI RTOS examples and not as bare-metal examples. For bare-metal LLD driver usage, you need to refer to diagnostics examples under the path pdk_k2g_1_0_4\packages\ti\board\diag

    Let us know if this resolves the issues that you are seeing with the software.

    Regards,

    Rahul