Silicon Labs
|
Silicon Labs Community Silicon Labs Community
  • Products
    1. 8-bit MCU
    2. 32-bit MCU
    3. Bluetooth
    4. Proprietary
    5. Wi-Fi
    6. Zigbee & Thread
    7. Z-Wave
    8. Interface
    9. Isolation
    10. Power
    11. Sensors
    12. Timing
  • Development Tools
    1. Simplicity Studio
    2. Third Party Tools
  • Expert's Corner
    1. Announcements
    2. Blog
    3. General Interest
    4. Projects
How to Buy
English
  • English
  • 简体中文
  • 日本語
//
Community // Blog

Micrium OS Examples: 57 Hidden Gems You May Not Know About

12/339/2018 | 03:32 PM
Juan Benavides
Employee

Level 5


Background

The Micrium OS Examples in Simplicity Studio are very easy to access: You connect your Starter Kit and Simplicity Studio will display the list of examples as shown below:

Figure 1. Micrium OS Examples in Simplicity Studio

 

For more information on how to access the Micrium OS Examples from Simplicity Studio you can see this document:

https://www.silabs.com/documents/public/training/wireless/micrium-os-examples.pdf

 

 

Revealing the 57 Hidden Gems

In this blog, I’m going to show you how to access the additional Micrium OS Examples that are not available from Simplicity Studio's Launcher Perspective.

There are 57 examples that demonstrate how to initialize the Micrium OS modules to perform the most basic operations:

Micrium OS Module Example
CANopen CANopen Module Initialization Example
CANopen Node Start Example
CANopen Object Dictionary Read/Write Example
File System File System Module Initialization Example
File Read/Write Example
File Read/Write with Posix API Example
File Multi-Descriptors Example
Entry Path Example
Block Device Read/Write Example
Media Polling Example
Network FTP Client Send Data from a buffer to a file on an FTP Server
Upload a file to an FTP Server
Receive a file into a buffer
Download a file from an FTP server
HTTP Client HTTP Client Initialization Example
HTTP Client GET Request Examples
HTTP Client POST Request Examples
HTTP Client PUT Request Examples
HTTP Client Persistent Connection Examples
HTTP Client Multi-connection Examples
HTTP Server HTTP Server Initialization Example
Simple Server That Uses No File System
Basic Server That Uses the HTTP Static File System
Basic Server That Uses Micrium OS File System
Server That Handles REST Requests
Server That Handles Webpages, REST Requests and Authentication Support
Basic Secure Server That Uses SSL-TLS and the HTTP Static File System
IPerf IPerf Initialization Example
MQTT Client MQTT Client Initialization Example
MQTT Client Connect Example
MQTT Client Publish Example
MQTT Client Subscribe Example
MQTT Client Echo Example
Network Core Network Module(s) Initialization Example
Network Core Initialization Example
Start Network Interface(s) Example
SMTP Client SMTP Client Initialization Example
SMTP Client Send Email Example
SNTP Client SNTP Client Initialization Example
Basic SNTP Current Time Retrieve
Telnet Server Telnet Server Initialization Example
Telnet Server Instance Example
TFTP Client Download and Upload a File to a TFTP Server
USB Device Audio Class USB Device Audio Class Loopback Example
CDC ACM Class USB Device CDC ACM Class Terminal Example
CDC EEM Class USB Device CDC EEM Class Example
USB Device Core USB Device Core Initialization Example
HID Class USB Device HID Class Mouse Example
MSC Class USB Device MSC Class Ramdisk LUN Example
USB Device MSC Class Ramdisk Shared Example
Vendor Class USB Device Vendor Class Loopback Example
USB Host Android Accessory Class USB Host Android Accessory Class Example
CDC ACM Class USB Host CDC ACM Class Example
USB Host Core USB Host Module Simple Initialization Example
Simple Device Port Operation Example
MSC Class USB Host MSC Class Example
USB-to-Serial Class USB Host USB-to-Serial Class Example

Table 1. The Hidden Micrium OS Examples

 

 

How to run the hidden Micrium OS Examples

The process of including, configuring and initializing the examples is the same for all the examples and can be summarized as follows:

Start off with one of the examples available through Simplicity Studio by connecting your Kit and selecting an Example from the list as illustrated in Figure 1.

If the example project does not have the Micrium OS module files, then you need to include them by inserting in your project the folder located at ${StudioSdkPath}/platform/micrium_os/[module]/include and ${StudioSdkPath}/platform/micrium_os/[module]/source/[module] and configuring your compiler's include paths with the new paths.

Locate the header file rtos_description.h and insert the macro necessary to enable the module. For the full list of macros see this document.

Make sure you have in your project all the configuration files located in STUDIO_SDK_LOC\platform\micrium_os\cfg

Explore the examples listed in Table 1, select the one that you want and follow the corresponding hyperlink.

       The hyperlink will take you to the example's documentation which provides four things:

  • Description: Brief description of the example
  • Configuration: The name of the #define that needs to be defined in ex_description.h
  • Location: The location of the files that need to be included
  • API: The API that needs to be called from your application to start the example

Locate the header file ex_description.h and define the corresponding macro if necessary as described in the example's documentation section: Configuration.

Include in your Simplicity Studio project the required files as listed in the example's documentation section: Location. In this step you can either create a link to the original folder or make a copy of the files and place them in your own workspace directory.

Configure your compiler's include paths with the new paths where the header files are located.

Insert a #include in your application, of the header file where the API to start the example is declared and call the API from your application to get the example started as described in the example's documentation section: API.

 

 

Example

To illustrate the process, I'm going to provide an example where one is interested in running an HTTP server:

Connect the SLSTK3701A and select the example SLSTK3701A_micriumos_net from Simplicity Studio.

