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-F28377S: 2837xD_rfft_adc_rt

Expert 1985 points

Part Number: LAUNCHXL-F28377S

Tool/software: Code Composer Studio

Hi,

I need an example of real time FFT from online ADC signal based on F28377S launchpad.

One of the examples is based on 2837xD processor:

controlSUITE—>libs—>dsp—>FPU—>v1_50—>exp.—>fft—>2837xD_rfft_adc_rt

But this example designed for F2837xD series. How do I change this example for the F28377S processor?

Thanks for your help and reply.

Best regards,

Amin

  • Hi Amin,

    In controlSUITE\device_support\F2837xS\v210\F2837xS_common\source and F2837xS_headers\source you should be able to find all the F2837xS versions of the .c files included in the project. You can use these to replace the F2837xD versions.

    You also should go into the project properties and change the compiler include options to point the the F2837xS include directories.

    There aren't any code changes that need to be made to the examples_setup.c and main.c files. They should be totally compatible as they are.

    Whitney

  • Hi Whitney,

    Thank you for your help. According to what you said I edit the project, but there are 2 errors:

    error: ".TI.ramfunc" section generated by __attribute__((ramfunc)) or
    --ramfunc=on requires a SECTIONS specification to function.
    warning: creating output section "RFFTdata2" without a SECTIONS specification
    warning: creating output section "RFFTdata3" without a SECTIONS specification
    warning: creating output section "RFFTdata1" without a SECTIONS specification
    warning: creating output section "RFFTdata4" without a SECTIONS specification
    warning: entry-point symbol other than "_c_int00" specified: "code_start"
    error: errors encountered during linking; "2837x_RFFT_ADC_RT.out" not built

    >> Compilation failure
    gmake: *** [2837x_RFFT_ADC_RT.out] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

    Best regards,
    Amin
  • Hi Amin,

    What .cmd file are you using? The original (F2837xD_FPU_RFFT_ADC_RT_lnk.cmd) or did you change it to one of the F2837xS_common/cmd files?

    If you are using the original, edit it so that it uses ".TI.ramfunc" instead of "ramfuncs" (you can look at the F2837xS_common/cmd files for an example).

    Whitney

  • Hi Whiteney,

    I use the original (F2837xD_FPU_RFFT_ADC_RT_lnk.cmd) file,
    "ramfuncs" changed to ".TI.ramfunc", but the error still exists.

    Amin
  • I'll attach the one I edited to make the example build. See if yours is different/if using mine instead works.

    //#############################################################################
    //
    // FILE:    F2837xD_FPU_RFFT_ADC_RT_lnk.cmd
    //
    // TITLE:   Linker Command File for FPU library examples that run
    //          on the 2837x platform
    //
    //          This file includes all RAM and FLASH blocks present on the
    //          2837x and depending on the active build configuration(RAM or FLASH)
    //          the appropriate sections will either be loaded into RAM or FLASH
    //          blocks
    //
    // Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
    // ALL RIGHTS RESERVED
    //#############################################################################
    // $TI Release: UNRELEASED $
    // $Release Date: $
    //#############################################################################
    // NOTES:
    // 1. In addition to this memory linker command file, add the header linker
    //    command file directly to the project. The header linker command file is
    //    required to link the peripheral structures to the proper locations within
    //    the memory map.
    //
    //    The header linker files are found in
    //    controlSUITE\device_support\F2837x(D/S)\<version>\F2837x(D/S)_headers\cmd
    //
    //    For BIOS applications add:      F2837x(D/S)_Headers_BIOS_cpuX.cmd
    //    For nonBIOS applications add:   F2837x(D/S)_Headers_nonBIOS_cpuX.cmd
    //
    // 2. On reset all RAMGSx blocks are under the mastership of CPU1. The user
    //     must configure the appropriate control registers to transfer mastership
    //     of a RAMGSx block over to CPU2
    //
    // 3. Memory blocks on F2837x are uniform (ie same physical memory) in both
    //    PAGE 0 and PAGE 1. That is the same memory region should not be defined
    //    for both PAGE 0 and PAGE 1. Doing so will result in corruption of program
    //    and/or data.
    //
    //    Contiguous SARAM memory blocks can be combined if required to create a
    //    larger memory block.
    //
    //#############################################################################
    
    // The following definitions will help to align the input buffer.For the complex FFT
    // of size N, the input buffer must be aligned to a 4N word boundary. For a real FFT
    // of size N, the input buffer must be aligned to a 2N word boundary. The user may define
    // the macro either in the linker command file, as shown here, or
    // through the project properties under,
    // C2000 Linker -> Advanced Options -> Command File Preprocessing -> --define
    --define RFFT_ALIGNMENT=1024
    #if !defined(RFFT_ALIGNMENT)
    #error define RFFT_ALIGNMENT under C2000 Linker -> Advanced Options -> Command File Preprocessing -> --define
    #endif
    
    MEMORY
    {
    PAGE 0 :
       /* BEGIN is used for the "boot to SARAM" bootloader mode   */
    #if defined(RAM)
       BEGIN           : origin = 0x000000, length = 0x000002
    #elif defined(FLASH)
       BEGIN           : origin = 0x080000, length = 0x000002
    #endif
       RAMM0           : origin = 0x000122, length = 0x0002DE
       RAMM1           : origin = 0x000400, length = 0x000400
    
       RAMD0		   : origin = 0x00B000, length = 0x000800
       RAMD1		   : origin = 0x00B800, length = 0x000800
    
       RAMLS0          : origin = 0x008000, length = 0x000800
       RAMLS1          : origin = 0x008800, length = 0x000800
       RAMLS2          : origin = 0x009000, length = 0x000800
    
       RAMGS0		   : origin = 0x00C000, length = 0x001000
       RAMGS1		   : origin = 0x00D000, length = 0x001000
       RAMGS2		   : origin = 0x00E000, length = 0x001000
       RAMGS3		   : origin = 0x00F000, length = 0x001000
    
       RESET           : origin = 0x3FFFC0, length = 0x000002
    
       FLASHA           : origin = 0x080002, length = 0x001FFE	/* on-chip Flash */
       FLASHC           : origin = 0x084000, length = 0x002000	/* on-chip Flash */
       FLASHD           : origin = 0x086000, length = 0x002000	/* on-chip Flash */
       FLASHE           : origin = 0x088000, length = 0x008000	/* on-chip Flash */
       FLASHF           : origin = 0x090000, length = 0x008000	/* on-chip Flash */
       FLASHG           : origin = 0x098000, length = 0x008000	/* on-chip Flash */
       FLASHH           : origin = 0x0A0000, length = 0x008000	/* on-chip Flash */
       FLASHI           : origin = 0x0A8000, length = 0x008000	/* on-chip Flash */
       FLASHJ           : origin = 0x0B0000, length = 0x008000	/* on-chip Flash */
       FLASHK           : origin = 0x0B8000, length = 0x002000	/* on-chip Flash */
       FLASHL           : origin = 0x0BA000, length = 0x002000	/* on-chip Flash */
       FLASHM           : origin = 0x0BC000, length = 0x002000	/* on-chip Flash */
       FLASHN           : origin = 0x0BE000, length = 0x002000	/* on-chip Flash */
    
    
    PAGE 1 :
       BOOT_RSVD       : origin = 0x000002, length = 0x000120     /* Part of M0, BOOT rom will use this for stack */
    
       RAMLS3          : origin = 0x009800, length = 0x000800
       RAMLS4          : origin = 0x00A000, length = 0x000800
       RAMLS5          : origin = 0x00A800, length = 0x000800
    
       RAMGS45		   : origin = 0x010000, length = 0x002000
       RAMGS67		   : origin = 0x012000, length = 0x002000
       RAMGS89		   : origin = 0x014000, length = 0x002000
       RAMGS1011	   : origin = 0x016000, length = 0x002000
    
       RAMGS12		   : origin = 0x018000, length = 0x001000
       RAMGS13		   : origin = 0x019000, length = 0x001000
       RAMGS14		   : origin = 0x01A000, length = 0x001000
       RAMGS15		   : origin = 0x01B000, length = 0x001000
    
       FLASHB          : origin = 0x082000, length = 0x002000	/* on-chip Flash */
    
    }
    
    SECTIONS
    {
       codestart        : > BEGIN,     PAGE = 0
    #if defined(RAM)
       .TI.ramfunc      : {} > RAMM0,     PAGE = 0
       .text            :>> RAMM1 | RAMD0 | RAMD1 | RAMLS0,  PAGE = 0
       .cinit           : > RAMLS1,    PAGE = 0
    
       .pinit           : > RAMLS1,    PAGE = 0
       .switch          : > RAMLS1,    PAGE = 0
       .econst          : > RAMLS4,    PAGE = 1
    #elif defined(FLASH)
       .TI.ramfunc      : {} LOAD = FLASHC,
                           RUN = RAMLS1,
                           RUN_START(_RamfuncsRunStart),
                           LOAD_START(_RamfuncsLoadStart),
                           LOAD_SIZE(_RamfuncsLoadSize),
                           PAGE = 0
    
       .text            : > FLASHN,    PAGE = 0
       .cinit           : > FLASHM,    PAGE = 0
    
       .pinit           : > FLASHM,    PAGE = 0
       .switch          : > FLASHM,    PAGE = 0
       .econst          : > FLASHB,    PAGE = 1
    #else
    #error Add either "RAM" or "FLASH" to C2000 Linker -> Advanced Options -> Command File Preprocessing -> --define
    #endif //RAM
    
       /* Test specific sections */
       RFFTdata1        : > RAMGS45,   PAGE = 1, ALIGN = RFFT_ALIGNMENT
       RFFTdata2        : > RAMGS67,   PAGE = 1
       RFFTdata3        : > RAMGS89,   PAGE = 1
       RFFTdata4        : > RAMGS1011, PAGE = 1
    
       FPUmathTables    : > RAMGS12,   PAGE = 1
    
       .reset           : > RESET,     PAGE = 0, TYPE = DSECT /* not used, */
    
       .cio             : > RAMLS3,    PAGE = 1
       .sysmem          : > RAMLS3,    PAGE = 1
    
       .stack           : > RAMLS4,    PAGE = 1
       .ebss            : > RAMLS5,    PAGE = 1
       .esysmem         : > RAMLS4,    PAGE = 1
    }
    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */
    
    

    If it doesn't work, can you tell me what Compiler version you are using?

    Whitney

  • It doesn't work,
    CCS version: 6.1.2.00015
    Compiler version: TI v17.3.0.STS
    Thanks.
    Amin
  • Amin,

    It's also strange that you're getting those "warning: creating output section "RFFTdatax" without a SECTIONS specification" warnings if you're using the original cmd file. Sometimes when you change devices in your CCS properties, it will automatically change your cmd file and exclude the original one. Can you make sure this didn't happen to you? Make sure the cmd file is NOT excluded from the build.


    Whitney

  • OK, but it doesn't work,
    image.png

    Amin
  • Your image didn't come through. Can you try sending it again?

    Whitney
  • Thanks. I think you need to remove 28377S_FLASH_lnk.cmd and 2837x_FLASH_lnk_cpu1.cmd from the project, and then right click on F2837xD_FPU_RFFT_ADC_RT_lnk.cmd and uncheck the box that says "Exclude from Build."

    Whitney
  • Whitney

    It works well. Thanks for your help.

    Amin