avr-gcc explorer

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just put out avr-gcc.senthilthecoder.com - an interactive environment that lets you see code generated from a bunch of Atmel compilers and FSF trunk.

 

I ran into Matt Godbolt's compiler explorer a while back, and wanted something like that for avr - the version he provides is ancient. I tried something similar before -  but his was way better. In particular, the option to view code generated by different toolchain versions side by side, with color coding for source line mapping, was irresistible.

 

He's graciously put the source for the website out on github, so I took that, tweaked it a bit, downloaded and plugged in a few Atmel toolchains, setup a cron job to build and plugin FSF trunk, and hosted it on my VPS. Was planning to build and plugin gcc-5 and gcc-6 for avr too, but disk space is tight.

 

Hope you guys like it

Regards

Senthil

 

blog | website

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My only niggle with that is that it eats "Ctrl-D" ;-)

 

(so to bookmark it you have to use the actual bookmark icon on Firefox's toolbar).

 

BTW am I the only one to who the numbers 3.2.3, 3.4.5 and 3.5.4 mean absolutely nothing? I tend to think of GCC version in terms of the version number of the gcc itself. Things like 4.8.1, 4.9.2 etc.

 

Also it's kind of a shame that the compiler options don't default to the same as for a "standard" AS7 project. As there's no -Os or -mmcu given the default code output is atrocious code for a micro that has no MUL. At least the options you give do appear to be "sticky" (presumably stored in a cookie).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

BTW am I the only one to who the numbers 3.2.3, 3.4.5 and 3.5.4 mean absolutely nothing? I tend to think of GCC version in terms of the version number of the gcc itself. Things like 4.8.1, 4.9.2 etc.

 

I'll add the gcc versions to those as well, but those version numbers let people see how a newer Atmel toolchain release compares against an older one. IIRC, 3.5.1 to 3.5.4 are all based on gcc 4.9.2, with increasing number of backports.

 

clawson wrote:

Also it's kind of a shame that the compiler options don't default to the same as for a "standard" AS7 project. As there's no -Os or -mmcu given the default code output is atrocious code for a micro that has no MUL. At least the options you give do appear to be "sticky" (presumably stored in a cookie).

Should be easy to add those. And yes, the options stick around until you clear the cache.

 

Regards

Senthil

 

blog | website

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Added gcc version numbers to the Atmel toolchains, and am now building and plugging in gcc-5-branch and gcc-6-branch daily too.

Regards

Senthil

 

blog | website

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I love the way you can use -Ox and instantly see the effect on any particular optimisation level but something weird I never knew. If you just type -O without any parameter I guess I always assumed that would be taken as -O0 but clearly not.

 

BTW what is "Intel" on the toolbar for?

Last Edited: Mon. Oct 24, 2016 - 09:20 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

I love the way you can use -Ox and instantly see the effect on any particular optimisation level but something weird I never knew. If you just type -O without any parameter I guess I always assumed that would be taken as -O0 but clearly not.

 

Yeah, -O is -O1 (https://gcc.gnu.org/onlinedocs/g...)

 

clawson wrote:

BTW what is "Intel" on the toolbar for?

 

Intel assembly syntax, but I can't click on it either :)

Regards

Senthil

 

blog | website

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just realized it can handle #including URLs, like this

Regards

Senthil

 

blog | website

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cool!

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cool!

 

[EDIT] Reminds me of Knuths famous "Structured Programming with go to Statements" article, chapter "Program Manipulation Systems".

The programmer using such a system will write his beautifully-structured, but possibly inefficient, program P; then he will inter actively specify transformations that make it efficient.

Last Edited: Mon. Oct 24, 2016 - 12:39 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Been watching some of the presentations from CppCon 2016 lately, and C++ for embedded seems to be getting there. Especially 

was interesting (of the ones I've seen until now).

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

[without seeing those lengthy videos - maybe in the evening] no, C++ is just on the opposite side, making source more abstract and less connected to the outcome.

 

Knuth was talking about the developer seeing directly the result of his actions, allowing to (micro)optimize him interactively. This is the merit I see in Senthil's tool.

 

JW