Inspect which modules are included in the project by looking at the folder net in the Project Explorer. There you will notice that the module HTTP Server is missing.

Include the HTTP Server module by creating a new Linked Folder located at STUDIO_SDK_LOC\platform\micrium_os\net\source\http\server

Open the new folder Properties and either include or exclude the folder from compilation as necessary from the section C/C++ Build.

Open the Project Properties and insert the location to the new header files ${StudioSdkPath}/app/micrium_os_example/net/http/server in the section C/C++ General -> Paths and Symbols

Locate and open the header file rtos_description.h and insert the following line to enable the new HTTP Server Module: #define  RTOS_MODULE_NET_HTTP_SERVER_AVAIL

Copy the configuration files from STUDIO_SDK_LOC\platform\micrium_os\cfg to your own workspace directory and make sure the compiler is aware of this include path.

Look at Table 1, locate the Example Basic Server That Uses the HTTP Static File System and explore the documentation.

Open the header file ex_description.h and insert the following line to enable the example: #define  EX_HTTP_SERVER_INIT_AVAIL

Create a new Folder named Examples and then create a Linked Folder in it that points to STUDIO_SDK_LOC\app\micrium_os_example\net\http\server

Open the Project Properties and insert the path ${StudioSdkPath}/app/micrium_os_example/net in the section C/C++ General -> Paths and Symbols

Open the file ex_main.c and insert the following line at the top: #include  "http/server/ex_http_server.h"

From the same file ex_main.c, locate the calls to the functions Ex_NetworkInit() and Ex_Net_CoreStartIF() and insert right after them, a call the following API to get the example started: Ex_HTTP_Server_InstanceCreateStaticFS();

 

 

  • Blog Posts
  • Micrium OS
  • Giant Gecko S1
  • 32-bit MCUs
  • 32-bit MCU SDK
  • Microcontrollers

Tags

  • Wireless
  • High Performance Jitter Attenuators
  • EFR32FG22 Series 2 SoCs
  • EFR32MG21 Series 2 SoCs
  • Security
  • Bluegiga Legacy Modules
  • Zigbee SDK
  • ZigBee and Thread
  • EFR32BG13 Series 1 Modules
  • Internet Infrastructure
  • Sensors
  • Wireless Xpress BGX13
  • Blue Gecko Bluetooth Low Energy SoCs
  • Z-Wave
  • Micrium OS
  • Blog Posts
  • Low Jitter Clock Generators
  • Bluetooth Classic
  • Makers
  • Flex SDK
  • Tips and Tricks
  • timing
  • Smart Cities
  • Smart Homes
  • IoT Heroes
  • Reviews
  • RAIL
  • Simplicity Studio
  • Tiny Gecko
  • EFR32MG22 Series 2 SoCs
  • Mighty Gecko SoCs
  • Timing
  • Temperature Sensors
  • Blue Gecko Bluetooth Low Energy Modules
  • Ultra Low Jitter Clock Generators
  • General Purpose Clock Generators
  • EFR32BG22 Series 2 SoCs
  • Industry 4.0
  • Giant Gecko
  • 32-bit MCUs
  • Bluetooth Low Energy
  • 32-bit MCU SDK
  • Gecko
  • Microcontrollers
  • Jitter Attenuators
  • EFR32BG21 Series 2 SoCs
  • News and Events
  • Wi-Fi
  • Bluetooth SDK
  • Community Spotlight
  • Clock Generators
  • Biometric Sensors
  • General Purpose Jitter Attenuators
  • Giant Gecko S1
  • WF200
  • Flex Gecko
  • Internet of Things
  • 8-bit MCUs
  • Wireless Jitter Attenuators
  • Isolation
  • Powered Devices
  • Power

Top Authors

  • Avatar image Siliconlabs
  • Avatar image Jackie Padgett
  • Avatar image Nari Shin
  • Avatar image lynchtron
  • Avatar image deirdrewalsh
  • Avatar image Lance Looper
  • Avatar image lethawicker

Archives

  • 2016 March
  • 2016 April
  • 2016 May
  • 2016 June
  • 2016 July
  • 2016 August
  • 2016 September
  • 2016 October
  • 2016 November
  • 2016 December
  • 2017 January
  • 2017 February
  • 2017 March
  • 2017 April
  • 2017 May
  • 2017 June
  • 2017 July
  • 2017 August
  • 2017 September
  • 2017 October
  • 2017 November
  • 2017 December
  • 2018 January
  • 2018 February
  • 2018 March
  • 2018 April
  • 2018 May
  • 2018 June
  • 2018 July
  • 2018 August
  • 2018 September
  • 2018 October
  • 2018 November
  • 2018 December
  • 2019 January
  • 2019 February
  • 2019 March
  • 2019 April
  • 2019 May
  • 2019 June
  • 2019 July
  • 2019 August
  • 2019 September
  • 2019 October
  • 2019 November
  • 2019 December
  • 2020 January
  • 2020 February
  • 2020 March
  • 2020 April
  • 2020 May
  • 2020 June
  • 2020 July
  • 2020 August
  • 2020 September
  • 2020 October
  • 2020 November
  • 2020 December
  • 2021 January
  • 2021 February
Silicon Labs
Stay Connected With Us
Plug into the latest on Silicon Labs products, including product releases and resources, documentation updates, PCN notifications, upcoming events, and more.
  • About Us
  • Careers
  • Community
  • Contact Us
  • Corporate Responsibility
  • Privacy and Terms
  • Press Room
  • Investor Relations
  • Site Feedback
  • Cookies
Copyright © Silicon Laboratories. All rights reserved.
粤ICP备15107361号
Also of Interest:
  • Bring Your IoT Designs to Life with Smart,...
  • A Guide to IoT Protocols at Works With...
  • IoT Hero Rainus Enhances the In-Store Shopping...