Maker Pro
Maker Pro

Please clear my doubts in embedded system

hi,
I have just started to read about embedded system. i know, to make project i need microcontroller, software and other things.
in software terms i am confused i don't know actually when and where compiler and assembler are used in embedded project? don't give definitions please explain with example
thank you very much for every help
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Te compiler or assembler are used to write the code that runs on the micro-controller/microprocessor that is part of the equipment you design.
 
Te compiler or assembler are used to write the code that runs on the micro-controller/microprocessor that is part of the equipment you design.


ok, we write a program for the microcontroller in assembly language, and high level language
like c program but i wan't to ask when we use assembly code and when we use to need c code
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
You can use either assembler OR C (or some other language). Sometimes you might use a combination of languages.

The language is just like a... language. Some languages tend to be better than others at some things (Maybe you can make love to your processor in French, but resort to German for engineering). And sometimes you're more familiar with a particular language. Or maybe you have some code already written in a language. Or perhaps you don't have a C compiler.
 

KrisBlueNZ

Sadly passed away in 2015
Generally embedded software is mostly written in a medium-level language like C with assembly language used for specific situations where C is not suitable:

1. If the device is severely resource-constrained (tiny amount of RAM and/or code memory);
2. For sections that need to run as quickly as possible (hand-optimised assembly language can usually beat even the best compiled code);
3. To do things that can't be written in C such as direct stack manipulation, critical instruction sequences, and special instructions.

Most C compilers support functions and code fragments written as "inline" assembly.
 
Top