Fred 453 Posted January 28, 2016 Share Posted January 28, 2016 Glad you solved it, Sven. And sorry your thread got turned into a 3-way IDE battle on the way there. Quote Link to post Share on other sites
sven222 1 Posted January 28, 2016 Author Share Posted January 28, 2016 I think that was not a battle. That was a disussion about some IDEs. That is ok and I also did not get more stupid through it. Up to now I did not know, that Energia can go to LPM4 for example. Quote Link to post Share on other sites
yyrkoon 250 Posted January 28, 2016 Share Posted January 28, 2016 CCS for linux is realy a desaster. Nothing seems to be tested. The next thing is, that I am also not the biggest fan of eclipse, cause it is to heavy for an IDE. I prefer a silent computer and not a fan running on max speeb, only because I use a text editor. The enrgia editor is also not very comfortable. The toolchain of it is very comfortabel, so that is the easyest way to go. OK, discussion moved away from the original theme, but that was also solved. Thanks for all your help. Greetings Sven I found that CCS6 worked just as well on Linux as it does on Windows once it is properly installed. But there are too many oddities such as installing add ons when CCS is installed, or they will not work properly. Not all addons, just some, and for all I know only related to Sitara processors. One of the other things I do not like about CCS, is that it is somehow "owned" by a company, but the underlying software is open sourced. Being based on Eclipse and all of that . . . Much like you though Sven, I do not like "heavy editors". IN fact, I prefer to use an editor such as sublime text, and invoke gcc on my code from the command line. CCS, has some really cools features, that 99% of the time I'd never need, or use. But maybe it is worth having a virtual machine or something with CCS installed on it just for that 1% ? Quote Link to post Share on other sites
veryalive 49 Posted January 29, 2016 Share Posted January 29, 2016 @@sven222 Just coming back to your original request on 'lowest power possible'. You may want to be aware of setting Port 2 bits 6 and 7 to bit IO mode. After reset, they are set for supporting the 32KHz xtal. You can refer to the MSP430x2xx family guide, and the 2553 datasheet (Port IO page 53 ++) for the details. So, in your start up, execute this code: P2SEL = BIT7 + BIT6; // put bits 6 and 7 in IO mode. 2553 pins 18 and 19. This assumes: - you're using a 2553, probably on a LaunchPad (I ssume this as you mention only P1 and P2) - you are not using Energia (IDE as you described above) Cheers, Quote Link to post Share on other sites
sven222 1 Posted January 29, 2016 Author Share Posted January 29, 2016 One of the other things I do not like about CCS, is that it is somehow "owned" by a company, but the underlying software is open sourced. Being based on Eclipse and all of that . . . That is true. After all it is mostly a political/social decision to use gcc and other free software. The example code from the TI resource explorer supplied by TI also says often explicitly that you are not allowed to use this code in any project. WTF? Hello TI, that is not how you should treat your customers. I never understood the policy of any company, that you should pay for the development tools, if you use their hardware. So it is good, that TI supports the gcc development, but they still have a long way to go. Quote Link to post Share on other sites
sven222 1 Posted January 29, 2016 Author Share Posted January 29, 2016 @veryalive: Thanks for mentioning this. Even if I was not aware of this, I declared 2.6 and 2.7 at the beginning of my code as an output. After I got the information here, that I should declare all outputs, I did it this way: Declaring everything that is not an input as an output. And yes, you are right, I use a 2553, no energia. But the launchpad I only use to program the chip, the 2553 is on a single board, directly connected to a CR2032, a few switches as inputs and 4 outputs. Greetings Sven Quote Link to post Share on other sites
yyrkoon 250 Posted January 29, 2016 Share Posted January 29, 2016 That is true. After all it is mostly a political/social decision to use gcc and other free software. The example code from the TI resource explorer supplied by TI also says often explicitly that you are not allowed to use this code in any project. WTF? Hello TI, that is not how you should treat your customers. I never understood the policy of any company, that you should pay for the development tools, if you use their hardware. So it is good, that TI supports the gcc development, but they still have a long way to go. Well, it's not exactly mostly a political statement when using free software tools. For many, it is all about using something consistent, and familiar. Another thing to consider is "bloat". I think it is safe to say like many IDE's CCS is very bloated. Honestly, for me, it's not even a reasonable download size. With gcc however, on debian, you apt-get install build-essential and it pulls in many tools including gcc, g++, and I forget what else, but I think maybe Linux API header files, and much more. At under 30MB. As for TI charging for their IDE, I do not have much of a problem with that. Because they virtually give it away on deals often, or used to. And so much of the hobbyist development kits are supported on the IDE for free. However, the cost is rather exorbitant especially considering the IDE could stand to use a lot of work, and most of the IDE work was already done for them, and for free . . . Honestly. I think TI would be better off starting with something like code:blocks in nature. At an IDE based off that would be more responsive( e.g. not sluggish ), and less prone to errors that I often see in CCS. EDIT: After thinking about the "paying" part of CCS. I think TI would be better off developing plugins that can just be plugged in to eclipse. Then just charge for those. But if licensing is an issue with that. There are all manner of free really good fully feature editors out there right now. Visual Studio Code is one. Now most of these are geared towards web development, but there is no reason one of these could not be used for C/C++ development. And several have fairly feature rich plugin capability as well. As well as the all important dark theme potential. Quote Link to post Share on other sites
Fred 453 Posted January 30, 2016 Share Posted January 30, 2016 Earlier versions of CCS could be added to an existing Eclipse installation. Not the case now though. I agree it's not the slickest IDE bit worth it for the debugging and tools like EnergyTrace. Quote Link to post Share on other sites
veryalive 49 Posted January 30, 2016 Share Posted January 30, 2016 @@sven222 Hi again, In fact, I did notice that the ports were initialized in your code. In the spirit of helping you avoid some strange stuff I found out myself, here is a better explanation... The main point is that, AFTER RESET - P2SEL initial value is indeed 0xC0. See the 0x00 Family guide slau144, page 333, chapter 8.3, table 8.2. These must be changed to '00' for normal port IO. The default is so that the 2553 comes up working OK if a 32KHz xtal is installed. This means that even if you write to P2DIR and P2OUT, they will not do anything to P2.6 and P2.7 output port IO bits. This will do something else ! From the 2553 data sheet, Port schematics, pages 53 + ..... For P2DIR BIT6 set - P2.6 will become Timer0_A3 TA1. (assuming that P2SEL 6 is still at '1' ) And P2.7 will be XOUT. Just so you are aware..... tcheuss, Fmilburn and sven222 2 Quote Link to post Share on other sites
sven222 1 Posted January 30, 2016 Author Share Posted January 30, 2016 Now I understand! So I should do always after reset, at the beginning of my program, P1SEL &= 0x00 and P2SEL &= 0x00? Then everything should be declared correctly. Thanks and greetings Sven Quote Link to post Share on other sites
spirilis 1,265 Posted January 30, 2016 Share Posted January 30, 2016 for the G2553, even the 20-pin versions, don't forget about P3... set P3SEL and P3SEL2 to 0 and P3DIR to 0xFF, P3OUT to 0. It's not connected to any of the external pins but the port is there--and might cause some power consumption if left floating as inputs. The 28-pin TSSOP package of the G2553 has the P3 pins exposed (and probably the QFN variant). sven222, roadrunner84, Fmilburn and 1 other 4 Quote Link to post Share on other sites
spirilis 1,265 Posted January 30, 2016 Share Posted January 30, 2016 also doing &= 0 doesn't do anything at all... do you mean P1SEL = 0 (and P1SEL2 = 0, since the G2xxx series has the PxSEL and PxSEL2 registers)? Quote Link to post Share on other sites
sven222 1 Posted January 30, 2016 Author Share Posted January 30, 2016 I do not agree with you. The result on the bits is the same between &=0 end =0. So &=0 does definitely do something. With &= both bits have to be 1 for the result 1, so wit &=0 you set everything to zero. EDIT: I found another thing in one of ma former posts in this thread. This lines: P1DIR &= 0xFF; // Set P1.0 - P1.7 as output P2DIR &= 0xFF; // Set P2.0 - P2.7 as output They are useless and do nothing. They have to be replaced by: P1DIR = 0xFF; P2DIR = 0xFF; or P1DIR |= 0xFF; P2DIR |= 0xFF; Quote Link to post Share on other sites
spirilis 1,265 Posted January 30, 2016 Share Posted January 30, 2016 Ah right &=0 would clear all bits. Just an unnecessary extra & operation is all. Quote Link to post Share on other sites
yyrkoon 250 Posted January 30, 2016 Share Posted January 30, 2016 Earlier versions of CCS could be added to an existing Eclipse installation. Not the case now though. I agree it's not the slickest IDE bit worth it for the debugging and tools like EnergyTrace. Oh, I agree, there are some really "slick" features in CCS. But most of the time, they're not needed. So, you end up adding a lot of bloat, for things that may get used for less than 1% of a development cycle. Anyway, *that* is one reason why I personally prefer gcc type tools over fancy IDE's. But maybe an old system for dedicated CCS use wen needed ? I'd say a virtual machine, and it might be possible, but one might also have issues with external peripherals if needed. EDIT: Additionally, the virtual MCU feature in CCS, and I think one of the other IDEs, is a pretty awesome tool if one ever has use for it. Essentially though, giving one the ability to write code, debug it etc, all without having the physical hardware . . . 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.