Exploring the MSP430F5529 - CCS Advice and Checking the Logic - Page 1
Forum section: electronics / general

author: Rigel
author_rank: Contributor
timestamp: October 03, 2020, 03:08:17 am
content: For a bit of background I am retaking a microcontroller class - The first time I took the class we were using a AxiomHC11EVBU featuring the Motorola 68HC11. Now we are using the TI MSP430f5529LP.I spent a lot of time writing assembly code using BUFFALO - Now we are using Code Composer Studio (CCS). I have to say I am not a huge fan of CCS, I am not 100 percent sure why. It works but it is not a great experience. Please feel free to comment with any CCS tips, tricks or general advice.I am more of a hands on learner than a book learner. I appreciated being able to monitor the 16 Bit Bus on the Axiom - I notice the pinouts available are fewer on the LP. I have not used any SPI or any other serial bus to take a look at what's going on inside - Not even sure what I can send to the bus to monitor.I have a Rigol 5074 Scope with LA probe - I have some questions about it that I will post in the beginners or Test Equipment forums. I had a Agilent dsox 1000 back 5 or 6 years ago but I sold it when I got ill. I was looking at a getting a new Keysight scope - but stock availability and price influenced my choice in scope - I needed something right now. I figured if it did not meet expectations I could always return it when a new scope arrived. I have been pleasantly surprised by the Rigol. I still want/need to pick up a couple other pieces of lab gear but again I can discuss that elsewhere.I just wanted to say what a great community and resource I found on the EEVblog forums. Thanks everyone!***EditI was going to say if you have an alternative to CCS I would love to hear about that as well.

author: techman-001
author_rank: Frequent Contributor
timestamp: October 03, 2020, 04:08:05 am
content: Quote from: Rigel on October 03, 2020, 03:08:17 amMy first love was the 6802, and later the HC11. the 6800 ISA was as smooth as silk and a pleasure to write assembly code for.As you were a Buffalo monitor and debugger user have you considered a Free Open Source Forth ?(I realize your class is using CCS, a commercial pay for IDE, but if you don't like Forth, your 'next' post is only a button click away ;-)Forth offers you an interactive real time interface, inline assembly and of course a low to high level Forth programming language.https://sourceforge.net/projects/mecrisp/https://sourceforge.net/projects/mecrisp/files/mecrisp-2.0.6a.tar.gzMecrisp runs on the following chips out of the box, including your MSP430f5529:QuoteIf you want to explore bleeding edge, there is even a Mecrisp-Across "tethered Forth" which offer the same advantages as the C programming language, PLUS interactivity for the MSP430.https://mecrisp-across-folkdoc.sourceforge.io/intro.html

author: Rigel
author_rank: Contributor
timestamp: October 03, 2020, 04:40:53 am
content: Quote from: techman-001 on October 03, 2020, 04:08:05 amThanks techman-001!Heh I am still knocking the rust off so to speak! It will take me a bit to look some of that up. I have not heard of Forth. Will give it a look see.They made CCS free a couple version ago from what I have read. I did a download and install right from TI.Thanks again for the reply.

author: westfw
author_rank: Super Contributor
timestamp: October 03, 2020, 06:37:49 am
content: QuoteQuoteCCS is a large and complex modern IDE (I think it's Eclipse, these days?)Its advantages are unlikely to be apparent if you're writing small assembly language programs, and its disadvantages are likely to stick out like a sore thumb. (particularly with respect to speed?) Also, it's more designed for High Level Languages, both in the source-code generation and debugging aspects. I haven't used it recently, but trying to write and debug assembly language with other "modern IDEs" is something that I've found to be similarly "not a great experience."It's probably "good for you", though. AFAICT, CCS is a fairly generic example of a "modern IDE", and Eclipse with other configuration is widely used in industry for everything from microcontrollers to phones to desktops. CCS/Eclipse experience should be much better for your career than a highly obsolete thing like Buffalo (unless your interviewer has nostalgic feelings about 6811. As you've already seen, some do!)QuoteWell, the TI chip is a microcontroller, while the 68hc11 was a microprocessor. That means that all the "somewhat interesting" things like the memory bus are hidden deep inside the chip, rather than showing up on pins that you can throw LEDs onto and watch. In theory, the TI also has much better debugging technology that makes up for this (and special debugger support on the launchpad, but it's certainly not as "visceral" as looking at the actual signal lines with nothing but electronics. :-(QuoteNope. But you should be able to look at the PC and/or index registers with the debugger, while singlestepping. And probably set it up to dump that to your PC's screen automatically.

author: Rigel
author_rank: Contributor
timestamp: October 03, 2020, 07:21:10 am
content: Thanks Westfw,I was a lot more comfortable in Assembly than in C. Part of the reason I am retaking the course (improving my C). I know there are plug-ins or things you can purchase for eclipse (really do not know much about that so I mostly stayed away. I just found where I could dark theme and my eyes thank me!. I was more thinking logic analyzer on the pins than LED'sbut same principal! I do have to say I like the increased ability to monitor multiple areas and have windows open on multiple monitors- I can monitor Variables - Memory locations registers etc all at the same time.I also like having 12 Registers that is very handy. And the cost. I never blew out a port or a module in class but I had classmates who did. At $20 a board I bought a couple spares. where as The Motorola was about 170 a board towards the end and getting ahold of them was getting more and more difficult.Also TI has done a great job of including code and diagrams within CCS that are custom for the boards - you want to write a program using the ADC they have simple programs that will teach you what you need to know.thanks for the advice!

author: westfw
author_rank: Super Contributor
timestamp: October 03, 2020, 08:30:16 am
content: I think the MSP430 is probably a good "teaching" microcontroller.A much more straight-forward instruction set than a modern ARM Cortex M chip, with direct implementation of the sorts of "addressing modes" that correspond to HLL usage.A logic analyzer connected to it's pins won't show anything that your program doesn't explicitly make the pins do :-((Note that this IS a useful debugging technique for certain situations where the delays introduced by halting the CPU for a debugger to look at it, or even doing "print" commands, would interfere too much with the timing of the program... You blast out values to the pins, and have a logic analyzer record the whole sequence, so you can see essentially a whole "trace" of what went on.)This is really old (from when TI first introduced flash MSP430s! Um: 2000 !), but it might contain a few useful tidbits:https://www.oocities.org/westfw/trip-report-msp430.txt

author: todorp
author_rank: Regular Contributor
timestamp: October 03, 2020, 10:49:16 am
content: The IAR Embedded Workbench IDE supports MSP430 micros. I find it much better than CCS. There is only one drawback: the free version has a limit on the code size.

author: rsjsouza
author_rank: Super Contributor
timestamp: October 03, 2020, 12:00:26 pm
content: Just adding to the excellent comments from westfw, the complexity of the CCS is tailored towards C and C++ based projects, and the editor and source code navigation really shines in comparison to IAR. The things I use the most are call hierarchy, open definition of functions/variables, compare files, code shadowing (for ifdef), code Outline, etc.One other advantage that came several versions ago is the integration of example code. The Resource Explorer is a browser that peruses their SDKs and allows installing, browsing source code and importing it to the workspace. Of course, once you get the project going it loses its functionality a bit. Specifically for MSP430, I think they still have assembly examples there.What IAR has as a strength is the overall debugging speed for single core devices like the MSP430, which in CCS can be frustratingly slow at times.A few versions ago it has become available a much better Help Documentation that can help learning its complexities - something that was missing since CCSv3.3.Just like any other product out there, there's also a large number of 1 minute short videos on Youtube that show a few capabilities here and there.