Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:iot-open:introductiontoembeddedprogramming2:developmentplatforms [2023/07/13 10:31] – [Developers Middleware and Support Tools] ktokarzen:iot-open:introductiontoembeddedprogramming2:developmentplatforms [2024/05/24 09:52] (current) pczekalski
Line 1: Line 1:
-===== Software Development Tools and Platforms ===== +====== Software Development Tools and Platforms =====
-Software development in the bare metal model requires a development toolchain installed on the developer's computer. The vendor of the MCU usually provides a set of tools. This set frequently includes a dedicated compiler, linker, library management tools, configuration tools, debugger software, etc. These tools are command lines in most cases. Using a GCC ((https://gcc.gnu.org/)) C/C++ compiler is also quite common. On top of it, a GUI with a rich UI interface is built to simplify software development. Some vendors provide their own GUIs, such as, e.g. STMicroelectronics' STM32CubeIDE (image {{ref>sdt_stm32cubeide}}), while others use already available universal code editing solutions and integrate with them, i.e. in the form of plugins or extensions. +{{:en:iot-open:czapka_b.png?50| General audience classification icon }}{{:en:iot-open:czapka_m.png?50| General audience classification icon }}{{:en:iot-open:czapka_e.png?50| General audience classification icon }}\\ 
 +Software development in the bare metal model requires a development toolchain installed on the developer's computer. The vendor of the MCU usually provides a set of tools. This set frequently includes a dedicated compiler, linker, library management tools, configuration tools, debugger software, etc. These tools are command lines in most cases. Using a GCC ((https://gcc.gnu.org/)) C/C++ compiler is also quite common. On top of it, a GUI with a rich UI interface is built to simplify software development. Some vendors provide their own GUIs, such as STMicroelectronics' STM32CubeIDE (image {{ref>sdt_stm32cubeide}}). In contrast, others use already available universal code editing solutions and integrate with them, e.g. in the form of plugins or extensions. 
  
