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.

66AK2G12: Creating or Changing a Platform file

Part Number: 66AK2G12
Other Parts Discussed in Thread: SYSBIOS

Hello,

I am trying to bring up a custom board based on the 66AK2G12. I have started with the GPIO_LedBlink_evmK2G_armTestProject, and got it working after creating a new pinmux for the board and tweaking the code to use a different pair of GPIOs for the LEDs.

My installed tools are:

CCS 10.2.0
Processor SDK RTOS K2G 6.03.00.106, including PDK K2G 1.0.16
XDCtools 3.61.02.27
SYS/BIOS 6.76.03.01

I am using a Blackhawk USB560v2 for debugging.

I am starting with the ARM core. This project is using the platform at ti.platforms.evmTCI66AK2G02. There are three issues with this platform:

1. When I view the platform using Project->RTSC Tools->Platform->Edit/View, I see that for the GPP core (presumably referring to the Cortex-A15), no internal L2SRAM is defined.

2. For both the DSP and GPP cores, the length of external DDR3 memory is set to 0x8000000 (2 GB). For my custom board, this needs to be changed to 0x20000000 (512 MB).

3. Clock speed in the platform file is set to 1000.0 MHz, but my board is running at 600 MHz.

I have tried creating a new platform, using Project->RTSC Tools->Platform->New, and saving it in a Platforms folder within the project. Here are the steps I took:

  • In the Platform Editor, for Device Family I selected 'cortexa15'. For Device Name, I selected TCI66AK2G02.
  • On the second screen, I clicked Import, which allowed me to import the DDR3 specs from ti.platforms.evmTCI66AK2G02 without entering them all in by hand. After importing, I changed two values: the clock speed, from 1000 to 600 MHz, and the DDR3 Length, from 0x80000000 to 0x20000000.
  • I then added a row in Device Memory for L2SRAM, with a base address of 0x10800000 and a length of 0x100000. (I tried also with a base address of 0x0C000000, with the same results.)
  • Then I set all of the memory sections (Code, Data, and Stack) to use DDR3, and clicked Finish.
  • Finally, I changed the Project Properties->General->Products->XDCtools settings->Platform field to use the new Platform I created.

When I perform a build, I get the following linker output:

