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.

program languages

hi everyone,

what advantages I find if I make a program to Tiva C in assembler?

  • In theory - your program may be smaller in size and execute faster.

    That said - there are NO (surely few) code & peripheral examples - written entirely in ASM - directly for MCUs from this vendor.
    Joseph Yiu's books ("The definitive guide to the ARM Cortex M") contain some assembler examples - but not many.

    There's a "flip side" - following that (assembler) path, "Culls you from the herd" vendor staff (along w/most outsiders) will not be able to offer anywhere near the same level of assistance which you'd likely receive if you chose "C." This vendor has a rather superb API - which has long been, "Tried, True, Tested" - not one of those merits can be said for any individual's efforts via ASM.

    Expect to encounter higher effort, slowed code development, and greatly reduced vendor (and outsider) support.   And really - for what?

    As a small tech biz owner - we'd only (and maybe) employ ASM in a very limited fashion - and only if needed! Modern C compilers have swallowed most of the advantages of ASM - you'd do well to reconsider ASM's usage...

  • Hello cb1

    And to not to forget the finer nuances of the startup vector file. Long time back the same was attempted by another forum user just to discover after days of debug that the PC load was not aligned as per the requirement of the Cortex M4 core.
  • With current C compilers none.

    Compilers are more consistent than we are. Humans can beat them for short stretches but even that is difficult. Compilers generally also have a greater depth of techniques usable for optimization.

    Save assembly for those sequences that cannot be expressed in your higher level language or those sequences that absolutely must be performed in a particular fashion.

    You'll write code faster, and clearer in a higher level language.

    Robert
  • There are also many more tools available for C/ C++ compilers than any other language. Assembly has very few tools available to support it.

    Robert
  • what advantages I find if I make a program to Tiva C in assembler?

    • Making your sources virtually unreadable to most colleagues and developers, so they can't comment on style & quality;
    • Making yourself indispensable for your company, since good assembler coders are almost impossible to find;
    • And not having to fear to get co-workers assigned to your project;

    Sorry, couldn't resist ...

  • Hello f.m.

    And recently there was a customer which ended up asking all ASM code to be converted to C for maintenance.
  • Monsieur - might we "rent (better borrow)" your "Devil's cap" for Halloween.

    We'll be sure to return it - just after our ASM code proves:  error, human coder, and "missed deadline" free!   (i.e. NEVER!)

    Long live the horseless carriage! (it too enjoyed "advantages!")   Poster may wish to turn his attention to, (more modern) "Autonomous Horses."

  • We'll be sure to return it - just after our ASM code proves:  error, human coder, and "missed deadline" free!

    Can't understand why you speak so contemptuous about assembler - it was "State Of The Art" not so long ago (mid '50 to early '70), and much more comfortable than hacking in hex codes ...

    Long live the horseless carriage! (it too enjoyed "advantages!")

    Carl Benz (the man the name that famous high-prized automobiles relates to) allegedly used a horse-carriage as base for his first automobile prototype.Some books suggest such a name ("horseless carriage") had been quite popular shortly after.

    Monsieur - might we "rent (better borrow)" your "Devil's cap" for Halloween.

    Sure, I claim no copyright.

    Since I'm in no way of Celtic descent (or in a celtic-influenced environment), I neither have a relation to Helloween.