Internet Explorer is not a supported browser for TI.com. For the best experience, please use a different browser.
Video Player is loading.
Current Time 0:00
Duration 4:01
Loaded: 4.14%
Stream Type LIVE
Remaining Time 4:01
 
1x
  • Chapters
  • descriptions off, selected
  • en (Main), selected

[AUDIO LOGO]

Welcome to another video in the series about the tiarmclang Compiler. This video discusses compatibility between tiarmclang and GCC. My name is George Mock, and I'm your guide. So from the very outset, the Clang open source project was designed to be compatible with GCC, so it's no surprise that tiarmclang is just as compatible, which is, of course, a very big benefit for those of you who are porting any sort of open-source or general-computing project to an arm device or TI.

With regard to the command line interface, linking is on by default, which is not how it works with armcl, the older proprietary compiler. All the major GCC options are the same, OK? So -O means optimization. -o means you're naming the output file when you're linking.

And the way the mcpu and the way dash-- excuse me-- all those sorts of options all work the same way between tiarmclang and GCC. And in fact, pretty much any time it was time to add a new option to CLANG, the first thing they would look at is, well, how does it work with GCC today? And they would make it work differently. Only than they had a really, really good reason. So those things are incompatible at that level.

With regard to language extensions, most of the GNU language extensions are supported. All those attributes, they're all supported. With regard to the assembly language syntax, it's the GNU syntax is supported. For those of you who are familiar with the directives and whatnot of the GNU assembler, that's how it works here with the tiarmclang, the assembly that's used by default. With regard to inline assembly statements, the GNU-style inline assembly statements are supported.

Now with regard to linking, there's a little bit to be concerned about. Recall from an earlier video how I talked about how tiarmclang uses the TI linker. So this means for those of you who are making the transition from GCC ARM compiler to tiarmclang, your linker script, your GCC linker script needs to be converted to a TI linker command file. There is an online article that talks about how to do this. This is the full URL to this article. That's a bit of a mess.

For those of you who are inclined, I suppose you could pause the video and type this in, but that's not terribly convenient. What I think would work better is to go to your favorite search engine, and to just search on, linking migrate tiarmclang. The few engines that I tried with this, it was the first result that came up was this article right here. So that's a good way to get that article. And then that walks you through all the details about how to get from a GCC and linker script to a TI linker command file

Since we are nearing the end of this video, I'd like to give you a few references-- two of them, exactly. The first reference is to the home page for tiarmclang. That's i.com/tiarmclag. Here's where you can download the compiler, access the online manual, and more things like that.

The second reference is to e2e.ti.com. This is where you can go to post any question on any TI product, including tiarmclang. If you happen to ask a compiler-related question, that question will be answered by me. Thank you for watching this video and the series about the tiarmclang compiler.

This video is part of a series