Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add the first article about BSP #37

Merged
Merged
Changes from 5 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
df49e54
add the first article about BSP
georgik Jun 18, 2024
1d61dee
add links + M5 Stack example
georgik Jun 18, 2024
f4af8e7
rewrite part about What's BSP
georgik Jun 18, 2024
fdcfae4
move note about dependency one level up
georgik Jun 18, 2024
009f1b3
add info how to leave monitor
georgik Jun 18, 2024
942c510
add graphical asset
georgik Jun 18, 2024
19da222
add asciinema recording
georgik Jun 19, 2024
663d99a
asciinema add markers
georgik Jun 19, 2024
203365b
add type of content
georgik Jun 20, 2024
a238eae
add ESP Launchpad button
georgik Jun 20, 2024
aa49e4f
change section to make explicit check of ESP-BSP dependency
georgik Jun 20, 2024
abd87eb
add workaround for M5Stack CoreS3
georgik Jun 20, 2024
5b969f2
add BSP example code
georgik Jun 21, 2024
e90122b
use fixed version of ESP-IDF
georgik Jun 21, 2024
53c47ce
add details about Wokwi simulation
georgik Jun 21, 2024
50903ba
Wokwi - point to starter templates
georgik Jun 21, 2024
673fd5d
replace launchpad button with link, due to proble with image zoom
georgik Jun 21, 2024
9fc7768
switch to button style
georgik Jun 21, 2024
bcd2fc8
remove double title
georgik Jun 25, 2024
b5d5909
explicitly mention SoCs
georgik Jun 25, 2024
c5b8702
add link to example
georgik Jun 25, 2024
2e62c82
add intro screen
georgik Jun 25, 2024
7af0858
fix markers
georgik Jun 25, 2024
deb53c7
pre-compiled binaries moved above asciinema
georgik Jun 25, 2024
cdb3b1e
remove can
georgik Jun 25, 2024
66124f3
add wokwi files directly to the content
georgik Jun 25, 2024
692a39c
make explicit that ESP-BSP is for ESP-IDF based projects.
georgik Jun 26, 2024
826ef99
replaced ESP32 with Espressif SoC
georgik Jun 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 131 additions & 0 deletions content/blog/simplify-embedded-projects-with-esp-bsp/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
---
title: "Simplify Your Embedded Projects with ESP-BSP"
date: 2024-06-18
showAuthor: false
authors:
- "juraj-michalek"
tags: ["Embedded Systems", "ESP32", "ESP32-S3", "Espressif", "BSP"]
---

# Simplify Your Embedded Projects with ESP-BSP

## Introduction

