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.

crazy, boring and useless CCS compiler and tools. C source code => CCS => random asm

Other Parts Discussed in Thread: MSP430FR5739, MSP430F5438A

Hi,

CSS v5.2.1.00018, compiler TI v4.1.2, seven x64, MSP430FR5739 on 4-layers EMI-proof board, USB-FET v1.4a, latest firmware.

I got ONLY problems with CCS:

1-F11 to enter debug mode take 4 (FOUR) minutes to executes (obviously waiting for a timeout)

2- 

void main(void)
{
unsigned long i, j;

init(); // Breakpoint here, disasm: "CALLA #0x00000" => I'm not going to be productive! But the compiler SOMETIME generate the right code when modifying other files (ie, add a blinking LED in a timer interrupt section modify the code generated in the main...but add another bug in another section)

...

}

3- 

void setSPIForTemp(void)
{
UCA0CTLW0 |= UCSWRST;
UCA0CTLW0 &= ~UCCKPH;     // generate "CALLA 0" :) but "UCA0CTLW0 &= 0x7FFF;" works fine!
UCA0CTLW0 &= ~UCSWRST;
}

4- USBFET: I sometime (one or two time per hour) got a "Security fuse has blown", the only workaround is to erase memory with FETPro430-Lite from elprotronic.

Bugs 1-2-4 appears/disappears in a infinite loop. So what's in CCS ? do(random_bugs();) while(devtools_are_from_TI) ? I wrote 3 lines of code today and 10 yesterday, I don't know if my HUGE code works...

I got similar problems (1-2-3) with some MSP430F5438A last year.

Lost 590$ today. May look for an alternative. I am NOT a beta-tester!

Should I wait for a TI employee for help? Should I go in holidays? Should I buy a STM? Should I buy a new guitar? Should I work straight through the night? Wait for next CCS release? Take to drink? For sure I rarely sleep!