-<note>Vendors barely develop their own GUI solutions from scratch; instead, they adapt existing open-source ones, i.e. STM32CubeIDE is built on top of the Eclipse IDE ((https://www.eclipse.org/ide/)).</note>+<note>Vendors barely develop their own GUI solutions from scratch; instead, they adapt existing open-source ones, e.g. STM32CubeIDE is built on top of the Eclipse IDE ((https://www.eclipse.org/ide/)).</note> 
 + 
 +Detailed instructions on the tools necessary to set the development environment, e.g., the STM32 WB chip family, are presented on the STM's YouTube channel ((https://www.youtube.com/watch?v=YSyaH5v3hys)).
  
 <figure sdt_stm32cubeide> <figure sdt_stm32cubeide>
-{{:en:iot-open:introductiontoembeddedprogramming2:stm32cubeide.png?600|}}+{{ :en:iot-open:introductiontoembeddedprogramming2:stm32cubeide.png?660 Eclipse for STM32 developers}}
 <caption>STM32CubeIDE: Eclipse for STM32 developers</caption> <caption>STM32CubeIDE: Eclipse for STM32 developers</caption>
 </figure> </figure>
  
-Because documentation for the command line tools composing SDK is usually available, there are also universal solutions that enable developers to use a single GUI environment for various tasks and microcontrollers, switching among them quickly, such as Visual Studio Code (figure {{ref>sdt_vscode}}). Each platform requires its dedicated toolchain, anyway, and integration with universal code editors such as the aforementioned VS Code may be tricky. Luckily, there are tools to help with the automated installation of all required components, such as PlatformIO ((https://platformio.org/)), that we describe below. +Because documentation for the command line tools composing SDK is usually available, there are also universal solutions that enable developers to use a single GUI environment for various tasks and microcontrollers, switching among them quickly, such as Visual Studio Code (figure {{ref>sdt_vscode}}). Each platform requires its dedicated toolchain, anyway, and integration with universal code editors such as the aforementioned VS Code may be tricky. Luckily, there are tools to help with the automated installation of all required components, such as PlatformIO ((https://platformio.org/))), which we describe below. 
  
 <figure sdt_vscode> <figure sdt_vscode>
-{{:en:iot-open:introductiontoembeddedprogramming2:vscodeide.png?600|}}+{{ :en:iot-open:introductiontoembeddedprogramming2:vscodeide.png?660 Universal development environment}}
 <caption>VS Code: a universal development environment</caption> <caption>VS Code: a universal development environment</caption>
 </figure> </figure>
  
-As the Arduino programming framework became a cross-platform standard, vendors provided low-level libraries implementing standard functionalities such as embedded communication protocols (Serial, SPI, I2C, 1Wire) and networking communication. Arduino, a manufacturer of popular development boards, provides an IDE (figure {{ref>sdt_arduinoide}}: Arduino IDE ((https://www.arduino.cc/en/software))) that is intended to be an entry-level development environment. It can be extended beyond genuine Arduino boards, i.e. with the Espressif toolchain for ESP8266 and ESP32. This software, however, is very limited in features and is suitable only for simple projects.+As the Arduino programming framework became a cross-platform standard, vendors provided low-level libraries implementing standard functionalities such as embedded communication protocols (Serial, SPI, I2C, 1Wire) and networking communication. Arduino, a manufacturer of popular development boards, provides an IDE (figure {{ref>sdt_arduinoide}}: Arduino IDE ((https://www.arduino.cc/en/software))) that is intended to be an entry-level development environment. It can be extended beyond genuine Arduino boards, e.g. with the Espressif toolchain for ESP8266 and ESP32. This software, however, is very limited in features and is suitable only for simple projects.
  
 <figure sdt_arduinoide> <figure sdt_arduinoide>
-{{:en:iot-open:introductiontoembeddedprogramming2:arduinoide.png?600|}}+{{ :en:iot-open:introductiontoembeddedprogramming2:arduinoide.png?660 Arduino IDE: an entry-level IDE for beginners}}
 <caption>Arduino IDE: an entry-level IDE for beginners</caption> <caption>Arduino IDE: an entry-level IDE for beginners</caption>
 </figure> </figure>
 <note tip>We suggest starting with VS Code and PlatformIO over Arduino IDE, even if you're a beginner.</note> <note tip>We suggest starting with VS Code and PlatformIO over Arduino IDE, even if you're a beginner.</note>
  
-==== Developers Middleware and Support Tools ==== +===== Developers Middleware and Support Tools ===== 
-A number of additional tools usually come with the development toolchain provided by the hardware vendors. They include programmers (flashers, injecting firmware into the IoT device), configuration tools, power consumption calculators, etc. Installation is not always straightforward, and updating is tricky. Developers who use a variety of platforms (MCUs) struggle with instant updatesbrowsing the web for tools and sources. Moreover, handling libraries they use for development is time-consuming and involves instant monitoring of changes, manual copy-paste operations on files, etc. And it has to be done for every project individually.+Several additional tools usually come with the development toolchain provided by the hardware vendors. They include programmers (flashers, injecting firmware into the IoT device), configuration tools, power consumption calculators, etc. Installation is not always straightforward, and updating is tricky. Developers who use a variety of platforms (MCUs) struggle with instant updates and browsing the web for tools, samples and libraries. Moreover, handling libraries they use for development is time-consuming and involves instant monitoring of changes, manual copy-paste operations on files, etc. Moreover, it has to be done individually for every project.
  
  
-=== PlatformIO === +==== PlatformIO ==== 
-{{:en:iot-open:introductiontoembeddedprogramming2:platformio-logo.17fdc3bc.png?60 |}}The solution is a developer's middleware that integrates with selected IDE and helps to install, configure and maintain toolchains for hardware, software development libraries, and also contains a set of additional tools (i.e. serial port monitor, JTAG debugger, code repository integration, collaboration tools, remote development, etc.). As mentioned above, one example of a handy middleware for IoT and embedded development is PlatformIO. It is a command-line toolset that provides a whole ecosystem for virtually any hardware platform; it still uses the vendor's proprietary toolchains. It perfectly integrates with Visual Studio Code (among others) via VS Code's extension (plugin) systems. VS Code works also as a GUI for PlatformIO. In the following figures, we present its look and UI when integrated with Visual Studio Code (figures {{ref>std_pio1}}, {{ref>std_pio2}} and {{ref>std_pio3}}).+{{:en:iot-open:introductiontoembeddedprogramming2:platformio-logo.17fdc3bc.png?60 |}}The solution is a developer's middleware that integrates with selected IDE and helps to install, configure and maintain toolchains for hardware, software development libraries, and also contains a set of additional tools (e.g. serial port monitor, JTAG debugger, code repository integration, collaboration tools, remote development, etc.). As mentioned above, one example of a handy middleware for IoT and embedded development is PlatformIO. It is a command-line toolset that provides a whole ecosystem for virtually any hardware platform; it still uses the vendor's proprietary toolchains. It perfectly integrates with Visual Studio Code (among others) via VS Code's extension (plugin) systems. VS Code also works as a GUI for PlatformIO. In the following figures, we present its look and UI when integrated with Visual Studio Code (figures {{ref>std_pio1}}, {{ref>std_pio2}} and {{ref>std_pio3}}).
  
 <figure std_pio1> <figure std_pio1>
-{{:en:iot-open:introductiontoembeddedprogramming2:pio1.png?600|}}+{{ :en:iot-open:introductiontoembeddedprogramming2:pio1.png?660 VSCode with PlatformIO: starting page}}
 <caption>VSCode with PlatformIO: starting page</caption> <caption>VSCode with PlatformIO: starting page</caption>
 </figure> </figure>
  
 <figure std_pio2> <figure std_pio2>
-{{:en:iot-open:introductiontoembeddedprogramming2:pio2.png?600|}}+{{ :en:iot-open:introductiontoembeddedprogramming2:pio2.png?660 VSCode with PlatformIO: library management}}
 <caption>VSCode with PlatformIO: library management</caption> <caption>VSCode with PlatformIO: library management</caption>
 </figure> </figure>
  
 <figure std_pio3> <figure std_pio3>
-{{:en:iot-open:introductiontoembeddedprogramming2:pio3.png?600|}}+{{ :en:iot-open:introductiontoembeddedprogramming2:pio3.png?660 VSCode with PlatformIO: toolchain management}}
 <caption>VSCode with PlatformIO: toolchain management</caption> <caption>VSCode with PlatformIO: toolchain management</caption>
 </figure> </figure>
  
-A PlatformIO-enabled IoT project is a set of files with a ''platformio.ini'' file in the root folder and ''main.cpp'' in the ''./src/'' subfolder (as, i.e. in the figure {{ref>std_pio1}}, project folder tree is to the left)). The ''platformio.ini'' file describes all technical parts of the project: the hardware platform, the method of uploading the firmware (usually via a serial port), software libraries that are included in the code and should be automatically pulled from the libraries repository during compilation and many other options ((https://docs.platformio.org/en/stable/projectconf/index.html)). Sample ''platformio.ini'' file is presented in the code below:+A PlatformIO-enabled IoT project is a set of files with a ''platformio.ini'' file in the root folder and ''main.cpp'' in the ''./src/'' subfolder (as, e.g. in the figure {{ref>std_pio1}}, project folder tree is to the left)). The ''platformio.ini'' file describes all technical parts of the project: the hardware platform, the method of uploading the firmware (usually via a serial port), software libraries that are included in the code and should be automatically pulled from the libraries repository during compilation and many other options ((https://docs.platformio.org/en/stable/projectconf/index.html)). Sample ''platformio.ini'' file is presented in the code below:
 <code ini> <code ini>
 [env:d1_mini] [env:d1_mini]
Line 60: Line 63:
  adafruit/DHT sensor library@^1.4.4  adafruit/DHT sensor library@^1.4.4
 </code> </code>
-This code configures the ESP8266 (Espressif) hardware project, with specific developer board D1 Mini and programming done in the "Arduino" framework development model.\\Communication with the IoT device is via serial port (here ''/dev/ttyUSB0'' for Linux or, i.e. ''COM3'' for Windows) and uses the same port for monitoring (serial port monitor for tracing messages from the MCU and code).\\ It uses three libraries registered in the library registry for PlatformIO: ''LiquidCrystal'', ''Adafruit Unified Sensor'' and ''DHT sensor library'', with explicit versions. PlatformIO's Library Manager automatically checks for updates and proposes to update libraries to the latest available if a version is not explicitly stated. The Library Registry in the PlatformIO is a repository of the Gitlab project, available online ((https://docs.platformio.org/en/latest/librarymanager/index.html)). Libraries are currently held per project instead of shared between projects.\\+This code configures the ESP8266 (Espressif) hardware project, with specific developer board D1 Mini and programming done in the "Arduino" framework development model.\\ 
 +Communication with the IoT device is via serial port (here ''/dev/ttyUSB0'' for Linux or, e.g. ''COM3'' for Windows) and uses the same port for monitoring (serial port monitor for tracing messages from the MCU and code).\\ It uses three libraries registered in the library registry for PlatformIO: ''LiquidCrystal'', ''Adafruit Unified Sensor'' and ''DHT sensor library'', with explicit versions. PlatformIO's Library Manager automatically checks for updates and proposes to update libraries to the latest available if a version is not explicitly stated. The Library Registry in the PlatformIO is a repository of the Gitlab project, available online ((https://docs.platformio.org/en/latest/librarymanager/index.html)). Libraries are currently held per project instead of shared between projects.\\
 At the start of the PlatformIO GUI and then periodically, it checks for PlatformIO updates and development toolchain updates, proposing to update them when a new version is available. At the start of the PlatformIO GUI and then periodically, it checks for PlatformIO updates and development toolchain updates, proposing to update them when a new version is available.
  
en/iot-open/introductiontoembeddedprogramming2/developmentplatforms.1689244306.txt.gz · Last modified: 2023/07/13 07:31 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0