An Integrated Development Environment (IDE) is a software tool designed to facilitate development. It is basically a text editor, but instead of formatting documents, it supports software development with various components. It colours and autocompletes text based on syntax, and may also have built-in debugging, version control and command line tools.
Visual Studio, VS Code, PyCharm, Android Studio, Xcode ...
Embedded systems can be programmed using compiled languages, following a few basic steps. While the details may vary depending on the IDE, the overall process remains largely the same.
First, the programmer writes the code in a high-level programming language, ensuring a clear structure and adding comments for readability. A project may consist of multiple files with different extensions, as required by programming language and the development environment.
Before compiling, the IDE performs some pre-processing on the code, such as overwriting macros, checking for conditional compilation commands. Preprocessing directives in C begin with a colon (#define, #include).
After pre-processing, the compiler translates the source code into an intermediate format, such as assembly language, while checking for syntax errors, optimizing the code, and generating object files containing the machine code. A program may consist of multiple source files, each compiled separately.
The linker links the separate object files and the external and built-in libraries after compilation. It also determines where code and data are placed in memory. The result is a file that contains all the necessary functions and resources.
The file created by the linker must be converted into a device-specific binary format. This file, which contains the necessary code and data, can then be uploaded to the target hardware. It is also possible to extract this binary from a running device and transfer it to another, but the original source code cannot be recovered.
The previous steps did not require the hardware, only knowledge of it. To upload, the developer obviously has to have the microcontroller, which must be connected to the computer in some way. Some controllers require an external programming unit (e.g. AVR, PIC), others have a built-in bootloader (e.g. ESP).
Many popular programming languages differ from compiled or machine languages. These so-called scripting languages are interpreted at runtime by an interpreter rather than being precompiled. As a result, they can run immediately but tend to be slower. Scripting languages are often used to create platform-independent applications, though their source code remains accessible to users. In embedded systems, they are not used for direct hardware interaction but are widely employed for testing and automation tasks.
Python, JavaScript, Lua, R, PHP