L.R.A 78 Posted June 14, 2015 Share Posted June 14, 2015 Hi everyone,So I wonder if anyone ever had this problem and got around it.So I wanted to use a nokia 5510 LCD. So I remembered Rei Villo library that I used before with Energia.I had to of course change some energia specific functions but that wasn't my biggest problem.Well how the heck do you use C++ in TI compiler? I had to take off the class and worse than that I have to use c strings...Btw if anyone has good info on c string manipulation I would appreciate it Quote Link to post Share on other sites
roadrunner84 466 Posted June 15, 2015 Share Posted June 15, 2015 "good info in c string" is a bit vague, c strings are just arrays of characters, of which last one mush be a binary 0. The compiler does support C++, maybe you need to tell it to compile C++ by adding the "-std=c++" parameter to the compiler. Consider that most microcontrollers (in particular the msp430g2xxx series) are really constrained in capabilities (read: memory). Using dynamic memory (a.k.a. heap or free space) is killing for such applications, this also occurs when concatenating two C++ String objects! Quote Link to post Share on other sites
oPossum 1,083 Posted June 15, 2015 Share Posted June 15, 2015 Well how the heck do you use C++ in TI compiler? Just name the source file with a .cpp extension. Btw if anyone has good info on c string manipulation I would appreciate it Use the C standard library functions in string.h http://www.cplusplus.com/reference/cstring/ Quote Link to post Share on other sites
L.R.A 78 Posted June 16, 2015 Author Share Posted June 16, 2015 Thank you all for the answers. "good info in c string" is a bit vague, c strings are just arrays of characters, of which last one mush be a binary 0. The compiler does support C++, maybe you need to tell it to compile C++ by adding the "-std=c++" parameter to the compiler. Consider that most microcontrollers (in particular the msp430g2xxx series) are really constrained in capabilities (read: memory). Using dynamic memory (a.k.a. heap or free space) is killing for such applications, this also occurs when concatenating two C++ String objects! yep pretty vague, sorry about that I was basically asking info on C strings because I barely even use them (didn't even remembered sprintf or atoi).The MCU I'm gonna use the the Tiva and I don't intend to use in critical parts. Just to display some values.@@oPossum and @@roadrunner84, .cpp -> classes don't really work nor do strings in c++, So I don't know what's the problem...I didn't try the parameter for the compiler I should try it out later. Thank you! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.