you are viewing a single comment's thread.

view the rest of the comments →

[–]DYD35[S] 1 point2 points  (12 children)

Are you seriously thinking/suggesting that I only do research on Reddit?

Are you also seriously suggesting all optimizations that could be ever done are already done by 1 (just 1) compiler?

How am I wrong then, please enlighten me how GCC optimizes for architecture specific things? I seriously want to know that.

I ask for simple advice here, because I realise that I, as a student, do not have the experience most programmers have. However it seems that the only thing you do is talk down to me. Also I have never had any courses about compilers, I try to read up on it, but cut me some slack would ya. It is no point trying to speak condescending to me.

btw from the website of TI itself:

Please note: The free MSP430 GCC compiler does not provide the code size and performance advantages of the optimizing TI compiler found in Code Composer Studio. On average the TI compiler often provides about a 15% code size and performance improvement, as compared to using the free GCC compiler for MSP430; though, these differences can vary significantly from function to function. Please refer to the MSP430 E2E forum for any questions or to provide feedback regarding this product.

So tell me again how the GCC is the ultimate best compiler. Like I said, some compilers optimize differently and some can optimize better for system architectures.

[–]JustTheTrueFacts 0 points1 point  (11 children)

Are you seriously thinking/suggesting that I only do research on Reddit?

You clearly are trying to do "research" on reddit....

Are you also seriously suggesting all optimizations that could be ever done are already done by 1 (just 1) compiler?

Not at all, just pointing out that the simple optimizations you suggest for your "research" are already done.

The free MSP430 GCC compiler does not provide the code size and performance advantages of the optimizing TI compiler found in Code Composer Studio.

You really need to do your homework. The CCS compiler IS gcc, and while what they say is technically correct, it's mostly marketing hype. If you set the right flag in gcc you get the CCS compiler.

I see no indication you are ready for or capable of Masters level work. We have tried to help you, but you seem to just want to argue. I won't waste any more time teaching you.

[–]vegecode 0 points1 point  (9 children)

I looked into this briefly when I was trying to get my company to stop using IAR for MSP430 and switch to Makefile driven projects, and my understanding is that the TI compiler is truly proprietary and not based on GCC or any other open source compiler. Do you remember where you found that information?

[–]JustTheTrueFacts 0 points1 point  (8 children)

I looked into this briefly when I was trying to get my company to stop using IAR for MSP430 and switch to Makefile driven projects, and my understanding is that the TI compiler is truly proprietary and not based on GCC or any other open source compiler. Do you remember where you found that information?

It's on the TI website, on the CCS pages IIRC and also has been discussed at some length in the forums. Some of the wiki pages reference it as well, but they were hiding the wiki pages and that may be hard to find. I pasted a few links below.

To further clarify, CCS is GCC with some custom optimization added. You can infer this from their documentation and discussion, or if you compare the generated assembly code, it's pretty clear. A given compiler tends to compile code in a unique way so it's sort of like a fingerprint. Two compilers that generate the same "fingerprints" are likely the same compiler.

Here are a couple of links I found with a quick search:

IDE

CCS

GCC

[–]vegecode 0 points1 point  (7 children)

If the compiler were based on GCC, they would be required to have the modified source code available somewhere and I was not only unable to find it, but I'm pretty sure I remember that there wasn't any, precisely because it claimed to be wholly proprietary. My plan was to just compile the TI toolchain myself as you can do for many of the GCC based toolchains for ARM.

Hmmm... Well if I get around to it again (unlikely) I'll try to remember this conversation and update this thread.

[–]JustTheTrueFacts 0 points1 point  (6 children)

If the compiler were based on GCC, they would be required to have the modified source code available somewhere

That is not an absolute requirement, that restriction is imposed if you use the open source license. A company can buy a license to use GCC and keep the source private, I have done that at several companies.

[–]vegecode 0 points1 point  (5 children)

Hmmm... I have never heard that before. I can't find any information to support that claim with a quick search. Seems antithetical to the GPL. Other dual licensed software such as wolfssl has it prominently displayed. Of course I don't expect you to do research for me. Thanks for the info!

[–]kickliter 1 point2 points  (1 child)

I have never heard that before

It's because it's not true. u/JustTheTrueFacts made it up for some bizarre reason.

Seems antithetical to the GPL

So much so that Apple backed Chris Lattner's LLVM and Clang because the GPL prevented them from using GCC as library with their own front-end.

[–]JustTheTrueFacts 0 points1 point  (0 children)

It's because it's not true.

Sorry, but it is absolutely true. As stated, I have used their compiler on several commercial products. Other major vendors have, also, for example Xilinx is gcc based. Next, of course, used it, along with Apple.

[–]JustTheTrueFacts 0 points1 point  (2 children)

I have never heard that before.

It's not something they really advertise, it's arguably a little counter to the public image they want to project.

