Table of contents
1.
Introduction
2.
What is Cinder?
3.
What is Raspberry Pi and Why do we Use it?
4.
Cinder with Raspberry Pi 2
4.1.
Prerequisites 
4.2.
CMake
4.3.
Clang
5.
Dependencies for Cinder
6.
How to Build Cinder?
6.1.
Fetch and Build Cinder
7.
Build and Run BasicApp
7.1.
Build
7.2.
Run
7.3.
Exit
8.
Troubleshoot
8.1.
Audio - Start the pulsedeamon
8.2.
Audio–No Output Using a 3.5mm headphone jack
9.
Frequently Asked Questions
9.1.
What is Cinder?
9.2.
What are the requirements for Cinder-Raspberry Pi 2 Platform?
9.3.
How do you exit the BasicApp of Raspberry pi 2?
9.4.
How do you build Clang using Cinder?
9.5.
How do you use GCC instead of Clang in Raspberry Pi 2?
10.
Conclusion
Last Updated: Mar 27, 2024
Easy

Cinder-Raspberry Pi 2 Platform

Author Gunjan Batra
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

We all want a computer that we can easily carry and use anywhere! That’s exactly when, six years ago, the market introduced a chip that can work wonders for engineers and learning programmers. Raspberry pi came into existence in the market, where programmers can learn programming, code small programmers in their computer and work with it as a full-fledged operating system.

Cinder-Raspberry Pi 2 Platform

This blog will give you insight into the cinder-raspberry Pi-2 Platform and details about Raspberry Pi. 

What is Cinder?

Cinder, popularly known as OpenStack Block Storage. It is open-source software designed to manage and create a service that provides users with easy and consistent access to deployment. This enables the users to request and use the storage services without interfering the users with the information of API. 

Cinder provides self-service to users and helps them in data storage to cloud computing applications.

What is Raspberry Pi and Why do we Use it?

Raspberry Pi is a small piece of the single-board computer developed by the Raspberry Pi Foundation in association with Broadcom in the United Kingdom. You can create your mini-computer by connecting the accessory like a mouse, keyboard, and display directly to Raspberry Pi. 

What is Raspberry Pi?

It works slower than a computer and a laptop but performs all the features and functionality with minimum power consumption.

You use Raspberry Pi for programming languages, Image processing, IoT applications, building hardware/small software projects, video processing, and other applications.

Cinder with Raspberry Pi 2

Prerequisites 

Below, we have the list of what we need before we start. 

  • CMake 3.0
     
  • Raspbian Jessie or later
     
  • Clang 3.5.0+

CMake

Install the CMake by the below command:

sudo apt-get install cmake

Clang

It would be best if you built Cinder using the version of Clang(v3.5.0), a package for Raspbain Jessie. Using apt-get, install it. 

sudo apt-get install clang


Download Clang for armv7a Linux for the Raspberry Pi 2. 

When the below command gets a prompt, select /usr/bin/clang++ to set the clang as the default compiler. 

sudo update-alternatives --config c++


You need to adjust the memory split of CPU/GPU when you want to use GCC instead of Clang. When you are building Cinder, the default settings for the memory crash will cause a hard crash. 

Using the GCC 5.x on Raspberry Pi 2 Cinder has yet to be tested. 

Dependencies for Cinder

Run the command mentioned below to install the Raspberry Pi 2 with its dependencies.

sudo apt-get install libxcursor-dev \
libgles2-mesa-dev \
zlib1g-dev \
libfontconfig1-dev \
libmpg123-dev \
libsndfile1 \
libsndfile1-dev \
libpulse-dev \
libasound2-dev \
libcurl4-gnutls-dev \
libgstreamer1.0-dev \
libgstreamer-plugins-bad1.0-dev \
libgstreamer-plugins-base1.0-dev \
gstreamer1.0-libav \
gstreamer1.0-alsa \
gstreamer1.0-pulseaudio \
gstreamer1.0-plugins-bad

How to Build Cinder?

Below are the information and the commands to build and fetch the Cinder. 

How to Build Cinder?

Fetch and Build Cinder

git clone --recursive https://github.com/cinder/Cinder.git
cd Cinder
mkdir build && cd build
cmake .. -DCINDER_TARGET_GL=es2-rpi
make -j 3

 

Check out most important Git Interview Questions here.

Build and Run BasicApp

Build

cd samples/BasicApp/proj/cmake
mkdir build && cd build
cmake .. -DCINDER_TARGET_GL=es2-rpi
make

Run

 Start from samples/BasicApp/proj/cmake/build:

./Debug/BasicApp

Exit

To exit the BasicApp, hit the Esc key. Cinder for Linux has Esc hardcoded to exit an application on the Raspberry pi 2. However, it is important to return to the operating system. 

In the future, you will have a better way to handle this issue.

Troubleshoot

Audio - Start the pulsedeamon

Install the pulse audio with raspbian ships. Before you use audio in your application, you need to start the pulsedeamon. Run the below command to use the audio:

pulseaudio -D

Audio–No Output Using a 3.5mm headphone jack

Try the below command, as it will force output to the 3.5mm jack

sudo amixer cset numid=3 1

Frequently Asked Questions

What is Cinder?

Cinder, popularly known as OpenStack Block Storage. It is open-source software designed to manage and create a service that provides users with easy and consistent access to deployment.

What are the requirements for Cinder-Raspberry Pi 2 Platform?

There are a few prerequisites that you must fulfill to work with Cinder-Raspberry Pi 2 Platform. These are CMake 3.0, Raspbian Jessie or later, and Clang 3.5.0+.

How do you exit the BasicApp of Raspberry pi 2?

When you want to exit the BasicApp, hit the Esc key. Cinder for Linux has Esc hardcoded to exit an application on the Raspberry pi 2.

How do you build Clang using Cinder?

It would be best if you built Cinder using the version of Clang(v3.5.0), a package for Raspbain Jessie. Using apt-get, install it. 

How do you use GCC instead of Clang in Raspberry Pi 2?

You need to adjust the memory split of CPU/GPU when you want to use GCC instead of Clang. When you are building Cinder, the default settings for the memory crash will cause a hard crash. 

Conclusion

In this article, we started with the introduction of Cinder and Raspberry Pi. Later in the article, we learned about the Cinder-Raspberry Pi 2 Platform. 

To learn more about Cinder, please refer to the blogs given below:

Cinder-Windows Platform

Cinder-Raspberry Pi 3 Platform

Cinder-Jetson TK1 Platform

Refer to our guided paths on Coding Ninjas Studio to learn more about DSA, Competitive Programming, JavaScript, System Design, etc. Enroll in our coursesrefer to the mock test and problems look at the interview experiences and interview bundle for placement preparations.

Live masterclass