Hi, my problem is when I create a new project in CCE. I want to use any function of simpliciTI but appear a problem in probles tab when build the project.The error is #error "Failed to match a default include file" and my little program is#include <msp430x22x4.h>#include <bsp.h>void main(void){ BSP_Init(); while(1){} }Of course all the includes files are include in the project, in fact CCE reconize the BSP_Init() function when try to write it with auto complete tool. I'm thinking in a bad configuration, but I don't know where is it the problem (This is my first time with CCE and eclipse enviroment)Can anybody help me???Thank you so much.
Have you made sure that the include search path has the path to these files?
It's under nder Project, Build Options, Compiler tab, Preprocessor category.
Scott
Scott, I have all include path into properties for projetc ->C/C++Build->tool setting tab. Into MSP430 Compiler v3.1-> General option:
Where say : Add dir to #include search path (--include_path). I added all path of simpliciTI includes, they are:
C:\Texas Instruments\SimpliciTI-CCE-1.1.0\Components\bsp
C:\Texas Instruments\SimpliciTI-CCE-1.1.0\Components\bsp\boards\EZ430RF
C:\Texas Instruments\SimpliciTI-CCE-1.1.0\Components\bsp\drivers
C:\Texas Instruments\SimpliciTI-CCE-1.1.0\Components\mrfi
C:\Texas Instruments\SimpliciTI-CCE-1.1.0\Components\simpliciti\nwk
C:\Texas Instruments\SimpliciTI-CCE-1.1.0\Components\simpliciti\nwk_applications
I was compearing with simple_peer_to_peer example and in the same location these includes are add with other path like this
"${PROJECT_ROOT}/../../../../../../Components/bsp"
But in this project besides, the includes files are add to project in Components folder. Do I need to add these files in the same way like the example?
Thank you.
Take a look at the lab steps in http://tiexpressdsp.com/images/9/97/05_-_SimpliciTI.pdf starting on page 43. The labs themselves are available on http://tiexpressdsp.com/index.php?title=Low_Power_RF_Solutions#Workshop_Contents under Running the labs, if you like. This should step you through everything you need to get things running (with the exception that this code uses IAR, which should be an easy alteration).
Sorry Scott, but I continue with the problems in CCE. I tried adding file to project en a new folder but it is the same.If I comment the lines#include <bsp.h>BSP_Init();the project compiles perfectly. The problem, I mean, is when simplisiTI's folders are including in my project. I downloaded simpliciTI 1.1.0 for CCE and IAR. What is wrong?? It should work fine...Thank youMatias
Let me re-state your problem ...
You have a piece of sample code from SimpliciTI 1.1.0 and it compiles and runs fine.
You add a file to the project and it doesn't compile.
You comment out #include <bsp.h> and BSP_Init(); from this code and it compliles fine.
Is that correct?
I have an example code and it work fine, yes. But when I want to create a new project following step by step it doesn't work. Then appears the error that we are talking about#error "Failed to match a default include file"
But if I comment the lines <bsp.h> and BSP_Init(); the code on first post compiles fine.Can you understand me?
So, you are not modifying an exisitng file, but rather attempting to create a SImpliciTI project from a blank page. It would be a better idea at this point to modify an existing project. That way you can be assured that all the include paths are correctly set. This is almost certainly your problem.
Otherwise, I would suggest that you very carefully follow the steps in Lab5c that show the steps to create a SimpliciTI project from scratch. The steps will be slightly different than for CCE, but it should be very close.
Whenever you see #error in the error list, you can almost be sure that somewhere in the code, there is a list of conditional preprocessor directives ending with #error "This is the error message." This particular error is caused by msp430.h, which is included in bsp_msp430_defs.h. The purpose of msp430.h is to automagically include msp430x22x4.h for you, and it's whining because it does not see the compiler switch __MSP430F2274__ defined. If you fix this problem by defining __MSP430F2274__ right before the #include msp430.h statement in bsp_msp430_defs.h, you'll likely get new errors about your radio being undefined. Those errors are caused by mfri_defs.h. IAR must create all the defined constants automatically or with project settings - don't know because I don't use IAR.
But for Code Composer, my solution:
1) Create a new header file called config.h.
2) Put this into it:
/*------------------------------------------------------------------------------ * CONSTANTS * ---------------------------------------------------------------------------*/#define MRFI_CC2500#define __MSP430F2274__/*------------------------------------------------------------------------------ * INCLUDES * ---------------------------------------------------------------------------*/#include "smpl_config.h"#include "smpl_nwk_config.h"
3) Put the statement #include "config.h" at the very tippy top of the bsp.h includes section, before all other includes:
/* ------------------------------------------------------------------------------------------------ * Includes * ------------------------------------------------------------------------------------------------ */#include "config.h" // added by CJG for Code Composer Compatibility#include "bsp_board_defs.h"#include "bsp_macros.h"
My project compiled error free after that. Don't know if it works yet, but at least it's passing compile stage...
BTW, if you get any errors that look like "Can't include header file" or "Can't find header file," then that is likely caused by you missing an include path in your project options. Or, because the file simply doesn't exist.
ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". TI AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY TI. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM TI.
Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.