Are you a maker or an embedded systems enthusiast looking to create applications that work seamlessly across different ESP32 development boards? Whether you’re using the [ESP-WROVER-KIT](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/hw-reference/esp32/get-started-wrover-kit.html), [M5Stack-CoreS3](https://docs.m5stack.com/en/core/CoreS3), [ESP32-S3-BOX-3](https://github.com/espressif/esp-box/blob/master/docs/hardware_overview/esp32_s3_box_3/hardware_overview_for_box_3.md), or other compatible boards, the ESP Board Support Package (ESP-BSP) makes your life easier. In this article, we’ll walk you through how to get started with ESP-BSP, enabling you to focus on your project’s functionality without worrying about hardware differences.
georgik marked this conversation as resolved.
Show resolved Hide resolved

## What is ESP-BSP?

[ESP-BSP](https://github.com/espressif/esp-bsp) is a collection of Board Support Packages featuring Espressif’s or M5Stack development boards. The set can be extended to any board with Espressif’s chip. It provides a convenient way to start a project for a specific development board without the need to manually look for drivers and other details. By using ESP-BSP, you can:
georgik marked this conversation as resolved.
Show resolved Hide resolved

- **Streamline Hardware Integration**: Simplify code and reduce complexity.
- **Enhance Development Speed**: Quickly set up and start working on your projects.
- **Access Standardized APIs**: Ensure consistency across your projects.

## Getting Started with ESP-BSP

The following example covers steps for building application for ESP32-S3-BOX-3 which is supported by ESP-BSP.

### Hardware Setup

Ensure you have the following hardware:

- [ESP32-S3-BOX-3](https://github.com/espressif/esp-box) development board.
- USB-C Cable for power and programming.

### Prerequisites

Before you begin, make sure you have the following:

- [ESP-IDF v5.3](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/index.html#installation): The official development framework for the ESP32, properly installed and sourced in your shell.
georgik marked this conversation as resolved.
Show resolved Hide resolved

### Creating Project from Example

georgik marked this conversation as resolved.
Show resolved Hide resolved
Let’s create a simple project using the `display_audio_photo` example, which is available for the ESP32-S3-BOX-3. This example showcases how to use the display, touch, and audio features.
georgik marked this conversation as resolved.
Show resolved Hide resolved

1. **Initialize a New Project**:

Use the `idf.py` tool to create a new project from the example:

```bash
idf.py create-project-from-example "espressif/esp-box-3^1.2.0:display_audio_photo"
georgik marked this conversation as resolved.
Show resolved Hide resolved
cd display_audio_photo
```

2. **Set the Target**:

Ensure the correct target is set for your project:

```
idf.py set-target esp32s3
```

Note: For users of ESP-IDF 5.3 or newer, it is necessary to add the following dependency with the corrected I2C driver (error message at runtime: `CONFLICT! driver_ng`):

```
idf.py add-dependency "espressif/esp_codec_dev==1.1.0"
```

3. **Build and Flash the Project**:

Compile and flash your application to the ESP32-S3-BOX-3:

```
idf.py build flash monitor
georgik marked this conversation as resolved.
Show resolved Hide resolved
```

Note: Use `Ctrl+]` to quit the monitor application.


### Exploring the Example

Once the application is running, you’ll see the following features in action:

- **Display**: Shows images, text files, and more.
- **Touch**: Interacts with the display.
- **Audio**: Plays sound files.


### Exploring the Component

The ESP-BSP is included via `main/idf_component.yml` file. Simply by switching to another BSP, you can adapt the project to different hardware. Here’s how you can specify dependencies for different boards:

Example for ESP32-S3-BOX:

```
## IDF Component Manager Manifest File
dependencies:
espressif/esp-box: "^3.1.0"
esp_codec_dev:
public: true
version: "==1.1.0"
## Required IDF version
idf:
version: ">=5.0.0"
```

Example for M5Stack-CoreS3:

```
## IDF Component Manager Manifest File
dependencies:
espressif/m5stack_core_s3: "^1.1.0"
esp_codec_dev:
public: true
version: "==1.1.0"
## Required IDF version
idf:
version: ">=5.0.0"
```

georgik marked this conversation as resolved.
Show resolved Hide resolved
## Conclusion

With ESP-BSP, you can quickly develop and port your applications across various ESP32 boards, saving time and effort. Whether you’re building a new project or upgrading an existing one, ESP-BSP simplifies your development process.
georgik marked this conversation as resolved.
Show resolved Hide resolved
georgik marked this conversation as resolved.
Show resolved Hide resolved

## Useful Links

- [Board Support Packages at Component Registry](https://components.espressif.com/components?q=Board+Support+Package)
- [ESP-BSP GitHub Repository](https://github.com/espressif/esp-bsp)
- [ESP-BSP Documentation](https://github.com/espressif/esp-bsp/blob/master/README.md)
- [ESP-BOX-3 BSP Example](https://components.espressif.com/components/espressif/esp-box-3/versions/1.2.0/examples?language=en)
- [ESP-IDF Installation Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html)
- [Wokwi - Online ESP32 Simulator](https://wokwi.com)
georgik marked this conversation as resolved.
Show resolved Hide resolved