Невозможно скомпилировать в eclipse / code composer studio - PullRequest
0 голосов
/ 27 сентября 2019

Я пытаюсь скомпилировать следующий код

#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <sysctl.h>
#include <sysctl.c>
#include <inc/hw_ints.h>
#include <tm4c1294ncpdt.h>

uint32_t i,CTA;

void main(void){
        SYSCTL_RCGCGPIO_R=0X1008;
        i=SYSCTL_RCGCGPIO_R;
        GPIO_PORTD_AHB_DIR_R=0X01;
        GPIO_PORTD_AHB_DEN_R=0X03;

        NVIC_EN0_R=0X08;
        GPIO_PORTD_AHB_IM_R  |=0X02;
        GPIO_PORTD_AHB_IS_R  =0X00;
        GPIO_PORTD_AHB_IEV_R |=0X02;
        GPIO_PORTD_AHB_ICR_R |=0X02;

        GPIO_PORTN_DIR_R  =0X03;
        GPIO_PORTN_DEN_R  =0X03;
        GPIO_PORTD_AHB_DATA_R  =0X00;

        while (1)
                    {
            CTA=0;
                    GPIO_PORTN_DATA_R  ^=0X01;
                        SysCtlDelay(2666666);
                    GPIO_PORTD_AHB_DATA_R  |=0X01;
                        SysCtlDelay(100);
                GPIO_PORTD_AHB_DATA_R  &=~0X01;
    }
}

int ECHO_ISR(void){
    while (((GPIO_PORTD_AHB_DATA_R & 0X02)== 0X02)& (CTA<0XFFF))
        {
            CTA++;
        }

        GPIO_PORTD_AHB_ICR_R |=0X02;
        return 0;
}

Это небольшой гидролокатор, использующий модуль HC-SR04, компоновщик кода показывает следующий вывод

 Compilation failure
subdir_rules.mk:7: recipe for target 'main.obj' failed
Command-line error #1965: cannot open source file "/home/user/ti/ccs831/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/include/"
1 catastrophic error detected in the compilation of "../main.c".
Compilation terminated.
gmake: *** [main.obj] Error 1
Command-line error #1965: cannot open source file "/home/user/ti/ccs831/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/include/"
1 catastrophic error detected in the compilation of "../tm4c1294ncpdt_startup_ccs.c".
Compilation terminated.
gmake: *** [tm4c1294ncpdt_startup_ccs.obj] Error 1
Building file: "../tm4c1294ncpdt_startup_ccs.c"
Invoking: ARM Compiler
"/home/user/ti/ccs831/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="/home/user/workspace_v8/5" --include_path="/home/user/ti/ccs831/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/include" --include_path="/home/user/ti/tivaware_c_series_2_1_4_178/inc" --include_path="/home/user/ti/tivaware_c_series_2_1_4_178" --include_path="/home/user/ti/tivaware_c_series_2_1_4_178/driverlib" --include_path="/home/user/ti/ccs831/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/bin" --include_path="/home/user/ti/ccs831/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/lib" --include_path="/home/user/ti/ccs831/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/include" --preinclude="/home/user/ti/ccs831/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/include/" --define=ccs="ccs" --define=PART_TM4C1294NCPDT -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="tm4c1294ncpdt_startup_ccs.d_raw"  "../tm4c1294ncpdt_startup_ccs.c"

>> Compilation failure
subdir_rules.mk:7: recipe for target 'tm4c1294ncpdt_startup_ccs.obj' failed
gmake: Target 'all' not remade because of errors.

**** Build Finished ****

enter image description here Показывает ошибку 1, но не более подробностей.Включает в себя / inc и / driverlib, кроме системы, добавленной отдельно.Он говорит, что не может открыть /home/user/ti/ccs831/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/include/, но он уже добавлен в проект

Обновление
После удаления преинклюзии теперь выдается больше ошибок enter image description here

1 Ответ

2 голосов
/ 27 сентября 2019

Удалить "/home/user/ti/ccs831/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/include/" enter image description here из прединклюзивного раздела

...