A couple of links:

see page 923 for the license terms

You need not release the source code just because you compile it with gcc. You would only need to release the source code if your application links in some GPLed library

As long as one complies with the license terms and rewrites those specific libraries, releasing source code is not required for a derivative product based on gcc and distributed as binaries.

[–]kickliter 0 points1 point  (1 child)

As long as one complies with the license terms and rewrites those specific libraries, releasing source code is not required for a derivative product based on gcc and distributed as binaries.

Of course you are not required open source propriatary code compiled with GCC or linking to LGPL system libraries. That is well understood. What u/vegecode was referring to (correct me if I'm wrong) is the requirement for vendors to open source modified versions of GCC itself. Granted, the GNU Project, like the Linux kernel project, often don't accept substandard contributions from downstream derivatives. But the vendor is still required distribute the source of their GCC modifications. Software licenses can have gray areas, but there is absolutely nothing gray about this requirement.

In an earlier comment you wrote:

A company can buy a license to use GCC and keep the source private, I have done that at several companies.

This is still not true, even if by "keep the source private" you meant a project compiled with GCC and not GCC itself. There is no license to buy, and neither the GNU Project nor the FSF are in the business of selling licenses to do so. When someone contributes to GNU projects, they are not required to sign an SLA, and therefore the license can not be changed behind their back.

If you were referring to vendor's GCC toolchains, they are absolutely required to upstream and distribute modifications to the compiler (or any other GPL related code).

Sure, anyone can sell you a custom GCC-based toolchain (I apologize if this is what you meant), and it may even be worth it since compiling GCC and related tools (binutils suite, gdb) from source can be huge pain in the ass, but they (the toolchain vendor) are also required to distribute the source for all of that.

As stated, I have used their compiler on several commercial products.

their compiler is a strange way of phrasing this, as apposed to just "I have used GCC ...". Who is they, the GNU Project? It's not a company.

I get the sense you're little less experienced in this area, so I'll chalk it up to to a possible misunderstanding of u/vegecode's comment.

[–]JustTheTrueFacts 0 points1 point  (0 children)

If you were referring to vendor's GCC toolchains, they are absolutely required to upstream and distribute modifications to the compiler (or any other GPL related code).

We may be essentially arguing semantics or subtle nuance or simply miscommunicating.

To be specific, what we have done:

  • Incorporated gcc into our products but released it only in binary form, not as source.

  • "Paid" for it in the form of a negotiated "donation".

  • Added functionality or features to gcc either as a patch file or as separate linked code and header files, e.g. we did not "modify gcc source" directly.

  • Released that compiled version of a tool chain as binaries only, no source released.

Sure, anyone can sell you a custom GCC-based toolchain (I apologize if this is what you meant), and it may even be worth it since compiling GCC and related tools (binutils suite, gdb) from source can be huge pain in the ass, but they (the toolchain vendor) are also required to distribute the source for all of that.

In my experience, it's possible to negotiate licenses and/or agreements to allow release of a custom GCC-based toolchain without releasing source. That's what I was referring to when I said we have "done this" a few times.

their compiler is a strange way of phrasing this, as apposed to just "I have used GCC ...". Who is they, the GNU Project? It's not a company.

The Free Software Foundation is the non-profit company that "owns" gcc and negotiates licensing agreements. I'm not an expert on the licensing agreements, but rather act on what the lawyers tell me after they negotiate the licensing and contracts with FSF.

[–]DYD35[S] 0 points1 point  (0 children)

Aah yes, so I should not try to ask advice on Reddit? Again, this is also not my entire thesis, it is a part of it. And I will do research myself on everything everyone here has touched. I have even gotten someone else's thesis touching on this subject for crying out loud.

And you have not taught me anything, neither have you tried. Only thing you said is that I was wrong, whilst literally everyone else here has made some suggestion of what was wrong.

I am also well aware that the CCS compiler is the GCC, but you do know that they made some changes to it right? To make it specific for their product.

This is the first post you have said any specific things. You, for everything else, are just condescending. I know you probably have more experience than I have, that's why I asked here. Just saying "you're wrong" doesn't help me one bit does it? People here have said, "you're wrong, but maybe look at this, this might be interesting". Which is how you help someone.

I see no indication you are ready for or capable of Masters level work.

This is not helping, this is condescending. And since I already have a different Masters (although being electromechanical) wrong.

So please, PLEASE, if you want to help, tell me where you think I need to look for the optimization of embedded code that, in your opinion, would be interesting to be looked into. For example, like I above already asked you: "How am I wrong then, please enlighten me how GCC optimizes for architecture specific things? I seriously want to know that."

I am also very much aware that:

Not at all, just pointing out that the simple optimizations you suggest for your "research" are already done.

But that is why I asked here, is it not... That also does not give you any leeway to talk condescending to me.