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/CC1352P: How do you include systick.h in a code composer studio project?

Part Number: CC1352P

Tool/software: Code Composer Studio

I've read through the devicelib documentation, but no matter what local path I use I cannot get Code Composer to find systick.h. 

  • Hi Nick,

    Are you getting a compiler error that it cannot find systick.h? If so, please provide the compiler output in the build console.

    Thanks

    ki

  • This project is based on the rfPacketTx project. I added systick.h to my .c file:

    /*
     * Copyright (c) 2017, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */
    
    /***** Includes *****/
    /* Standard C Libraries */
    #include <stdlib.h>
    #include <unistd.h>
    
    /* TI Drivers */
    #include <ti/drivers/rf/RF.h>
    #include <ti/drivers/PIN.h>
    #include <ti/drivers/pin/PINCC26XX.h>
    
    /* Driverlib Header files */
    #include DeviceFamily_constructPath(driverlib/rf_prop_mailbox.h)
    
    /* Board Header files */
    #include "Board.h"
    #include "smartrf_settings/smartrf_settings.h"
    
    #include <systick.h>
    

    But when I try and compile I get the following error:

    **** Build of configuration Debug for project rfPacketTx_CC1352P1_LAUNCHXL_tirtos_gcc ****
    
    "C:\\ti\\ccs901\\ccs\\utils\\bin\\gmake" -k -j 8 all -O 
     
    Building file: "../rfPacketTx.c"
    Invoking: GNU Compiler
    "C:/ti/ccs901/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-m4 -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DDeviceFamily_CC13X2 -DCCFG_FORCE_VDDR_HH=0 -I"C:/projects/cc1352_mini_board/software/rfPacketTx_CC1352P1_LAUNCHXL_tirtos_gcc" -I"C:/ti/simplelink_cc13x2_sdk_2_30_00_45/source/ti/posix/gcc" -I"C:/ti/simplelink_cc13x2_sdk_2_30_00_45/kernel/tirtos/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/include/newlib-nano" -I"C:/ti/simplelink_cc13x2_sdk_2_30_00_45/kernel/tirtos/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/include" -I"C:/ti/ccs901/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/arm-none-eabi/include" -Og -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"rfPacketTx.d" -MT"rfPacketTx.o" -std=c99 @"C:/projects/cc1352_mini_board/software/tirtos_builds_CC1352P1_LAUNCHXL_release_gcc/Debug/configPkg/compiler.opt" -o"rfPacketTx.o" "../rfPacketTx.c"
    subdir_rules.mk:9: recipe for target 'rfPacketTx.o' failed
    ../rfPacketTx.c:50:10: fatal error: systick.h: No such file or directory
     #include <systick.h>
              ^~~~~~~~~~~
    compilation terminated.
    gmake: *** [rfPacketTx.o] Error 1
    gmake: Target 'all' not remade because of errors.
    
    **** Build Finished ****
    

  • You are missing the include search path to the header file location. Add it to the -l option in the project build properties under 'Build -> GNU Compiler -> Directories'

    Thanks

    ki