Building target: "GPIO_LedBlink_evmK2G_armTestProject3.out"
Invoking: GNU Linker
"C:/ti/ccs1011/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc-7.2.1.exe" -mtune=cortex-a15 -marm -Dk2g02 -Darm0 -DUSE_BIOS -DSOC_K2G -DevmK2G -Og -g -gdwarf-3 -gstrict-dwarf -Wall -finstrument-functions -MMD -MP -mfloat-abi=hard -Wl,-Map,"GPIO_LedBlink_evmK2G_armTestProject3.map" -nostartfiles -static -Wl,--gc-sections -L"C:/ti/bios_6_76_03_01/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/hard" -Wl,--defsym,ARM_CORE=1 -Wl,--defsym,STACKSIZE=0x10000 -Wl,--defsym,HEAPSIZE=0x400 --specs=nano.specs -o"GPIO_LedBlink_evmK2G_armTestProject3.out" "./main_led_blink.o" "./Platforms/vp4/package/package_ti.platforms.evmTCI66AK2G02.o" "./board/GPIO_board.o" "./board/evmK2G.o" "./board/evmK2G_pinmux.o" "./syscfg/66AK2G1x_pinmux_data.o" -Wl,-T"../66AK2Gxx.lds" -Wl,-T"configPkg/linker.cmd" -Wl,--start-group -lrdimon -lgcc -lm -lnosys -lc -Wl,--end-group
makefile:158: recipe for target 'GPIO_LedBlink_evmK2G_armTestProject3.out' failed
./main_led_blink.o: In function `AppLoopDelay':
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:519: undefined reference to `__cyg_profile_func_enter'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:522: undefined reference to `__cyg_profile_func_exit'
./main_led_blink.o: In function `Gpio_appC7xPreInit':
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:552: undefined reference to `__cyg_profile_func_enter'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:552: undefined reference to `__cyg_profile_func_exit'
./main_led_blink.o: In function `Board_initGPIO':
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:224: undefined reference to `__cyg_profile_func_enter'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:251: undefined reference to `__cyg_profile_func_exit'
./main_led_blink.o: In function `main':
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:471: undefined reference to `__cyg_profile_func_enter'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:502: undefined reference to `ti_sysbios_BIOS_start__E'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:502: undefined reference to `__cyg_profile_func_exit'
./main_led_blink.o: In function `AppDelay':
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:511: undefined reference to `__cyg_profile_func_enter'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:512: undefined reference to `Osal_delay'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:512: undefined reference to `__cyg_profile_func_exit'
./main_led_blink.o: In function `gpio_test':
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:371: undefined reference to `__cyg_profile_func_enter'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:386: undefined reference to `GPIO_init'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:398: undefined reference to `UART_printf'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:430: undefined reference to `GPIO_write'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:433: undefined reference to `GPIO_read'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:436: undefined reference to `GPIO_write'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:439: undefined reference to `GPIO_read'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:442: undefined reference to `GPIO_write'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:445: undefined reference to `GPIO_read'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:448: undefined reference to `GPIO_write'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../main_led_blink.c:451: undefined reference to `GPIO_read'
./board/evmK2G.o: In function `CSL_BootCfgUnlockKicker':
C:/ti/pdk_k2g_1_0_16/packages/ti/csl/src/ip/bootcfg/V3/csl_bootcfgAux.h:129: undefined reference to `__cyg_profile_func_enter'
C:/ti/pdk_k2g_1_0_16/packages/ti/csl/src/ip/bootcfg/V3/csl_bootcfgAux.h:131: undefined reference to `__cyg_profile_func_exit'
./board/evmK2G.o: In function `Board_getJTAGID':
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G.c:67: undefined reference to `__cyg_profile_func_enter'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G.c:68: undefined reference to `__cyg_profile_func_exit'
./board/evmK2G.o: In function `Board_getDEVSPEED':
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G.c:78: undefined reference to `__cyg_profile_func_enter'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G.c:90: undefined reference to `__cyg_profile_func_exit'
./board/evmK2G.o: In function `Board_unlockMMR':
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G.c:55: undefined reference to `__cyg_profile_func_enter'
./board/evmK2G.o: In function `CSL_BootCfgUnlockKicker':
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G.c:55: undefined reference to `__cyg_profile_func_enter'
./board/evmK2G.o: In function `CSL_BootCfgUnlockKicker':
C:/ti/pdk_k2g_1_0_16/packages/ti/csl/src/ip/bootcfg/V3/csl_bootcfgAux.h:131: undefined reference to `__cyg_profile_func_exit'
./board/evmK2G.o: In function `Board_unlockMMR':
C:/ti/pdk_k2g_1_0_16/packages/ti/csl/src/ip/bootcfg/V3/csl_bootcfgAux.h:131: undefined reference to `__cyg_profile_func_exit'
./board/evmK2G.o: In function `Board_init':
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G.c:99: undefined reference to `__cyg_profile_func_enter'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G.c:100: undefined reference to `BOARD_initPerfCounters'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G.c:145: undefined reference to `Board_moduleClockInit'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G.c:106: undefined reference to `__cyg_profile_func_exit'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G.c:118: undefined reference to `Board_PLLInit'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G.c:114: undefined reference to `Board_PLLInit_1G'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G.c:127: undefined reference to `Board_DDR3Init'
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G.c:140: undefined reference to `Board_uartStdioInit'
./board/evmK2G_pinmux.o: In function `HW_WR_REG32_RAW':
C:/ti/pdk_k2g_1_0_16/packages/ti/csl/hw_types.h:481: undefined reference to `__cyg_profile_func_enter'
C:/ti/pdk_k2g_1_0_16/packages/ti/csl/hw_types.h:482: undefined reference to `__cyg_profile_func_exit'
./board/evmK2G_pinmux.o: In function `Board_pinmuxConfig':
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G_pinmux.c:39: undefined reference to `__cyg_profile_func_enter'
./board/evmK2G_pinmux.o: In function `HW_WR_REG32_RAW':
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G_pinmux.c:52: undefined reference to `__cyg_profile_func_enter'
./board/evmK2G_pinmux.o: In function `HW_WR_REG32_RAW':
C:/ti/pdk_k2g_1_0_16/packages/ti/csl/hw_types.h:482: undefined reference to `__cyg_profile_func_exit'
./board/evmK2G_pinmux.o: In function `Board_pinmuxConfig':
C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject3\Debug/../board/evmK2G_pinmux.c:47: undefined reference to `__cyg_profile_func_exit'
C:\ti\bios_6_76_03_01\packages\gnu\targets\arm\rtsv7A\lib\boot.aa15fg(startup.oa15fg): In function `gnu_targets_arm_rtsv7A_startupC':
/db/ztree/library/trees/xdctargets/xdctargets-t09/src/gnu/targets/arm/rtsv7A/startup.c:87: undefined reference to `xdc_runtime_System_exit__E'
C:/ti/bios_6_76_03_01/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/hard\libc_nano.a(lib_a-nano-freer.o): In function `_free_r':
/db/ztree/library/trees/newlib/newlib-a00/src/linaro/gcc-arm-none-eabi-7-2017-q4-major/src/newlib/newlib/libc/stdlib/nano-mallocr.c:369: undefined reference to `__malloc_lock'
/db/ztree/library/trees/newlib/newlib-a00/src/linaro/gcc-arm-none-eabi-7-2017-q4-major/src/newlib/newlib/libc/stdlib/nano-mallocr.c:446: undefined reference to `__malloc_unlock'
C:/ti/bios_6_76_03_01/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/hard\libc_nano.a(lib_a-nano-mallocr.o): In function `_malloc_r':
/db/ztree/library/trees/newlib/newlib-a00/src/linaro/gcc-arm-none-eabi-7-2017-q4-major/src/newlib/newlib/libc/stdlib/nano-mallocr.c:267: undefined reference to `__malloc_lock'
/db/ztree/library/trees/newlib/newlib-a00/src/linaro/gcc-arm-none-eabi-7-2017-q4-major/src/newlib/newlib/libc/stdlib/nano-mallocr.c:313: undefined reference to `__malloc_unlock'
/db/ztree/library/trees/newlib/newlib-a00/src/linaro/gcc-arm-none-eabi-7-2017-q4-major/src/newlib/newlib/libc/stdlib/nano-mallocr.c:318: undefined reference to `__malloc_unlock'
collect2.exe: error: ld returned 1 exit status
gmake[1]: *** [GPIO_LedBlink_evmK2G_armTestProject3.out] Error 1
gmake: *** [all] Error 2
makefile:154: recipe for target 'all' failed

**** Build Finished ****

Please tell me how to resolve this issue.

Thank you.

  • Hi,

    You might not have specified the right path of your custom platform in CCS project. I repeated what you described with some specifics below that you didn't mention:

    1. I chose bios_6_76_03_01\packages for the platform package repository when I viewed the platform through Project->RTSC Tools->Platform->Edit/View.

    2. I created a new platform and named it "myBoard". After I finished, the newly created platform appeared in bios_6_76_03_01\packages\myBoard.

    3. when I chose new platform for the CCS project, I put "myBoard" in XDCtools settings->Platform field.

    I was able to build the project without any problem. And I verified that L2SRAM is in the generated map file.

    Hope this helps.

    Regards,

    Jianzhong

  • Hmm. I will try to follow your steps, this time with pictures.

    Project->RTSC Tools->Platform->New:

    Note that I clicked "Add Repository to Project Package Path," and selected the Device Family and Device Name from the controls. After clicking Next, here is page 2, before I began editing it:

    Click Import...

    The only option provided in the list is ti.platforms.evmTCI66AK2G02. This should be fine.

    After clicking OK:

    I make edits, including changing clock speed to 600 MHz, DDR3 length to 0x20000000, adding the L2SRAM, and specifying DDR3 for the three Memory Sections:

    I click Finish, and pop-up reports success.

    When I open Windows Explorer, I see the new Platform here:

    When I go into Project Properties->General->Products, the new platform myBoard doesn't appear in the list of Platform selections:

    Have I done something wrong?

    Andy

  • Hi Andy,

    Just manually type "myBoard" in the Platform field. I don't know what else needs to be done in order to have custom platform in the list.

    Regards,

    Jianzhong

  • That seemed to work. The only issue I have now is that C:\ti\bios_6_76_03_01\packages\myBoard is not a convenient place to store the platform files from a source control standpoint. Is there a way to achieve the same result, except that the platform files are located somewhere under ${PROJECT_ROOT} ?

    I tried copying the C:\ti\bios_6_76_03_01\packages\myBoard directory into ${PROJECT_ROOT}\Platforms, and updating the Platform field, but I get the same result as in my original post.

  • Since this is a generic CCS question, I'll transfer this thread to CCS experts.

  • Andy,

    Can you add ${PROJECT_ROOT}/Platforms to the XDCpath Package Repo list?

  • >> Can you add ${PROJECT_ROOT}/Platforms to the XDCpath Package Repo list?

    Yes, I had already done this.

  • Can you remove the myBoard package from C:\ti\bios_6_76_03_01\packages\myBoard and build again? If you don't get an xdc error regarding unable to find the myBoard platform, then it looks like the correct platform is getting picked up and the package path is correct.

    If that is the case, then I can't help regarding the linker error as it is beyond my area of expertise. I will pull in a device experts once you confirm the above.

    Thanks

    ki

  • Yes, if I rename the folder C:\ti\bios_6_76_03_01\packages\myBoard to something else, I do get the following error when building:

    js: "C:/ti/xdctools_3_55_02_22_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: Error: Can't find the platform package 'myBoard' along the path 

  • That's odd. If I add ${PROJECT_ROOT}/Platforms to the xdctools package path, it resolves that error for me. Perhaps also try adding an absolute path instead of using the macro?

    Can you provide a screenshot of General -> Products page in the project properties, and also the folder where you have the myBoard platform?  

  • I don't quite understand how adding ${PROJECT_ROOT}/Platforms to the xdctools package path would resolve the error. The platform is not in that folder in the first place. The New->Platform tool put the platform in C:\ti\bios_6_76_03_01\packages, as shown in the below screenshot of Windows Explorer.

    I don't know why, but I am unable to paste a screenshot of the Project Properties->General->Products window into this forum's editor window. I've tried sizing the image smaller, and using .png and .jpg formats.

  • I don't quite understand how adding ${PROJECT_ROOT}/Platforms to the xdctools package path would resolve the error. The platform is not in that folder in the first place.

    In one of your previous posts, you mentioned:

    I tried copying the C:\ti\bios_6_76_03_01\packages\myBoard directory into ${PROJECT_ROOT}\Platforms, and updating the Platform field, but I get the same result as in my original post.

    Hence it sounded like you copied the myBoard platform to ${PROJECT_ROOT}\Platforms. Is this not correct?

  • Yes, that is correct, but once the linker errors occur, the project can no longer be successfully built, even if I reverse the changes I made that caused the linker errors in the first place. Clean/Build will fail. Even if I delete the Debug folder altogether, the project won't build successfully. The only solution I've found that allows me to proceed is to delete the entire project, and start over with a new copy of the original project. This is a really nasty problem.

    Since copying the platform into ${PROJECT_ROOT}\Platforms didn't work, I deleted the project, and started fresh with a new copy (with the platform back in C:\ti\bios_6_76_03_01\packages\myBoard, which is the only configuration that has worked).

  • Thanks for clearing that up. I can't answer as for why you are getting the linker errors. I will notify the device experts for device suggestions.

    ki

  • Hi Andy,

    The Processor SDK RTOS for K2G has a demo which uses a custom platform. Please take a look at: processor_sdk_rtos_k2g_6_03_00_106\demos\audio-preprocessing\file_demo_bios. The CCS project is defined in subfolder k2g\ccs. The custom platform is defined in subfolder platforms\packages. You simply add the custom platform path to CCS Other Repositories:

    And this allows you to place your custom platform in the same place as your source code. 

    Regards,

    Jianzhong

  • Hi Jianzhong,

    If I understand you correctly, I think I have already tried what you are trying to explain. My post of 4/6/21, 8:46 am, second paragraph, stated:

    I tried copying the C:\ti\bios_6_76_03_01\packages\myBoard directory into ${PROJECT_ROOT}\Platforms, and updating the Platform field, but I get the same result as in my original post.

    In other words, I can use the platform located in C:\ti\bios_6_76_03_01\packages\myBoard, and it works. But if I copy everything in that folder to ${PROJECT_ROOT}/Platforms, and add the new location (${PROJECT_ROOT}/Platforms) to CCS Other Repositories, and type the name myBoard in the Platform: field, and then do a build, the build will fail with many linker errors. Furthermore, If I then revert everything I just described back to use the platform in the original location C:\ti\bios_6_76_03_01\packages\myBoard, the linker errors will persist, even if I first do a Clean operation, or delete the Debug folder.

  • Hi Andy,

    Thanks for the explanation. Have you tried to create the new platform directly in ${PROJECT_ROOT}\Platforms, instead of copying it from bios_6_76_03_01\packages\myBoard. The copying may have added some confusions.

    Regards,

    Jianzhong

  • Yes, that is what I described in my original question. The build fails with linker errors.

  • Ok. Let me try if I can reproduce your linker errors.

  • Hi Andy,

    I tried again to create a new platform. This time I didn't import existing one. It works fine for me. I created the new platform in pdk_k2g_1_0_16\packages\customPlatforms.

    Then I manually entered CPU frequency, memory, etc, instead of importing an existing platform. After that, I was able to find the new boards I created (2 in total):

    Then I was able to build the project without any problem. After that, I modified the path from C:\ti\pdk_k2g_1_0_16\packages\customPlatforms to ${COM_TI_PDK_INSTALL_DIR}/packages/customPlatforms. The project still builds fine.

    Regards,

    Jianzhong

  • I did everything you described, and achieved the same result. The project builds fine. But it is not what I need.

    I need the custom platform to be located in a subfolder of my project. If I do everything the same, except I specify the location to be a subfolder named Platforms in my project root (which is located in C:\Users\andy\workspace_v10\GPIO_LedBlink_evmK2G_armTestProject7\Platforms), then I get linker errors.

  • This is an interesting problem and I don't know what caused it. I tried a different approach. I recreated the CCS project at a separate place and make a custom board at the same level as the CCS project folder. It worked well.

    So here both CCS project and custom board are under the same parent folder which can be put into source control.

  • Thank you, Jianzhong. Putting the Platforms repository in ${PROJECT_ROOT}/Platforms does not work, but putting it in ${PROJECT_ROOT}/../Platforms does work. This is great.

    Andy

  • Hi Andy,

    Very glad that it worked for you. Thanks for confirming the solution.

    Regards,

    Jianzhong