An Integrated Development Environment (IDE) is a software tool designed to facilitate development. Every IDE is basically a text editor, but instead of formatting documents, it helps users write code. It can highlight and autocomplete text based on syntax, and may also have built-in debugging, version control and terminal.
Visual Studio, VS Code, PyCharm, Android Studio, Xcode ...
Embedded systems can be programmed using compiled languages, following a few basic steps. While details may vary depending on the IDE or the embedded device, the overall process remains largely the same.
First, the programmer writes the code in a high-level programming language, while ensuring a clear structure and adding comments for readability. A project may consist of multiple files with different file 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 preprocessing, the compiler translates the source code into an intermediate format, such as assembly, while it also checks for syntax errors, optimizes the code, and generates 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 exactly. The result is an executable file.
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 code cannot be recovered. To prevent executing code from an unknown source, the Secure Boot function and cerificates may be used.
The previous steps did not require the hardware, only knowledge of it. To flash, 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