This post expresses my thoughts on assembler vs HLL use for an embedded project.
In my opinion, major disadvantage of high-level languages (HLL) is obscure code generation.
Since HLL are not targeted for (not constrained with) any particular platform, code generation is left up to compiler vendor (developer). It is OK in case when hardware constraints on the target platform are pretty much loose and system (product) built with it does not violate the requirements. However, when tough hardware constraints come across tight system requirements, engineers need more control on the produced code. Usually such challenges are solved with assemblers, either inline or interfaced via object files. Some of HLLs (such as C) provide good facilities for interfacing with assembler code, some others not and this should be considered when choosing a language for an embedded project.
Besides obscure code generation, HLL and their compilers also contribute some constraints and limitations which may narrow down the space of design decisions.
Major advantages of HLL are better capabilities for code structuring and inter-module interfacing, stronger syntax constraints and, generally speaking, portability. Once you l have learned C, you can use your knowledge on x86, PIC, ARM, and so on.
Strengths of HLL are the weaknesses of assemblers. Their poor syntax control may turn a simple typo into a hard to find problem, poor capabilities inter-module interfacing creates difficulties for developing large projects, reusing the code and creating libraries.
Another crucial disadvantage of assemblers ??“ instruction syntax. The way it is done now has not been changed for sixty years. At that time there were good excuses for this kind of syntax, nowadays it looks like a religious dogma.