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.
Part Number: MSP-EXP432P401R
Tool/software: Code Composer Studio
Hi folks, I have been trying to load the BitSet header and related headers into CCS to no avail. I get a plethora of errors from all the headers/c files that BitSet calls. I have tried installing all the headers into the work space and via full paths using all the locations that BitSet is listed within the TI CCS space. I tried to find a sample program in the Resource Explorer to no avail.
Does anyone have experience in using Bitset and how CCS should be configured to acquire and resolve the headers.
Is your source file that is containing bitset ending with .cpp?
I compiled this quick minimal example and it compiled fine but only after I used the .cpp extension.
/* Example 01: Bitset
Explains the usage std::bitset
using namespace std;
WDT_A->CTL = WDT_A_CTL_PW | WDT_A_CTL_HOLD; // stop watchdog timer
//Constuct 01: 8 bits initialized to zero
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Franklin Cooper:
In reply to Roger Rose:
Try importing this project via CCS Import -> C/C++ -> CCS Projects. I see the issue you are having but didn't experience this problem when using CCS Cloud. So I downloaded my test project from CCS Cloud and imported into CCS and it works fine. So I would have to dig in to understand what the difference is but hopefully by using this project you will be unblocked for now.
Something quite odd is happening. I copied these steps ...
Roger RoseI tried the above example by creating a new CCS project and then copied the code above into that main() and renamed to cpp.
It builds fine for me.
Please package up your problem project as described in the article Project Sharing, then attach the resulting zip file to your next post.
Thanks and regards,
TI C/C++ Compiler Forum ModeratorPlease click This Resolved My Issue on the best reply to your questionThe CCS Youtube Channel has short how-to videosThe Compiler Wiki answers most common questionsTrack an issue with SDOWP. Enter your bug id in the Search box.
In reply to George Mock:
Attached is a sample project. Basically I created this via CCS using File -> Project -> CCS Project. Select target to MSP432P4111. I use the above code that I showed and change main.c to main.cpp. What is weird is that using the CCS Cloud project works but a project created from CCS isn't working.
Thank you for submitting your project. When I build it, I only see these two compiler diagnostics ...
"../main.cpp", line 10: error #20: identifier "bitset" is undefined
"../main.cpp", line 10: error #20: identifier "bitset1" is undefined
That is because line 10 is ...
The type bitset is not in the global namespace, but the std namespace. There is no using directive which brings in the std namespace. When I change that line to ...
... it builds clean. For a discussion of this solution compared to a using directive, please see this FAQ (not from TI).
Roger Rose"../main.cpp", line 10: error #20: identifier "bitset" is undefined "../main.cpp", line 10: error #20: identifier "bitset1" is undefined 2 errors detected in the compilation of "../main.cpp".
... looks like the exact same error I discuss in my previous post. If the fix in that post does not address this situation, then I'm stumped. And the only way forward is for you to somehow send us a test case which allows us to experience the same problem for the same reason.
Did you resolve your problem? If so, I'd appreciate hearing how you resolved it.
Hi George, I did resolve the issue but I do not know how I resolved it :-)
As I mentioned earlier, I had loaded CCS onto two work computers and tested 'bitset' with positive results. And, as I had mentioned I could not get it to work on my computer at home. I proceeded to copy all the settings on one of the computers at work into a word doc (using snippet) so that I could see if there was something different between the installs. There were no differences - which made it even more perplexing. I reinstalled on my computer at home and tried four times using the different ways of creating a new project. Starting a project from the 'project' tab did not work but starting the project from the 'file, new project' tab did work. So, at this point I have it working but have no clue as to why it does not when opening a new project (blank or with main.c) from the projects tab but seems to work from the 'File, New Projects'.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content 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. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. 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.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.