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.
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.