Tool/software: Code Composer Studio
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.
Please do a rebuild of the project, save the complete build log to a text file (as described in this page) and attach the file here.
**** Build of configuration Debug__GNU for project n_dio **** "D:\\code composed\\ccs\\utils\\bin\\gmake" -k -j 8 all -O Building file: "../main.c" Invoking: GNU Compiler "D:/code composed/ccs/tools/compiler/msp430-gcc-8.3.1.25_win64/bin/msp430-elf-gcc-8.3.1.exe" -c -mmcu=msp430f2491 -mhwmult=16bit -I"D:/code composed/ccs/ccs_base/msp430/include_gcc" -I"C:/Users/Hero/workspace_v9/n_dio" -I"D:/code composed/ccs/tools/compiler/msp430-gcc-8.3.1.25_win64/msp430-elf/include" -Og -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"main.d" -MT"main.o" -o"main.o" "../main.c" subdir_rules.mk:9: recipe for target 'main.o' failed msp430-elf-gcc-8.3.1.exe: fatal error: switch 'composed/ccs/ccs_base/msp430/include_gcc/devices.csv' does not start with '-' compilation terminated. gmake: *** [main.o] Error 1 Building file: "../DIO_prog.c" Invoking: GNU Compiler "D:/code composed/ccs/tools/compiler/msp430-gcc-8.3.1.25_win64/bin/msp430-elf-gcc-8.3.1.exe" -c -mmcu=msp430f2491 -mhwmult=16bit -I"D:/code composed/ccs/ccs_base/msp430/include_gcc" -I"C:/Users/Hero/workspace_v9/n_dio" -I"D:/code composed/ccs/tools/compiler/msp430-gcc-8.3.1.25_win64/msp430-elf/include" -Og -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"DIO_prog.d" -MT"DIO_prog.o" -o"DIO_prog.o" "../DIO_prog.c" subdir_rules.mk:9: recipe for target 'DIO_prog.o' failed msp430-elf-gcc-8.3.1.exe: fatal error: switch 'composed/ccs/ccs_base/msp430/include_gcc/devices.csv' does not start with '-' compilation terminated. gmake: *** [DIO_prog.o] Error 1 gmake: Target 'all' not remade because of errors. **** Build Finished ****
It appears the compiler is tripping over the blank in the name "d:\code composed".
I suggest you rename that directory as something like "d:\code_composed".
Bruce's recommendation is valid. Please avoid whitespaces in workspace/project paths as well as paths were Code Composer Studio is installed.
**** Build of configuration Debug for project dio_t1 **** "D:\\code_composed\\ccs\\utils\\bin\\gmake" -k -j 8 all -O Building file: "../DIO_prog.c" Invoking: GNU Compiler "D:/code_composed/ccs/tools/compiler/msp430-gcc-8.3.1.25_win64/bin/msp430-elf-gcc-8.3.1.exe" -c -mmcu=msp430f2491 -mhwmult=16bit -I"D:/code_composed/ccs/ccs_base/msp430/include_gcc" -I"C:/Users/Hero/workspace_v9/dio_t1" -I"D:/code_composed/ccs/tools/compiler/msp430-gcc-8.3.1.25_win64/msp430-elf/include" -Og -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"DIO_prog.d" -MT"DIO_prog.o" -o"DIO_prog.o" "../DIO_prog.c" subdir_rules.mk:9: recipe for target 'DIO_prog.o' failed In file included from ../DIO_prog.c:7: ../types.h:10:44: error: expected ';' before 'void' typedef unsigned char u8 ^ ; In file included from ../DIO_prog.c:10: ../DIO_interface.h:29:18: error: unknown type name 'u8' void Set_BIT_DIR(u8 Port_NO, u8 BIT_NO,u8 Direction); ^~ ../DIO_interface.h:29:30: error: unknown type name 'u8' void Set_BIT_DIR(u8 Port_NO, u8 BIT_NO,u8 Direction); ^~ ../DIO_interface.h:29:40: error: unknown type name 'u8' void Set_BIT_DIR(u8 Port_NO, u8 BIT_NO,u8 Direction); ^~ ../DIO_interface.h:30:18: error: unknown type name 'u8' void Set_BIT_VAL(u8 Port_NO, u8 BIT_NO,u8 Value); ^~ ../DIO_interface.h:30:30: error: unknown type name 'u8' void Set_BIT_VAL(u8 Port_NO, u8 BIT_NO,u8 Value); ^~ ../DIO_interface.h:30:40: error: unknown type name 'u8' void Set_BIT_VAL(u8 Port_NO, u8 BIT_NO,u8 Value); ^~ ../DIO_interface.h:31:1: error: unknown type name 'u8' u8 GET_BIT_VAL(u8 Port_NO, u8 BIT_NO); ^~ ../DIO_interface.h:31:16: error: unknown type name 'u8' u8 GET_BIT_VAL(u8 Port_NO, u8 BIT_NO); ^~ ../DIO_interface.h:31:28: error: unknown type name 'u8' u8 GET_BIT_VAL(u8 Port_NO, u8 BIT_NO); ^~ ../DIO_interface.h:32:19: error: unknown type name 'u8' void SET_PORT_VAL(u8 Port_NO,u8 Value); ^~ ../DIO_interface.h:32:30: error: unknown type name 'u8' void SET_PORT_VAL(u8 Port_NO,u8 Value); ^~ ../DIO_interface.h:33:19: error: unknown type name 'u8' void SET_PORT_DIR(u8 Port_NO,u8 Direction); ^~ ../DIO_interface.h:33:30: error: unknown type name 'u8' void SET_PORT_DIR(u8 Port_NO,u8 Direction); ^~ ../DIO_interface.h:34:20: error: unknown type name 'u8' void GIVE_PORT_VAL(u8 Port_NO,u8 PORT_VAL); ^~ ../DIO_interface.h:34:31: error: unknown type name 'u8' void GIVE_PORT_VAL(u8 Port_NO,u8 PORT_VAL); ^~ ../DIO_prog.c:11:18: error: unknown type name 'u8' void Set_BIT_DIR(u8 Port_NO, u8 BIT_NO,u8 Direction) ^~ ../DIO_prog.c:11:30: error: unknown type name 'u8' void Set_BIT_DIR(u8 Port_NO, u8 BIT_NO,u8 Direction) ^~ ../DIO_prog.c:11:40: error: unknown type name 'u8' void Set_BIT_DIR(u8 Port_NO, u8 BIT_NO,u8 Direction) ^~ ../DIO_prog.c:45:18: error: unknown type name 'u8' void Set_BIT_VAL(u8 Port_NO, u8 BIT_NO,u8 Value) ^~ ../DIO_prog.c:45:30: error: unknown type name 'u8' void Set_BIT_VAL(u8 Port_NO, u8 BIT_NO,u8 Value) ^~ ../DIO_prog.c:45:40: error: unknown type name 'u8' void Set_BIT_VAL(u8 Port_NO, u8 BIT_NO,u8 Value) ^~ ../DIO_prog.c:75:1: error: unknown type name 'u8' u8 GET_BIT_VAL(u8 Port_NO, u8 BIT_NO) ^~ ../DIO_prog.c:75:16: error: unknown type name 'u8' u8 GET_BIT_VAL(u8 Port_NO, u8 BIT_NO) ^~ ../DIO_prog.c:75:28: error: unknown type name 'u8' u8 GET_BIT_VAL(u8 Port_NO, u8 BIT_NO) ^~ ../DIO_prog.c:92:18: error: unknown type name 'u8' void TOG_BIT_VAL(u8 Port_NO, u8 BIT_NO) ^~ ../DIO_prog.c:92:30: error: unknown type name 'u8' void TOG_BIT_VAL(u8 Port_NO, u8 BIT_NO) ^~ ../DIO_prog.c:107:19: error: unknown type name 'u8' void SET_PORT_VAL(u8 Port_NO,u8 Value) ^~ ../DIO_prog.c:107:30: error: unknown type name 'u8' void SET_PORT_VAL(u8 Port_NO,u8 Value) ^~ ../DIO_prog.c:141:19: error: unknown type name 'u8' void SET_PORT_DIR(u8 Port_NO,u8 Direction) ^~ ../DIO_prog.c:141:30: error: unknown type name 'u8' void SET_PORT_DIR(u8 Port_NO,u8 Direction) ^~ ../DIO_prog.c:175:20: error: unknown type name 'u8' void GIVE_PORT_VAL(u8 Port_NO,u8 PORT_VAL) ^~ ../DIO_prog.c:175:31: error: unknown type name 'u8' void GIVE_PORT_VAL(u8 Port_NO,u8 PORT_VAL) ^~ gmake: *** [DIO_prog.o] Error 1 Building file: "../main.c" Invoking: GNU Compiler "D:/code_composed/ccs/tools/compiler/msp430-gcc-8.3.1.25_win64/bin/msp430-elf-gcc-8.3.1.exe" -c -mmcu=msp430f2491 -mhwmult=16bit -I"D:/code_composed/ccs/ccs_base/msp430/include_gcc" -I"C:/Users/Hero/workspace_v9/dio_t1" -I"D:/code_composed/ccs/tools/compiler/msp430-gcc-8.3.1.25_win64/msp430-elf/include" -Og -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"main.d" -MT"main.o" -o"main.o" "../main.c" subdir_rules.mk:9: recipe for target 'main.o' failed In file included from ../main.c:3: ../types.h:10:44: error: expected ';' before 'void' typedef unsigned char u8 ^ ; In file included from ../main.c:4: ../DIO_interface.h:29:18: error: unknown type name 'u8' void Set_BIT_DIR(u8 Port_NO, u8 BIT_NO,u8 Direction); ^~ ../DIO_interface.h:29:30: error: unknown type name 'u8' void Set_BIT_DIR(u8 Port_NO, u8 BIT_NO,u8 Direction); ^~ ../DIO_interface.h:29:40: error: unknown type name 'u8' void Set_BIT_DIR(u8 Port_NO, u8 BIT_NO,u8 Direction); ^~ ../DIO_interface.h:30:18: error: unknown type name 'u8' void Set_BIT_VAL(u8 Port_NO, u8 BIT_NO,u8 Value); ^~ ../DIO_interface.h:30:30: error: unknown type name 'u8' void Set_BIT_VAL(u8 Port_NO, u8 BIT_NO,u8 Value); ^~ ../DIO_interface.h:30:40: error: unknown type name 'u8' void Set_BIT_VAL(u8 Port_NO, u8 BIT_NO,u8 Value); ^~ ../DIO_interface.h:31:1: error: unknown type name 'u8' u8 GET_BIT_VAL(u8 Port_NO, u8 BIT_NO); ^~ ../DIO_interface.h:31:16: error: unknown type name 'u8' u8 GET_BIT_VAL(u8 Port_NO, u8 BIT_NO); ^~ ../DIO_interface.h:31:28: error: unknown type name 'u8' u8 GET_BIT_VAL(u8 Port_NO, u8 BIT_NO); ^~ ../DIO_interface.h:32:19: error: unknown type name 'u8' void SET_PORT_VAL(u8 Port_NO,u8 Value); ^~ ../DIO_interface.h:32:30: error: unknown type name 'u8' void SET_PORT_VAL(u8 Port_NO,u8 Value); ^~ ../DIO_interface.h:33:19: error: unknown type name 'u8' void SET_PORT_DIR(u8 Port_NO,u8 Direction); ^~ ../DIO_interface.h:33:30: error: unknown type name 'u8' void SET_PORT_DIR(u8 Port_NO,u8 Direction); ^~ ../DIO_interface.h:34:20: error: unknown type name 'u8' void GIVE_PORT_VAL(u8 Port_NO,u8 PORT_VAL); ^~ ../DIO_interface.h:34:31: error: unknown type name 'u8' void GIVE_PORT_VAL(u8 Port_NO,u8 PORT_VAL); ^~ ../main.c:6:6: warning: return type of 'main' is not 'int' [-Wmain] void main (void) ^~~~ ../main.c: In function 'main': ../main.c:8:5: warning: implicit declaration of function 'Set_BIT_DIR' [-Wimplicit-function-declaration] Set_BIT_DIR(Port1, PIN0, INPUT); ^~~~~~~~~~~ ../main.c:10:5: warning: implicit declaration of function 'Set_BIT_VAL' [-Wimplicit-function-declaration] Set_BIT_VAL(Port1, PIN0, HIGH);//PULL UP ^~~~~~~~~~~ ../main.c:11:5: error: unknown type name 'u8' u8 statuse=0; ^~ ../main.c:14:12: warning: implicit declaration of function 'GET_BIT_VAL'; did you mean 'GETBIT'? [-Wimplicit-function-declaration] if(GET_BIT_VAL(Port1, PIN0)==HIGH) ^~~~~~~~~~~ GETBIT gmake: *** [main.o] Error 1 gmake: Target 'all' not remade because of errors. **** Build Finished ****
that solve this problem but there is another one when i try to define the (data`s modifier) as
#ifndef TYPES_H_
#define TYPES_H_
typedef unsigned char u8 /////////
#endif /* TYPES_H_ */
it give me (expected ";" before void which it nonm sense for me
Mohammed,
It appears your original error is resolved. The new compiler error looks to be a C coding/compiler error, and not something specific to CCS tools. Please take a closer look at the C source file and header files at the lines reported in the error to try to identify the root cause. If you are still unable to resolve and need further assistance please start a new post for that issue. Thanks.