Thank you for your help!

  • Nicolas Bouquet said:
    CSS v5.2.1.00018, compiler TI v4.1.2, seven x64, MSP430FR5739 on 4-layers EMI-proof board, USB-FET v1.4a, latest firmware.

    Some of ypur problems could be caused by the bug in the MSP430.dll described in this CCS5.3 Acting strange thread. I am still waiting for an offical fix from TI for the bug. However, in that thread I attached a MSP430.dll with a fix which you can try and see if it fixes any of your problems.

    While investigating the problem I too thought that the compiler was sometimes "randomlly" generating incorrect code, but then realised that the problem was in the MSP430.dll corrupting MSP430FR device memory.

  • Nicolas

    You sound frustrated, but reality is TI has good controllers but bad development tools.  I use FR5739 controller it works rather well, but I do hate the CCS.  So far I went through 20 FR5739 uC's they all worked pretty good but make sure you base the FET header to uC schematic on:

    http://www.ti.com/lit/pdf/slau278

    you have to make sure to connect properly if you use the FET power or you use and external power.  Also watch multiple ground voltage differentials that cause current flow, causes all kinds of problems.

    It took me a week to figure out how to compile and reliably run functions in CCS, not clean and simple at all.  Debugging does not work!  I can only debug using serial output via UART.  As   mentioned, there is a bug.

  • Thank you!

    @ Chester Gillon: With the new DLL a got : "Error initializing emulator: Could not initialize device interface"

    Silver Diamond : Yes I followed the shematic on p23 of the TI doc.


  • Nicolas Bouquet said:
    @ Chester Gillon: With the new DLL a got : "Error initializing emulator: Could not initialize device interface"

    I now see that you are using CCS 5.2, whereas the new DLL was tested with CCS 5.4. Could you try installing the latest CCS 5.4?

    Failing that I could check why the new DLL doesn't work with CCS 5.2 (EDIT: I mean that the DLL interface might have changed between CCS 5.2 and 5.4, so I might have to apply my fix to older version of the DLL to be compatible with CCS 5.2).

  • Chester Gillon said:
    Failing that I could check why the new DLL doesn't work with CCS 5.2

    I have tried the new DL with CCS 5.2.1.00018, and was able to download and debug using a MSP-FET430UIF. Therefore, dodn't know why your CCS 5.2 reported the "Error initializing emulator: Could not initialize device interface".

  • Hi,

    I installed the latest version of CCS and all is working fine, excepted a strange bug in a interrupt vector: all global variables modified in the interrupt routine return to their original values after the RETI instruction.

    Variables are declared just before the main as "volatile int foo". I have a "extern volatile int foo;" before the interrupt routine. Variables can be int, long, structures... Regardless the type of foo, all the operations done in the int routine are canceled just after the RETI instruction.

    Any idea?

    Thank you


  • Nicolas Bouquet said:
    all the operations done in the int routine are canceled just after the RETI instruction.

    Are you sure you didn't something wrong that makes the MSP reset when leaving the ISR - and therefore reset your variables too?

    Did you try single-stepping out of the ISR isntead of setting a breakpoint in main (which will be hit after a reset too and you won't notice)

  • I'm seeing I'm not the only one complaining about TI and especially his software...

    I have so many problems, I will never lose so much money to have a buggy software based on an freeware... everyday I have a different problem and I'm not productive... If I worked for myself I didn't care but I'm working for a company...

  • Pierre Augustin said:
    I have so many problems, I will never lose so much money to have a buggy software based on an freeware... everyday I have a different problem and I'm not productive... If I worked for myself I didn't care but I'm working for a company...

    You shall check msp430 development tools from IAR then. There's 30day evaluation version available.

  • I disabled the optimization and it's quite better : project properties / build / MSP430 Compiler :

    - opt level  = off

    - control speed... = 0

    Clean project and rebuild.

  • Pierre Augustin said:
    I will never lose so much money to have a buggy software based on an freeware...

    Sorry, but that#s nonsense. CCS uses eclipse as framework, but it isn't base don it. Compiler and debugger are 100% TIs own development.
    YOu could as well say "I don't pay for any Windows program because it is based on Windows and I already paid for Windows".

    Pierre Augustin said:
    everyday I have a different problem and I'm not productive.

    See it this way: If things were easy, you'd have many competitors for your job :)
    I understand your frustration. However, you're not the only one worldwide using CCS. Yet only a few have problems. And of those, many problems are because they didn't read the manual.(yes, RTFM is one of th emost frequent solutions for problems). So apparently, CCS cannot be that bad.

    Pierre Augustin said:
    If I worked for myself I didn't care but I'm working for a company...

    Actually, if I had to waste my spare time on bugs in commercial products, I would care - but when I'm paid for my work and hte tiem I waste on the tools I need for hte requested job, then this is part of the job and I don't care. even the time I need to explain the problems to my boss would be paid work :)

  • Ilmars said:
    You shall check msp430 development tools from IAR then. There's 30day evaluation version available.

    I can't use IAR, the code sizes 10kB now and may be bigger. I tried to install MSPGCC but without success :(

    Nicolas Bouquet said:
    I disabled the optimization and it's quite better : project properties / build / MSP430 Compiler :

    - opt level  = off

    - control speed... = 0

    Clean project and rebuild.

    Thank you, I will try this but I'm not sure it will fix my breakpoints problems but yesterday CCS was nice and was working as last friday ^^

    Jens-Michael Gross said:
    Sorry, but that#s nonsense. CCS uses eclipse as framework, but it isn't base don it. Compiler and debugger are 100% TIs own development.

    Yes I know, but I think it's not a display problem ;)

    Jens-Michael Gross said:
    See it this way: If things were easy, you'd have many competitors for your job :)
    I understand your frustration. However, you're not the only one worldwide using CCS. Yet only a few have problems. And of those, many problems are because they didn't read the manual.(yes, RTFM is one of th emost frequent solutions for problems). So apparently, CCS cannot be that bad.

    Haha, many people in the company thought the porting would be done in 3 months but in fact we had a lot of problems and obsolescences, many people didn't understand it's not as simple as LEGO, especially with a code wrote in 1996 lol

    Jens-Michael Gross said:
    Actually, if I had to waste my spare time on bugs in commercial products, I would care - but when I'm paid for my work and the time I waste on the tools I need for the requested job, then this is part of the job and I don't care. even the time I need to explain the problems to my boss would be paid work :)

    Yes it's true, I have so much projects in my head (some on MSP430) and so few spare time that I wouldn't be annoyed...

    Nice advice for my boss but I'm subcontractor and was hired to work on this project because nobody wanted to do it ^^

  • Nicolas Bouquet said:
    I disabled the optimization and it's quite better : project properties / build / MSP430 Compiler :
    - opt level  = off
    - control speed... = 0
    Clean project and rebuild.

    When disablignoptimization fixes a problem, then usually, your code is making some invalid assumptions and is only running coincidentally. There are very few cases where optimization breaks valid code.
    Of course, things like an empty for loop as delay is one thing where optimization may break the code. But then, since the CRT lib in Turbo Pascal, evenryone shoudl know that for loops are not a proper way for any timing.

    (for reference: the for loop to determine the CPU speed in said CRT lib caused a division by zero error on faster Pentum processors - causing all turbo-pascal programs to fail from a certain CPU speed on)

    Pierre Augustin said:
    Yes I know, but I think it's not a display problem ;)

    You said you don't want to pay much money for a buggy program that is derived from a freeware. However, you pay for the debugger and compiler, not for the freeware. And compilers are expensive. CCS isn't the most expensive one. By far.

    Pierre Augustin said:
    Haha, many people in the company thought the porting would be done in 3 months but in fact we had a lot of problems and obsolescences, many people didn't understand it's not as simple as LEGO, especially with a code wrote in 1996 lol

    Oh, my boss often comes with a screenshot painted by a 'designer' and tells me to implement something that it works and looks this way. I then often have real problems to convince him that some things are much easier drawn than implemented. Like giving someone some Lego pieces and telling him to mimick one of Escher's pictures.

    Pierre Augustin said:
    I'm subcontractor and was hired to work on this project because nobody wanted to do it ^^

    It's always a bad sign if nobody else wants to do the work :)
    As a rule-of-thumb: contract work is $1million divided by the number of people who are willing to do the job. (If it goes below a reasonable amount, I'm off.) :)

    Pierre Augustin said:
    Yes it's true, I have so much projects in my head (some on MSP430) and so few spare time

    I know this well. I actually have some spare time now (more than I wanted), but after my daily work in the office, I don't like to do another hardware/software related project, even if it is my own then.

    And there are so many projects I have in mind. Some of them even started and were put on hold after I got my current job quite some years ago. The only project I started since, was my MSP guide. And there was no progress on it for several months now.

  • Jens-Michael Gross said:
    Of course, things like an empty for loop as delay is one thing where optimization may break the code. But then, since the CRT lib in Turbo Pascal, evenryone shoudl know that for loops are not a proper way for any timing.

    That is doing the code I'm working on, a lot of loops and for delay, several delay functions (some were stricly identical) and almost are doing delay with 1 loop inside an other...

    It seems I have more problems with debugger than compiler (with compiler when I have an error the number line is not written).

    I understood why there were a lot of things that I didn't understand in the old code, there was an other way to program because there was no IDE  in 1996... I found some explanations here : http://www.ti.com/lit/ug/slas191a/slas191a.pdf

    Jens-Michael Gross said:
    And there are so many projects I have in mind. Some of them even started and were put on hold after I got my current job quite some years ago. The only project I started since, was my MSP guide. And there was no progress on it for several months now.

    It takes so much time to read a lot of information on several websites so we don't have enough time to do what we would like... :(

  • Pierre Augustin said:
    I understood why there were a lot of things that I didn't understand in the old code, there was an other way to program because there was no IDE  in 1996...

    Well, in '86 I used an IDE for Modula2. And few years later, there was Mystic Pascal with an IDE (and even a background compiler).
    In '92 I used the Borland C++ compile rwith IDE.

    But I agree, in these times, IDEs weren't as sophisticated as the ones available today. However, there have been good and bad coders all the time. Old code isn't necessarily good (or bad) code.

    Pierre Augustin said:
    It takes so much time to read a lot of information on several websites so we don't have enough time to do what we would like... :(

    Well, this wasn't my problem. But when I return from office after 8 hours of hardware and software development, I jus tdon't want to do any own projects.
    I'd rather spend my time with my girlfriend or my friends, or read a book/watch a movie.
    Well, now that she left me (after 16 years), I have some additional (to be true, way too much) spare time, so I likely will invest more time into the book.

  • Jens-Michael Gross said:
    Well, in '86 I used an IDE for Modula2. And few years later, there was Mystic Pascal with an IDE (and even a background compiler).

    In '92 I used the Borland C++ compile rwith IDE.

    But I agree, in these times, IDEs weren't as sophisticated as the ones available today. However, there have been good and bad coders all the time. Old code isn't necessarily good (or bad) code.

    Waow 1986 it should be like in movies ^^

    Well, this wasn't my problem. But when I return from office after 8 hours of hardware and software development, I jus tdon't want to do any own projects.
    I'd rather spend my time with my girlfriend or my friends, or read a book/watch a movie.
    Well, now that she left me (after 16 years), I have some additional (to be true, way too much) spare time, so I likely will invest more time into the book

    Yes I understand, I have the same problem, when my girlfriend is at my flat I can't do anything... ^^

    Hum so bad :(

  • Pierre Augustin said:
    Yes I understand, I have the same problem, when my girlfriend is at my flat I can't do anything... ^^

    Lucky you. When my ex-girlfriend is in my flat (she still has much of her stuff here, including her furniture), I'm best somewhere else. It's hard to watch her taking out her stuff. But of course I'll be better there, to ensure I won't return to empty rooms :)

    Pierre Augustin said:
    Waow 1986 it should be like in movies ^^

    Hint: don't comment inside a quote - the forum software won't credit it to the right author then :)
    Well, yes, I'm with computers for quite some time. I was already active in data networks when there was no real internet (and no WWW at all). However, these days, I step back from many of the new development. IMHO too much of it is going into the wrong direction, not making life easier or mroe interesting, but actually making it more stale, and producing lonely people.
    It was a real pleasure for me to meet one of the 'names' in this forum personally at Texas, earlier this year. You can't really drink a beer with someone who is on the other side of the world at the other end of a network cable. Like you cannot send a pizza through email.

  • But I agree, in these times, IDEs weren't as sophisticated as the ones available today. However, there have been good and bad coders all the time. Old code isn't necessarily good (or bad) code.

    I agree: CCS is written by bad coders.

    I am back from holidays and obviously I start to fight with CCS. An old bug is back today. 2 of my colleagues have a similar problem, independently to the CCS version, independently to the MSP430 used. We all use 4-layers EMI-proof boards.

    Typically:

    any_instruction; // foo = random initial value, let's say 60. Debuger say : foo=60
    
    foo = 42;          // after execution : foo = 42
    
    any_instruction_on_any_variable_exepted_foo; // after execution : foo = 60 !!! is it a display problem?JTAG?compiler? let's try something :
    
    if(foo == 60)
    
       while(1); // will NEVER go there : conclusion = display problem? haha, yes, and no!
    bar = foo;
    if(bar > 50)
     any_instruction; // ALWAYS go there!
    

    Definitely : TI = bad dev tools...
    Jens-Michael Gross : it is normal to spend some hours to understand how works a complex IDE. It is NOT normal to loose 50% of your time to fix a IDE bug, especially when you buy it.

  • 2 more examples:

    WTF...

  • Had this happen to me many times, very frustrating.  This means that the commercial product, the CCS, sold to customers does not work!  My only choice is to use UART to spit out the values I am trying to check.

  • Nicolas Bouquet said:
    it is normal to spend some hours to understand how works a complex IDE. It is NOT normal to loose 50% of your time to fix a IDE bug, especially when you buy it.

    Well, I spent many hours isolating bugs in the Adobe Flex builder.
    And I still lose much time regularly, when the compiler doesn't compile changed code due to some typo, but links the previously compiled code instead - without any error message.

    And M$'s visual C++ still gives me headaches to, regularly.

    About your problem, itwould be interesting to knwo hat binary code is produced by the compiler. Can't you output the generated assembly code? It is very useful to track down this kind of errors.
    (And often enough, it turned out that it was a coding error all the way, but nobody noticed some implication, while the compiler did)

**Attention** This is a public forum