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/LAUNCHXL-F280049C: How to transfer Boostxl-Buckconv CCS project

Part Number: LAUNCHXL-F280049C
Other Parts Discussed in Thread: BOOSTXL-BUCKCONV, TIDM-DC-DC-BUCK, C2000WARE, SFRA, TMS320F280025C, POWERSUITE

Tool/software: Code Composer Studio

Hi

I would like to transfer a code of Boostxl-Buckconv project from LAUNCHXL-F280049C to our own board using F280025C? Please advise how to do it beside a pin configuration need to change.

BR

HK Woo

  • HK Woo,

    The primary device-related changes would be focused in:

    • buck_user_settings.h
    • buck_hal.c
    • buck_hal.h

    Most of the driverlib APIs should transfer directly from F28004x to F28002x.

    The TIDM-DC-DC-BUCK document has a hierarchy diagram in the Adapting This Solution section that may help.

    -Tommy

  • Hi Tommy

    Thanks for your information. I should have some question on transfer the code from Launchxl-F280049C to our own F280025C board.

    1. As you mentioned, the modification would be focused on these 3 files. May I know that what items are, is it just relate to assign different functions of pin for own board. If it is true, I just need to use different pin macro name in these files. Is it correct?

    2. "Most of the driverlib APIs should transfer directly from F28004x to F28002x.". What is mean? Would you shows me an example.'

    3. "hierarchy diagram". Would you shows me actual document name?

    Thanks

  • Hung Kai Woo1 said:
    As you mentioned, the modification would be focused on these 3 files. May I know that what items are, is it just relate to assign different functions of pin for own board. If it is true, I just need to use different pin macro name in these files. Is it correct?

    If you take a close look at these files, you will see that the pin resources (numbers) are selected through #define pragmas in the settings files.  The HAL files host device-specific configurations that may vary between platforms.

    Hung Kai Woo1 said:
    "Most of the driverlib APIs should transfer directly from F28004x to F28002x.". What is mean? Would you shows me an example.'

    You can see this in the C2000Ware examples.  For example, if you compare the source for epwm_ex1_trip_zone.c between F8002x and F28004x, you will find that the function calls are the same except for a change in GPIO pin numbers:

    ~\C2000Ware_XXXX\driverlib\f28002x\examples\epwm\epwm_ex1_trip_zone.c
    ~\C2000Ware_XXXX\driverlib\f28004x\examples\epwm\epwm_ex1_trip_zone.c

    Hung Kai Woo1 said:
    "hierarchy diagram". Would you shows me actual document name?

    The product page is TIDM-DC-DC-BUCK.  This is the direct link to the document.

  • Hi

    I based on your advise and has made the modification. However, I still got an error message as below


    **** Build of configuration RELEASE for project buck_F280025C ****

    "C:\\ti\\ccs1011\\ccs\\utils\\bin\\gmake" -k -j 8 all -O
     
    Building target: "buck_F280025C.out"
    Invoking: C2000 Linker
    "C:/ti/ccs1011/ccs/tools/compiler/ti-cgt-c2000_20.2.3.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -O3 --opt_for_speed=5 --fp_mode=relaxed --advice:performance=all --define=_TI_EABI_ --define=_DEBUG --define=CLA_DEBUG=1 --define=F28x_DEVICE --define=CPU1 --define=LARGE_MODEL --define=_FLASH --define=BUCK_CONTROL_RUNNING_ON_CPU -g --float_operations_allowed=32 --diag_suppress=10063 --diag_suppress=173 --diag_warning=225 --diag_wrap=off --display_error_number --quiet --gen_func_subsections=on --abi=eabi --cla_signed_compare_workaround=on -k --asm_listing -z -m"buck_F280025C.map" --heap_size=0x200 --stack_size=0x400 --warn_sections -i"C:/ti/ccs1011/ccs/tools/compiler/ti-cgt-c2000_20.2.3.LTS/lib" -i"C:/Users/hkwoo/workspace_v10/buck_F280025C/libraries/sfra" -i"C:/Users/hkwoo/workspace_v10/buck_F280025C/libraries/CLAmath" -i"C:/Users/hkwoo/workspace_v10/buck_F280025C/libraries/FPUfastRTS" -i"C:/Users/hkwoo/workspace_v10/buck_F280025C/device/driverlib" -i"C:/Users/hkwoo/workspace_v10/buck_F280025C/libraries/SFO" -i"C:/ti/ccs1011/ccs/tools/compiler/ti-cgt-c2000_20.2.3.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="buck_F280025C_linkInfo.xml" --entry_point=code_start --rom_model -o "buck_F280025C.out" "./buck.obj" "./buck_hal.obj" "./buck_main.obj" "./device/device.obj" "./device/f28002x_codestartbranch.obj" "./libraries/DCL/DCL_DF22_L2L3.obj" "./libraries/DCL/DCL_clamp_L1.obj" "./libraries/DCL/DCL_error.obj" "./libraries/sfra/sfra_gui_scicomms_driverlib.obj" "../280025_FLASH_lnk.cmd" "../device/driverlib/driverlib_eabi.lib" "../libraries/CLAmath/cla2_math_library_fpu32_eabi.lib" "../libraries/FPUfastRTS/rts2800_fpu32_fast_supplement_eabi.lib" "../libraries/SFO/SFO_v8_fpu_lib_build_c28_driverlib_eabi.lib" "../libraries/sfra/sfra_f32_tmu_eabi.lib"  -ldriverlib_eabi.lib -lsfra_f32_tmu_eabi.lib -lrts2800_fpu32_fast_supplement_eabi.lib -lrts2800_fpu32_eabi.lib -lcla2_math_library_fpu32_eabi.lib -lSFO_v8_fpu_lib_build_c28_driverlib_eabi.lib -llibc.a
     
    >> Compilation failure
    makefile:174: recipe for target 'buck_F280025C.out' failed
    warning #10247-D: creating output section "ramfuncs" without a SECTIONS specification
    warning #10247-D: creating output section "isrcodefuncs" without a SECTIONS specification
    warning #10247-D: creating output section "SFRA_F32_Data" without a SECTIONS specification
    warning #10247-D: creating output section "FPUmathTables" without a SECTIONS specification
    "../280025_FLASH_lnk.cmd", line 57: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. run placement with alignment/blocking fails for section ".stack" size 0x400page 0.  Available memory ranges:
       RAMM1        size: 0x3f8        unused: 0x3f8        max hole: 0x3f8     
    error #10010: errors encountered during linking; "buck_F280025C.out" not built
    gmake[1]: *** [buck_F280025C.out] Error 1
    gmake: *** [all] Error 2
    makefile:170: recipe for target 'all' failed

    **** Build Finished ****

    I think that it may due to .cmd link file, but I don't know how to fix it after google the error message.

    Please advise how to fix it.

    Attached zip is my modified project from "buck_F280049C" buck_F280025C.zip

    Furthermore, I burned a program to my own board using TMS320F280025C withing CCS and XDS110 Debug Probe device (bought from TI). It is successful and start to run the program step by step. However, there is error message as running SysCtl_setClock(DEVICE_SETCLOCK_CFG); in device.c. The message is "Can't find a source file at "/home/ubnuser/ti/repos/c2000ware/repos/f28004x/release_pkg/driverlib/f28004x/driverlib/sysctl.c"
    Locate the file or edit the source lookup path to include its location.". It seems that the code is still point to somewhere.

    I checked that includes and please find screenspot as below

    I don't know what happen

    HK Woo

  • HK Woo,

    It looks like your F28002x .CMD file does not have the equivalent SECTIONS that are defined for the F28004x buck example, and there is insufficient space allocated to fit the program.  You can see this article on CMD file basics.  The C28x C-compiler guide may be helpful too.

    -Tommy

  • Hi Tommy

    Thanks for your information. Based on it, I used "2800Cx_generic_flash_lnk.cmd" file and have modified it. There is not more error after rebuild the project. I am not sure that if there is no error, is it mean that environment setting is correct for the migration from 49C to 25C?

    Basically, I did below modification.  

    1.Replaces these files under directory device from c:\ti\c2000\C2000Ware_3_03_00_00\device_support\f28002x\common\source\device.c

    2.Replaces these files under directory device from c:\ti\c2000\C2000Ware_3_03_00_00\device_support\f28002x\common\include\device.h

    3.Replaces these files under directory device from c:\ti\c2000\C2000Ware_3_03_00_00\device_support\f28002x\common\include\driverlib.h

    4.Replaces these files under directory device from c:\ti\c2000\C2000Ware_3_03_00_00\device_support\f28002x\common\source\f28002x_codestartbranch.asm

    5.Modified "28002x_generic_flash_lnk.cmd"

    Above modification is just for CCS enviroment setup.

    Note: I have not replaced "driverlib_eabi.lib" under device\driverlib since I cannot find it for 28002x. Please advice that should I keep to use original one.

    Please advice  that is it correct way for the migration since I am fresh on TI MCU and please find attached zip file for your reference.

    Furthermore, I burned the program to my own board using TMS320F2800C25C with CCS 10V and XDS110 Debug Probe (Bought from TI). It is OK. I debug the program with CCS step by step. However, there is an error as runing SysCtl_setClock(DEVICE_SETLOCK_CFG). Please find screenshot as below

    Please advise the solution. Thanks

    BR

    HK Woo8267.buck_F280025C.zip

  • HK Woo,

    Yes, you are taking the correct approach.  For the driverlib library, you can use the driverlib.lib files found in either the Debug or Release version of ~\C2000Ware_XXXX\driverlib\f28002x\driverlib\ccs

    The F28004x compiler supported both COFF and EABI outputs so there was a need to specify which option was used to build the library.  The F28002x compiler only supports EABI so the designation is not specified.

    The error is most likely related to the fact that you were mixing the F28004x library with the F28002x project resources.

    -Tommy

  • Hi Tommy

    Thanks for your feedback. I have gone over the setting. I am really don't know what setting which causes a mixing on F280049C and F280025C. Could you provide more specific step how to check it.

    Thanks

  • HK Woo,

    I think this F28004x Introductory Workshop may help explain some of your questions about the C2000 development environment and device architecture.  The F28002x and F28004x share the same architectural platform so you will be able to apply the F28004x concepts directly to F28002x.

    -Tommy

  • Hi Tommy

    I have gone over the manual but still can't find out the root cause. Please help.

  • HiTommy

    I fixed the issue and running the code as my expectation. However, I still have some question. It is found that the program generated a header file "buck_settings.h" under "RELEASE" automatically and use it to compile the program. I don't want use "back_settings.h". I want to use my own parameters instead of these generated by CCS. Of course, I can add new macro name in these header file on buck_user_settings.h but I don't want to do it in this way because I want to keep these macro name.

    Please advise how to do it.

    BR

    HK Woo

  • HK Woo,

    The recommended method to avoid auto-generation of buck_settings.h is to use the non-PowerSUITE project as described in the TIDM-DC-DC-BUCK design guide:

    -Tommy

  • I followed the document to disable powerSuite feature but still fail. However, I found that I removed Powersuite from main.syscfg and buck_settings.h to the directory. It is ok.

    But I still have 2 questions as below

    1. There is warning as I compile the file. CCS prompted "#10068-D no matching section". It was found that it is related to link file as below in red

           .TI.ramfunc
           {
               -l sfra_f32_tmu_eabi.lib
           }
           ramfuncs

    2.  The json file  C:\Users\hkwoo\workspace_v10\buck_F280025C\RELEASE\syscfg\buck\F28004x\Kit.json don't generated any more. May I know that reason.

    Thanks

    HK Woo

  • Hung Kai Woo1 said:
    However, I found that I removed Powersuite from main.syscfg and buck_settings.h to the directory. It is ok.



    PowerSUITE is essentially rooted in main.syscfg so you should not be using that GUI interface at all.  The project should be built using the native CCS tools.  You can find introductory CCS information in the CCS Online Documentation.

    Hung Kai Woo1 said:
    There is warning as I compile the file. CCS prompted "#10068-D no matching section". It was found that it is related to link file as below in red


    This is a broad message that could be caused by a number of issues.  Are you using SFRA calls in the example?  If not, it may be that the library is not being loaded because it is not used.  (reference: https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/584948

    For the most part, you should be able to continue development with this warning.  If it persists, you can start a new thread to pull in the right experts to resolve it.

    Hung Kai Woo1 said:
    The json file  C:\Users\hkwoo\workspace_v10\buck_F280025C\RELEASE\syscfg\buck\F28004x\Kit.json don't generated any more. May I know that reason.

    The JSON file is a PowerSUITE component so it will not be generated when using the nonpowerSUITE project.