buildstatus codecov donate

Welcome to Simba’s documentation!

Simba is an Embedded Programming Platform. It aims to make embedded programming easy and portable.

Simba is written in C.

Project homepage: https://github.com/eerimoq/simba

Videos

Transmit CAN frames between a Nano32 and an Arduino Due. More videos are available on the Videos page.



Getting Started

Installation

There are three build systems available; PlatformIO, Arduino IDE and Simba build system. The Simba build system has more features than to the other two. It supports executing test suites, generating code coverage, profiling and more. Still, if you are familiar with Arduino IDE or PlatformIO, use that instead since it will be less troublesome.

platformio PlatformIO

Install Simba in PlatformIO.

  1. Install the PlatformIO IDE.
  2. Start the PlatformIO IDE and open PlatformIO -> Project Examples and select simba/blink.
  3. Click on Upload (the arrow image) in the top left corner.
  4. The built-in LED blinks!
  5. Done!
arduino Arduino IDE

Install Simba in the Arduino IDE 1.6.10 as a third party board using the Boards Manager.

  1. Open File -> Preferences.

  2. Add these URL:s to Additional Boards Manager URLs (click on the icon to the right of the text field) and press OK.

    https://raw.githubusercontent.com/eerimoq/simba-releases/master/arduino/avr/package_simba_avr_index.json
    https://raw.githubusercontent.com/eerimoq/simba-releases/master/arduino/sam/package_simba_sam_index.json
    https://raw.githubusercontent.com/eerimoq/simba-releases/master/arduino/esp/package_simba_esp_index.json
    https://raw.githubusercontent.com/eerimoq/simba-releases/master/arduino/esp32/package_simba_esp32_index.json
    
  3. Open Tools -> Board: ... -> Boards Manager... and type simba in the search box.

  4. Click on Simba by Erik Moqivst version x.y.z and click Install and press Close.

  5. Open Tools -> Board: ... -> Boards Manager... and select one of the Simba boards in the list.

  6. Open File -> Examples -> Simba -> blink.

  7. Verify and upload the sketch to your device.

  8. The built-in LED blinks!

  9. Done!

simba Simba build system

The Simba development environment can be installed on Linux (Ubuntu 14).

  1. Execute the one-liner below to install Simba.

    $ mkdir simba && \
      cd simba && \
      sudo apt install ckermit valgrind cppcheck cloc python python-pip doxygen git lcov && \
      sudo apt install avrdude gcc-avr binutils-avr gdb-avr avr-libc && \
      sudo apt install bossa-cli gcc-arm-none-eabi && \
      sudo apt install make unrar autoconf automake libtool gcc g++ gperf \
                           flex bison texinfo gawk ncurses-dev libexpat-dev \
                           python-serial sed libtool-bin pmccabe help2man \
                           python-pyelftools unzip && \
      sudo pip install pyserial xpect readchar sphinx breathe sphinx_rtd_theme && \
      (git clone --recursive https://github.com/pfalcon/esp-open-sdk && \
       cd esp-open-sdk && \
       make) && \
      wget https://github.com/eerimoq/simba-releases/raw/master/arduino/esp32/tools/xtensa-esp32-elf-linux$(getconf LONG_BIT)-1.22.0-59.tar.gz && \
      tar xf xtensa-esp32-elf-linux$(getconf LONG_BIT)-1.22.0-59.tar.gz && \
      rm xtensa-esp32-elf-linux$(getconf LONG_BIT)-1.22.0-59.tar.gz && \
      git clone --recursive https://github.com/eerimoq/simba
    
  2. Setup the environment.

    $ cd simba
    $ source setup.sh
    
  1. Build and upload the blink example to your device. Replace <my-serial-port> with your serial port name.

    $ cd examples/blink
    $ make -s BOARD=nano32 SERIAL_PORT=<my-serial-port> upload
    
  2. The built-in LED blinks!

  3. Done!

Note

Some boards, such as the SPC56D Discovery, require a specific toolchain to build. Such cases are documented on the individual board documentation page.

User Guide

This guide is intended for users of the Simba Embedded Programming Platform and the Simba build system. Parts of the guide is applicable to other build systems as well, in particular the configuration section.

The Simba installation guide can be found on the Getting Started page.

Software architecture

Below is a picture of all packages and their relation to the hardware. At the bottom is the hardware. On top of the hardware is the kernel and drivers packages, which exports a hardware independent interface that other packages and the user application can use. The user application on the right can use any package, and in rare cases directly access the hardware registers.

_images/packages.jpg

Contents:

Environment setup

The first step is always to setup the Simba environment. It’s a simple matter of sourcing a setup-script in the simba root folder.

This step only applies to the Simba build system, and not to the Arduino IDE or PlatformIO.

$ cd simba/simba
$ source setup.sh
Hello World application

Let’s start with the Simba “Hello World” application. It examplifies what an application is and how to build and run it.

It consists of two files; main.c and Makefile.

main.c

main.c defines the application entry function main().

#include "simba.h"

int main()
{
    /* Initialize modules and start the scheduler. */
    sys_start();

    std_printf(FSTR("Hello world!\n"));

    return (0);
}
Makefile

Makefile contains build configuration of the application.

NAME = hello_world
BOARD ?= linux

RUN_END_PATTERN = "Hello world!"
RUN_END_PATTERN_SUCCESS = "Hello world!"

SIMBA_ROOT = ../..
include $(SIMBA_ROOT)/make/app.mk
Build and run

Compile, link and run it by typing the commands below in a shell:

$ cd examples/hello_world
$ make -s run
<build system output>
Hello world!
$

Cross-compile, link and then run on an Arduino Due:

$ cd examples/hello_world
$ make -s BOARD=arduino_due run
<build system output>
Hello world!
$
Applications, packages and modules

Simba has three software components; the application, the package and the module.

Application

An application is an executable consisting of zero or more packages.

myapp
├── main.c
└── Makefile
Development workflow

Build and run often! More to be added, hopefully.

Package

A package is a container of modules.

A package file tree must be organized as seen below. This is required by the build framework and Simba tools.

See the inline comments for details about the files and folders contents.

mypkg
├── mypkg
│   ├── doc                   # package documentation
│   ├── __init__.py
│   ├── src                   # package source code
│   │   ├── mypkg
│   │   │   ├── module1.c
│   │   │   └── module1.h
│   │   ├── mypkg.h           # package header file
│   │   └── mypkg.mk          # package makefile
│   └── tst                   # package test code
│       └── module1
│           ├── main.c
│           └── Makefile
└── setup.py
Development workflow

The package development workflow is fairly straight forward. Suppose we want to add a new module to the file tree above. Create src/mypkg/module2.h and src/mypkg/module2.c, then include mypkg/module2.h in src/mypkg.h and add mypkg/module2.c to the list of source files in src/mypkg.mk. Create a test suite for the module. It consists of the two files tst/module2/main.c and tst/module2/Makefile.

It’s often conveniant to use an existing modules’ files as skeleton for the new module.

After adding the module module2 the file tree looks like this.

mypkg
├── mypkg
│   ├── doc
│   ├── __init__.py
│   ├── src
│   │   ├── mypkg
│   │   │   ├── module1.c
│   │   │   ├── module1.h
│   │   │   ├── module2.c
│   │   │   └── module2.h
│   │   ├── mypkg.h
│   │   └── mypkg.mk
│   └── tst
│       ├── module1
│       │   ├── main.c
│       │   └── Makefile
│       └── module2
│           ├── main.c
│           └── Makefile
└── setup.py

Now, build and run the test suite to make sure the empty module implementation compiles and can be executed.

$ cd tst/module2
$ make -s run

Often the module development is started by implementing the module header file and at the same time write test cases. Test cases are not only useful to make sure the implementation works, but also to see how the module is intended to be used. The module interface becomes cleaner and easier to use it you actually start to use it yourself by writing test cases! All users of your module will benefit from this!

So, now we have an interface and a test suite. It’s time to start the implementation of the module. Usually you write some code, then run the test suite, then fix the code, then run the tests again, then you realize the interface is bad, change it, change the implementation, change the test, change, change... and so it goes on until you are satisfied with the module.

Try to update the comments and documentation during the development process so you don’t have to do it all in the end. It’s actually quite useful for yourself to have comments. You know, you forget how to use your module too!

The documentation generation framework uses doxygen, breathe and sphinx. That means, all comments in the source code should be written for doxygen. Breathe takes the doxygen output as input and creates input for sphinx. Sphinx then generates the html documentation.

Just run make in the doc folder to generate the html documentation.

$ cd doc
$ make
$ firefox _build/html/index.html    # open the docs in firefox
Namespaces

All exported symbols in a package must have the prefix <package>_<module>_. This is needed to avoid namespace clashes between modules with the same name in different packages.

There cannot be two packages with the same name, for the namespace reason. All packages must have unique names! There is one exception though, the three Simba packages; kernel, drivers and slib. Those packages does not have the package name as prefix on exported symbols.

int mypackage_module1_foo(void);

int mypackage_module2_bar(void);
Module

A module is normally a header and a source file.

Configuration
Standard Library

The Library Reference is configured at compile time using defines named CONFIG_*. The default configuration includes most functionality, as most application wants that. If an application has special requirements, for example memory constraints, it has to be configured to remove unnecessaray functionality.

Search order

Highest priority first.

Simba build system
  1. Command line as CDEFS_EXTRA="<configuration variable>=<value>".
  2. A file named config.h in the application root folder.
  3. The default configuration file, src/config_default.h.
PlatformIO
  1. The variable build_flags in platformio.ini as build_flags = -D<configuration variable>=<value>.
  2. A file named config.h in the application source folder src.
  3. The default configuration file, src/config_default.h.
Arduino IDE
  1. A file (also called a tab) named config.h in the sketch.
  2. The default configuration file, src/config_default.h.
Variables

All configuration variables are listed below. Their default values are defined in src/config_default.h.

Defines

CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096

Main thread stack size for ports with a fixed size main thread stack.

CONFIG_SYS_PANIC_KICK_WATCHDOG 0

Kick the watchdog in sys_panic() before writing to the console.

CONFIG_ASSERT 1

Assertions are used to check various conditions during the application execution. A typical usage is to validate function input arguments.

CONFIG_ASSERT_FORCE_FATAL 1

Force all assertions to be fatal.

CONFIG_FATAL_ASSERT 1

Enable fatal assertions, FATAL_ASSERT*().

CONFIG_PANIC_ASSERT 1

Enable panic assertions, PANIC_ASSERT*().

CONFIG_DEBUG 1

Include more debug information.

CONFIG_LINUX_SOCKET_DEVICE 0

Enable linux driver implementations as TCP sockets. Can be used to simulate driver communication in an application running on linux.

CONFIG_ADC 0

Enable the adc driver.

CONFIG_ANALOG_INPUT_PIN 0

Enable the analog_input_pin driver.

CONFIG_ANALOG_OUTPUT_PIN 0

Enable the analog_output_pin driver.

CONFIG_CAN 0

Enable the can driver.

CONFIG_CHIPID 0

Enable the chipid driver.

CONFIG_RANDOM 0

Enable the random driver.

CONFIG_LED_7SEG_HT16K33 0

Enable the led_7seg_ht16k33 driver.

CONFIG_SHT3XD 0

Enable the sht3xd driver.

CONFIG_DAC 0

Enable the dac driver.

CONFIG_DS18B20 0

Enable the ds18b20 driver.

CONFIG_DS3231 0

Enable the ds3231 driver.

CONFIG_ESP_WIFI 0

Enable the esp_wifi driver.

CONFIG_EXTI 0

Enable the exti driver.

CONFIG_FLASH 0

Enable the flash driver.

CONFIG_I2C 0

Enable the i2c driver.

CONFIG_I2C_SOFT 0

Enable the i2c_soft driver.

CONFIG_MCP2515 0

Enable the mcp2515 driver.

CONFIG_NRF24L01 0

Enable the nrf24l01 driver.

CONFIG_OWI 0

Enable the owi driver.

CONFIG_PIN 0

Enable the pin driver.

CONFIG_PWM 0

Enable the pwm driver.

CONFIG_PWM_SOFT 0

Enable the pwm_soft driver.

CONFIG_SD 0

Enable the sd driver.

CONFIG_SPI 0

Enable the spi driver.

CONFIG_UART 1

Enable the uart driver.

CONFIG_UART_SOFT 0

Enable the uart_soft driver.

CONFIG_USB 0

Enable the usb driver.

CONFIG_USB_DEVICE 0

Enable the usb_device driver.

CONFIG_USB_HOST 0

Enable the usb_host driver.

CONFIG_WATCHDOG 0

Enable the watchdog driver.

CONFIG_MODULE_INIT_RWLOCK 1

Initialize the module at system startup.

CONFIG_MODULE_INIT_FS 1

Initialize the fs module at system startup.

CONFIG_MODULE_INIT_SETTINGS 1

Initialize the settings module at system startup.

CONFIG_MODULE_INIT_STD 1

Initialize the std module at system startup.

CONFIG_MODULE_INIT_SEM 1

Initialize the sem module at system startup.

CONFIG_MODULE_INIT_TIMER 1

Initialize the timer module at system startup.

CONFIG_MODULE_INIT_LOG 1

Initialize the log module at system startup.

CONFIG_MODULE_INIT_CHAN 1

Initialize the chan module at system startup.

CONFIG_MODULE_INIT_THRD 1

Initialize the thrd module at system startup.

CONFIG_MODULE_INIT_ADC 0

Initialize the adc driver module at system startup.

CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 0

Initialize the analog_input_pin driver module at system startup.

CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 0

Initialize the analog_output_pin driver module at system startup.

CONFIG_MODULE_INIT_CAN 0

Initialize the can driver module at system startup.

CONFIG_MODULE_INIT_CHIPID 0

Initialize the chipid driver module at system startup.

CONFIG_MODULE_INIT_RANDOM 0

Initialize the random driver module at system startup.

CONFIG_MODULE_INIT_DAC 0

Initialize the dac driver module at system startup.

CONFIG_MODULE_INIT_DS18B20 0

Initialize the ds18b20 driver module at system startup.

CONFIG_MODULE_INIT_DS3231 0

Initialize the ds3231 driver module at system startup.

CONFIG_MODULE_INIT_ESP_WIFI 0

Initialize the esp_wifi driver module at system startup.

CONFIG_MODULE_INIT_EXTI 0

Initialize the exti driver module at system startup.

CONFIG_MODULE_INIT_FLASH 0

Initialize the flash driver module at system startup.

CONFIG_MODULE_INIT_I2C 0

Initialize the i2c driver module at system startup.

CONFIG_MODULE_INIT_I2C_SOFT 0

Initialize the i2c_soft driver module at system startup.

CONFIG_MODULE_INIT_MCP2515 0

Initialize the mcp2515 driver module at system startup.

CONFIG_MODULE_INIT_NRF24L01 0

Initialize the nrf24l01 driver module at system startup.

CONFIG_MODULE_INIT_OWI 0

Initialize the owi driver module at system startup.

CONFIG_MODULE_INIT_PIN 0

Initialize the pin driver module at system startup.

CONFIG_MODULE_INIT_PWM 0

Initialize the pwm driver module at system startup.

CONFIG_MODULE_INIT_PWM_SOFT 0

Initialize the pwm_soft driver module at system startup.

CONFIG_MODULE_INIT_SD 0

Initialize the sd driver module at system startup.

CONFIG_MODULE_INIT_SPI 0

Initialize the spi driver module at system startup.

CONFIG_MODULE_INIT_UART 1

Initialize the uart driver module at system startup.

CONFIG_MODULE_INIT_UART_SOFT 0

Initialize the uart_soft driver module at system startup.

CONFIG_MODULE_INIT_USB 0

Initialize the usb driver module at system startup.

CONFIG_MODULE_INIT_USB_DEVICE 0

Initialize the usb_device driver module at system startup.

CONFIG_MODULE_INIT_USB_HOST 0

Initialize the usb_host driver module at system startup.

CONFIG_MODULE_INIT_WATCHDOG 0

Initialize the watchdog driver module at system startup.

CONFIG_MODULE_INIT_BUS 1

Initialize the bus module at system startup.

CONFIG_MODULE_INIT_INET 1

Initialize the inet module at system startup.

CONFIG_MODULE_INIT_PING 1

Initialize the ping module at system startup.

CONFIG_MODULE_INIT_SOCKET 1

Initialize the socket module at system startup.

CONFIG_MODULE_INIT_NETWORK_INTERFACE 1

Initialize the network_interface module at system startup.

CONFIG_MODULE_INIT_SSL 0

Initialize the ssl module at system startup.

CONFIG_MODULE_INIT_UPGRADE 0

Initialize the upgrade module at system startup.

CONFIG_FS_CMD_DS18B20_LIST 1

Debug file system command to list all DS18B20 sensors on the bus.

CONFIG_FS_CMD_ESP_WIFI_STATUS 0

Debug file system command to print the Espressif WiFi status.

CONFIG_FS_CMD_FS_APPEND 1

Debug file system command to append to a file.

CONFIG_FS_CMD_FS_COUNTERS_LIST 1

Debug file system command to list all counters.

CONFIG_FS_CMD_FS_COUNTERS_RESET 1

Debug file system command to set all counters to zero.

CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 1

Debug file system command to list all registered file systems.

CONFIG_FS_CMD_FS_LIST 1

Debug file system command to list all registered file systems.

CONFIG_FS_CMD_FS_FORMAT 1

Debug file system command to format a file system.

CONFIG_FS_CMD_FS_PARAMETERS_LIST 1

Debug file system command to list all parameters.

CONFIG_FS_CMD_FS_READ 1

Debug file system command to read from a file.

CONFIG_FS_CMD_FS_REMOVE 1

Debug file system command to remove a file.

CONFIG_FS_CMD_FS_WRITE 1

Debug file system command to write to a file.

CONFIG_FS_CMD_I2C_READ 1

Debug file system command to read from a i2c bus.

CONFIG_FS_CMD_I2C_WRITE 1

Debug file system command to write to a i2c bus.

CONFIG_FS_CMD_LOG_LIST 1

Debug file system command to list all log objects.

CONFIG_FS_CMD_LOG_PRINT 1

Debug file system command to create a log entry and print it. Mainly used for debugging.

CONFIG_FS_CMD_LOG_SET_LOG_MASK 1

Debug file system command to set the log mask of a log object.

CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1

Debug file system command to list all network interfaces.

CONFIG_FS_CMD_PIN_READ 1

Debug file system command to read the current value of a pin.

CONFIG_FS_CMD_PIN_SET_MODE 1

Debug file system command to set the mode of a pin.

CONFIG_FS_CMD_PIN_WRITE 1

Debug file system command to write a value to a pin.

CONFIG_FS_CMD_PING_PING 1

Debug file system command to ping a host.

CONFIG_FS_CMD_SERVICE_LIST 1

Debug file system command to list all services.

CONFIG_FS_CMD_SERVICE_START 1

Debug file system command to start a service.

CONFIG_FS_CMD_SERVICE_STOP 1

Debug file system command to stop a services.

CONFIG_FS_CMD_SETTINGS_LIST 1

Debug file system command to list all settings.

CONFIG_FS_CMD_SETTINGS_READ 1

Debug file system command to read the value of a setting.

CONFIG_FS_CMD_SETTINGS_RESET 1

Debug file system command to reset the settings to their original values.

CONFIG_FS_CMD_SETTINGS_WRITE 1

Debug file system command to write a value to a setting.

CONFIG_FS_CMD_SYS_CONFIG 1

Debug file system command to print the system configuration.

CONFIG_FS_CMD_SYS_INFO 1

Debug file system command to print the system information.

CONFIG_FS_CMD_SYS_UPTIME 1

Debug file system command to print the system uptime.

CONFIG_FS_CMD_SYS_PANIC 1

Debug file system command to force a panic of the system.

CONFIG_FS_CMD_SYS_REBOOT 1

Debug file system command to reboot the system.

CONFIG_FS_CMD_SYS_BACKTRACE 1

Debug file system command to print a backtrace.

CONFIG_FS_CMD_THRD_LIST 1

Debug file system command to list threads’ information.

CONFIG_FS_CMD_THRD_SET_LOG_MASK 1

Debug file system command to set the log mask of a thread.

CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1

Debug file system command to enter the application.

CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1

Debug file system command to erase the application.

CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1

Debug file system command to check if the application is valid.

CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1

Debug file system command to enter the bootloader.

CONFIG_FS_CMD_USB_DEVICE_LIST 1

Debug file system command to list all USB devices.

CONFIG_FS_CMD_USB_HOST_LIST 1

Debug file system command to list all USB devices connected to the USB host.

CONFIG_FS_CMD_NVM_READ 1

Debug file system command to read for non-volatile memory.

CONFIG_FS_CMD_NVM_WRITE 1

Debug file system command to write for non-volatile memory.

CONFIG_FS_PATH_MAX 64

The maximum length of an absolute path in the file system.

CONFIG_MONITOR_THREAD 1

Start the monitor thread to gather statistics of the scheulder.

CONFIG_MONITOR_THREAD_PERIOD_US 2000000

Default period of the monitor thread in microseconds.

CONFIG_PREEMPTIVE_SCHEDULER 0

Use a preemptive scheduler.

CONFIG_PROFILE_STACK 1

Profile the stack usage in runtime. It’s a cheap operation and is recommended to have enabled.

CONFIG_SETTINGS_AREA_SIZE 256

Size of the settings area. This size MUST have the same size as the settings generated by the settings.py script.

CONFIG_SETTINGS_BLOB 1

Enable the blob setting type.

CONFIG_SHELL_COMMAND_MAX 64

Maximum number of characters in a shell command.

CONFIG_SHELL_HISTORY_SIZE 768

Size of the shell history buffer.

CONFIG_SHELL_MINIMAL 0

Minimal shell functionality to minimize the code size of the shell module.

CONFIG_SHELL_PROMPT "$ "

The shell prompt string.

CONFIG_SOCKET_RAW 1

Raw socket support.

CONFIG_SPIFFS 0

SPIFFS is a flash file system applicable for boards that has a reasonably big modifiable flash.

CONFIG_FAT16 1

FAT16 is a file system.

CONFIG_FILESYSTEM_GENERIC 1

Generic file system.

CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART

Start the console device (UART/USB CDC) on system startup.

CONFIG_START_CONSOLE_DEVICE_INDEX 0

Console device index.

CONFIG_START_CONSOLE_UART_BAUDRATE 38400

Console UART baudrate.

CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 32

Console UART baudrate.

CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0

Console USB CDC control interface number.

CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2

Console USB CDC input endpoint.

CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3

Console USB CDC output endpoint.

CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1

Wait for the host to connect after starting the console.

CONFIG_START_FILESYSTEM 0

Configure a default file system.

CONFIG_START_FILESYSTEM_ADDRESS 0

Configure a default file system start address.

CONFIG_START_FILESYSTEM_SIZE 65536

Configure a default file system size.

CONFIG_START_NVM 1

Configure a default non-volatile memory.

CONFIG_NVM_SIZE 2040

Non-volatile memory size in bytes.

CONFIG_NVM_EEPROM_SOFT 1

Use the software EEPROM implementation in the non-volatile memory module.

CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384

Non-volatile memory software EEPROM block 0 size. Must be a multiple of CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE.

CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384

Non-volatile memory software EEPROM block 1 size. Must be a multiple of CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE.

CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)

Non-volatile software EEPROM chunk size. Must be a power of two.

CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0

Non-volatile software EEPROM flash device index.

CONFIG_START_NETWORK 0

Setup the ip stack and connect to all configured networks.

CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30

WiFi connect timeout is seconds.

CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID

SSID of the WiFi to connect to.

CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword

Password of the WiFi to connect to.

CONFIG_START_SHELL 1

Start a shell thread communication over the console channels.

CONFIG_START_SHELL_PRIO 30

Shell thread priority.

CONFIG_START_SHELL_STACK_SIZE 768

Shell thread stack size in words.

CONFIG_START_SOAM 0

Start a SOAM thread communication over the console channels.

CONFIG_START_SOAM_PRIO 30

SOAM thread priority.

CONFIG_START_SOAM_STACK_SIZE 840

SOAM thread stack size in words.

CONFIG_STD_OUTPUT_BUFFER_MAX 16

Maximum number of bytes in the print output buffer.

CONFIG_FLOAT 1

Use floating point numbers instead of intergers where applicable.

CONFIG_SYSTEM_TICK_FREQUENCY 100

System tick frequency in Hertz.

CONFIG_SYSTEM_INTERRUPTS 1

Use interrupts.

CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0

Interrupt stack size in bytes. Set to a value greater than zero to enable the interrupt stack.

CONFIG_THRD_CPU_USAGE 1

Calculate thread CPU usage.

CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)

Default thread log mask.

CONFIG_THRD_ENV 1

Each thread has a list of environment variables associated with it. A typical example of an environment variable is “CWD” - Current Working Directory.

CONFIG_THRD_IDLE_STACK_SIZE 1024

Stack size of the idle thread.

CONFIG_THRD_MONITOR_STACK_SIZE 1024

Stack size of the monitor thread.

CONFIG_THRD_SCHEDULED 1

Count the number of times each thread has been scheduled.

CONFIG_THRD_STACK_HEAP 0

Enable the thread stack heap allocator.

CONFIG_THRD_STACK_HEAP_SIZE 0

Size in bytes of the thread stack heap.

CONFIG_THRD_TERMINATE 1

Threads are allowed to terminate.

CONFIG_USB_DEVICE_VID 0x2341

USB device vendor id.

CONFIG_USB_DEVICE_PID 0x8037

USB device product id.

CONFIG_EMACS_COLUMNS_MAX 80

Number of colums in Emacs text editor.

CONFIG_EMACS_ROWS_MAX 24

Number of rows in Emacs text editor.

CONFIG_EMACS_HEAP_SIZE 32768

Heap size of the emacs text editor.

CONFIG_SYSTEM_TICK_SOFTWARE 0

System tick using a software timer instead of a hardware timer. Suitable for ESP8266 to enable software PWM.

CONFIG_HTTP_SERVER_SSL 0

Add support to wrap the HTTP server in SSL, creating a HTTPS server.

CONFIG_HARNESS_SLEEP_MS 300

Sleep in the test harness before executing the first testcase.

CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512

Maximum buffer size the expect function can handle.

CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128

Size of the HTTP server request buffer. This buffer is used when parsing received HTTP request headers.

CONFIG_CRC_TABLE_LOOKUP 1

Use lookup tables for CRC calculations. It is faster, but uses more memory.

CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1

Include the function time_unix_time_to_date().

CONFIG_SOAM_EMBEDDED_DATABASE 0

Embed the SOAM database in the application.

CONFIG_LOG_MASK_SYS LOG_UPTO(INFO)

System module log mask.

CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000

The external oscillator frequency in Hertz.

CONFIG_FLASH_DEVICE_SEMAPHORE 1

Semaphore protected device access in the flash driver module.

lwIP

Use config.h to fully configure lwIP and all of its modules. You do not need to define every option that lwIP provides; if you do not define an option, a default value will be used. Therefore, your config.h provides a way to override much of the behavior of lwIP.

By default Simba overrides a few of the variables in src/inet/lwipopts.h.

Module support (Code size)
Enabling and disabling modules

You can tune your code size by only compiling the features you really need. The following is a list of what gets compiled in “out of the box” with lwIP.

Default inclusions:

  • ARP (LWIP_ARP)
  • IP and fragmentation (IP_FRAG) and reassembly (IP_REASSEMBLY)
  • Raw IP PCB support (LWIP_RAW)
  • UDP (LWIP_UDP) and UDP-Lite (LWIP_UDPLITE)
  • TCP (LWIP_TCP) – this is a big one!
  • Statistics (LWIP_STATS)

Default exclusions:

  • DHCP (LWIP_DHCP)
  • AUTOIP (LWIP_AUTOIP)
  • SNMP (LWIP_SNMP)
  • IGMP (LWIP_IGMP)
  • PPP (PPP_SUPPORT)

If you would like to change this, then you just need to set the options listed below. For example, if you would like to disable UDP and enable DHCP, the following config.h file would do it:

/* Disable UDP */
#define LWIP_UDP 0

/* Enable DHCP */
#define LWIP_DHCP 1
Memory management (RAM usage)
Memory pools

In an embedded environment, memory pools make for fast and efficient memory allocation. lwIP provides a flexible way to manage memory pool sizes and organization.

lwIP reserves a fixed-size static chunk of memory in the data segment, which is subdivided into the various pools that lwip uses for the various data structures. For example, there is a pool just for struct tcp_pcb’s, and another pool just for struct udp_pcb’s. Each pool can be configured to hold a fixed number of data structures; this number can be changed in the config.h file by changing the various MEMP_NUM_* values. For example, MEMP_NUM_TCP_PCB and MEMP_NUM_UDP_PCB control the maximum number of tcp_pcb and udp_pcb structures that can be active in the system at any given time.

It is also possible to create custom memory pools in addition to the standard ones provided by lwIP.

Dynamic allocation: mem_malloc

lwIP uses a custom function mem_malloc for all dynamic allocation; therefore, it is easy to change how lwIP uses its RAM. There are three possibilities provided out-of-the-box:

  1. (default) lwIP’s custom heap-based mem_malloc. By default, lwIP uses a statically-allocated chunk of memory like a heap for all memory operations. Use MEM_SIZE to change the size of the lwIP heap.
  2. C standard library malloc and free. If you wish to have lwIP use the standard library functions provided by your compiler/architecture, then define the option MEM_LIBC_MALLOC.
  3. Memory pools. lwIP can also emulate dynamic allocation using custom memory pools (see that chapter for more information). This involves the options MEM_USE_POOLS and MEMP_USE_CUSTOM_POOLS and a new custom file lwippools.h.
Understanding/changing memory usage

lwIP uses memory for:

  • code (depending on your system, may use ROM instead of RAM)

  • statically allocated variables (some initialized, some not initialized)

  • task stack

  • dynamically allocated memory

    • heap
    • memp pools

Unless you use a C library heap implementation (by defining MEM_LIBC_MALLOC to 1), dynamically allocated memory must be statically allocated somewhere. This means you reserve a specific amount of memory for the heap or the memp pools from which the code dynamically allocates memory at runtime.

The size of this heap and memp pools can be adjusted to save RAM:

There are 3 types of pbufs:

  • REF/ROM, RAM and POOL. PBUF_POOL_SIZE * PBUF_POOL_BUFSIZE only refers to type POOL.
  • RAM pbufs are allocated in the memory defined by MEM_SIZE (this memory is not used much aside from RAM pbufs) - this is the heap and it is allocated as mem_memory.
  • REF/ROM pbufs as well as pcbs and some other stuff is allocated from dedicated pools per structure type. The amount of structures is defined by the various MEMP_NUM_ defines. Together, this memory is allocated as memp_memory and it includes the pbuf POOL.

However, if you define MEMP_MEM_MALLOC to 1 in your config.h, every piece of dynamically allocated memory will come from the heap (the size of which is defined by MEM_SIZE). If you then even define MEM_LIBC_MALLOC to 1, too, lwIP doesn’t need extra memory for dynamically allocated memory but only uses the C library heap instead. However, you then have to make sure that this heap is big enough to run your application.

To tweak the various MEMP_NUM_ defines, define LWIP_STATS=1 and LWIP_STATS_DISPLAY=1 and call stats_display() to see how many entries of each pool are used (or have a look at the global variable lwip_stats instead).

Fine-tuning even more

To see the options that you can set, open 3pp/lwip-1.4.1/src/include/lwip/opt.h. This file is fully commented and explains how many of the options are used.

Build system

The Simba build system is based on GNU Make.

Targets
Name Description
all Compile and link the application.
clean Remove all generated files and folders.
new clean + all
upload all + Upload the application to the device.
console Open a serial console on /dev/arduino with baudrate BAUDRATE.
run all + upload + Wait for application output.
run-debugger Run the application in the debugger, break at main.
report Print the test report from a previous run.
test run + report
release Compile with NASSERT=yes and NDEBUG=yes.
size Print application size information.
help Show the help.
Variables

There are plenty of make variables used to control the build process. Below is a list of the most frequently used variables. The advanced user may read the make files in make.

Name Description
SIMBA_ROOT Path to the Simba root folder.
BOARD The BOARD variable selects which board to build for. It can be assigned
to one of the boards listed here. For example, the command
to build for Arduino Due is make BOARD=arduino_due.
BAUDRATE Serial port baudrate used by console and run targets.
SERIAL_PORT Serial port used by console and run targets.
VERSION The application version string. Usually on the form
<major>.<minor>.<revision>.
SETTINGS_INI Path to the settings file.
INC Include paths.
SRC Source files (.c, .asm, .rs).
CFLAGS_EXTRA Extra flags passed to the compiler.
LDFLAGS_EXTRA Extra flags passed to the linker.
NASSERT Build the application without assertions.
Socket devices

The Linux socket device drivers implementation allows an external program to simulate the hardware. The external program communicates with the Simba application using TCP sockets, one socket for each device.

The Python script socket_device.py can be used to monitor and send data to a device.

Arduino Mega example

In this example socket_device.py is the hardware simulator (to the left in the image below), and socket_device is the Simba application (to the right in the image below). The five horizontal lines each represents input and output of one device.

_images/socket-devices.jpg

First build and run the linux application with the Arduino Mega pinout...

$ make BOARD=linux PINOUT=arduino_mega run

...and then, in a second terminal, monitor digital pin 2, d2.

> socket_device.py pin d2
Connecting to localhost:47000... done.
Requesting pin device d2... done.
$
14:48:10.004512 pin(d2) RX: high
14:48:52.535323 pin(d2) RX: high
14:49:20.123124 pin(d2) RX: low

Alternatively, monitor all devices at the same time with the monitor make target.

$ make BOARD=linux PINOUT=arduino_mega monitor
socket_device.py monitor
Connecting to localhost:47000... done.
Requesting uart device 0... done.
...
Connecting to localhost:47000... done.
Requesting pin device 2... done.
Connecting to localhost:47000... done.
Requesting pin device 4... done.
...
$
14:51:50.531761 pin(2) RX: low
14:51:50.541784 uart(0) RX: b'\n'
14:51:51.178744 pin(4) RX: high
Python modules

There are two Python modules in the folder bin/socket_device in the Simba repository. Both modules implements the same interface as the default Python module/package with the same name, and can be used to communicate over a socket device instead of using the hardware.

Use the environment variable PYTHONPATH to import the socket device modules instead of the default modules/packages.

> export PYTHONPATH=$(readlink -f ${SIMBA_ROOT}/bin)
> export PYTHONPATH=${PYTHONPATH}:$(readlink -f ${SIMBA_ROOT}/bin/socket_device)
> bpython3
>>> import serial
>>> serial
<module 'serial' from '/home/erik/workspace/simba/bin/socket_device/serial.py'>
>>> import can
>>> can
<module 'can' from '/home/erik/workspace/simba/bin/socket_device/can.py'>
>>>
Protocol

At startup the Simba application creates a socket and starts listening for clients on TCP port 47000.

Devices

These drivers supports the socket device protocol at the moment. More to be added when needed.

Uart

The UART socket is equivalent to a serial port, it streams data to and from the application.

Pin

Sends high or low when written to given device. Input is not supported yet.

Pwm

Sends frequency=<value> and duty_cycle=<value> when set on given device.

Can

Sends and receives frames on the format id=<id>,extended=<extended>,size=<size>,data=<data>. <id> and <data> are hexadecimal numbers not prefixed with 0x. size and <extended> is a decimal integers.

> socket_device.py can 0
Connecting to localhost:47000... done.
Requesting can device 0... done.
$ id=00000005,extended=1,size=2,data=0011<Enter>
14:57:22.344321 can(0) TX: id=00000005,extended=1,size=2,data=0011
14:57:22.346321 can(0) RX: id=00000006,extended=1,size=2,data=0112
I2c

Sends and receives data on the format address=<address>,size=<size>,data=<data>. <address> is an decimal integer, while <size> and <data> is a hexadecimal numbers.

> socket_device.py i2c 0
Connecting to localhost:47000... done.
Requesting i2c device 0... done.
$
14:57:22.346321 i2c(0) RX: address=0006,size=0003,data=1a2b3c
Device request message

This message is sent to the Simba application to request a device.

+---------+---------+----------------+
| 4b type | 4b size | <size>b device |
+---------+---------+----------------+

`device` is the device name as a string without NULL termination.

TYPE  SIZE  DESCRIPTION
--------------------------------------
   1     n  Uart device request.
   3     n  Pin device request.
   5     n  Pwm device request.
   7     n  Can device request.
   9     n  I2c device request.
  11     n  Spi device request.
Device response message

This message is the response to the request message.

+---------+---------+-----------+
| 4b type | 4b size | 4b result |
+---------+---------+-----------+

`result` is zero(0) on success, and otherwise a negative error
code.

Defined error codes are:

   ENODEV(19): No device found matching requested device name.

   EADDRINUSE(98): The requested device is already requested and in
                   use.

TYPE  SIZE  DESCRIPTION
--------------------------------------
   2     4  Uart device response.
   4     4  Pin device response.
   6     4  Pwm device response.
   8     4  Can device response.
  10     4  I2c device response.
  12     4  Spi device response.

Developer Guide

This guide is intended for developers of the Simba Embedded Programming Platform. Users are advised to read the User Guide instead.

Contents:

Boards and mcus

A board is the top level configuration entity in the build framework. It contains information about the MCU and the pin mapping.

In turn, the MCU contains information about available devices and clock frequencys in the microcontroller.

See src/boards/ and src/mcus for available configurations.

Only one MCU per board is supported. If there are two MCU:s on one physical board, two board configurations have to be created, one for each MCU.

The porting guide Porting shows how to port Simba to a new board.

Threads and channels

A thread is the basic execution entity. A scheduler controls the execution of threads.

A simple thread that waits for an event from another thread.

#include "simba.h"

struct event_t event;

void *my_thread_main(void *arg_p)
{
    uint32_t mask;

    while (1) {
        mask = 0x1;
        event_read(&event, &mask, sizeof(mask));

        std_printf(FSTR("Event received!\r\n"));
    }

    return (NULL);
}

Threads usually communicates over channels. There are many kinds of channels; queue, socket and event, to mention a few. All three implementing the same abstract channel interface (see src/sync/chan.h). This abstraction makes channel very powerful as a synchronization primitive. They can be seen as limited functionality file descriptors in linux.

The most common channel is the queue — Queue channel. It can be either synchronous or semi-asynchronous. In the synchronous version the writing thread will block until all written data has been read by the reader. In the semi-asynchronous version the writer writes to a buffer within the queue, and only blocks all data does not fit in the buffer. The buffer size is selected by the application.

File tree

This is the file tree of the Simba repository.

simba                    - this directory
├── 3pp                  - third party products
├── bin                  - executables and scripts
├── doc                  - documentation source
├── environment          - environment setup
├── examples             - example applications
├── LICENSE              - license
├── make                 - build and run files
├── README.rst           - readme
├── setup.sh             - setup script
├── src                  - source code directory
│   ├── alloc            - alloc package
│   ├── boards           - board configurations
│   ├── collections      - collections package
│   ├── debug            - debug package
│   ├── drivers          - drivers package
│   ├── encode           - encode package
│   ├── filesystems      - filesystems package
│   ├── hash             - hash package
│   ├── inet             - inet package
│   ├── kernel           - kernel package
│   ├── mcus             - mcu configurations
│   ├── multimedia       - multimedia package
│   ├── oam              - oam package
│   ├── sync             - sync package
│   ├── text             - text package
│   ├── simba.h          - includes all package headers
│   └── simba.mk         - build system configuration
├── tst                  - test suites
│   ├── alloc            - alloc package test suite
│   ├── collections      - collections package test suite
│   ├── debug            - debug package test suite
│   ├── drivers          - drivers package test suite
│   ├── encode           - encode package test suite
│   ├── filesystems      - filesystems package test suite
│   ├── hash             - hash package test suite
│   ├── inet             - inet package test suite
│   ├── kernel           - kernel package test suite
│   ├── multimedia       - multimedia package test suite
│   ├── oam              - oam package test suite
│   ├── sync             - sync package test suite
│   └── text             - text package test suite
└── VERSION.txt          - `Simba` version

Testing

To ensure high code quility each release is tested extensively by many test suites. The test suites are executed both on native Linux and on many of the supported boards. See Test suites for a list of all test suites that are executed before each release.

The native Linux test suites are executed automatically on each commit.

Test result: https://travis-ci.org/eerimoq/simba

Code coverage: https://codecov.io/gh/eerimoq/simba

Unit tests

Each module shall have unit tests to verify that the implementation works as expected and that future refactoring does not break legacy.

All unit tests except low level drivers and networking are hardware independent. This makes it possible to use common Linux tools (gcov, valgrind, gdb, etc.) to debug and gather statistics of a module, which is very useful.

For low level drivers where the majority of the code is hardware specific (ports folder), testing on real hardware is important. It’s preferable to have a hardware independent test suite with stubbed interfaces for drivers without any port specific code, and having an example application in examples to test on real hardware.

All unit tests are found in the tst folder.

Hardware setup

Below is a picture of all supported boards connected to a USB hub. The USB hub is connected to a linux PC (not in the picture) that executes test suites on all boards.

A short description of the setup:

  • The DS3231 device (on the breadboard to the left) is connected over i2c to the Arduino Mega.
  • CAN0 is connected to CAN1 on the Arduino Due. The CAN driver is tested by sending frames between the two CAN devices.
  • The UART of the STM32VLDISCOVERY board is connected to a serial to USB adaptor. DTR on the adaptor is used to reset the board.
  • The ESP-12E Development Board also has a serial to USB adaptor connected. RTS is used to set the board in flashing mode (GPIO0) and DTR is used to reset the board (REST).
Test suites

Below is a list of all test suites that are executed before every release. They are listed per board.

Arduino Uno
ESP-01
ESP-12E Development Board
ESP32-DevKitC
Adafruit HUZZAH ESP8266 breakout
Maple-ESP32
STM32F3DISCOVERY
WEMOS D1 mini

Releasing

Follow these steps to create a new release:

  1. Write the new version in VERSION.txt. The version should hace the format <major>.<minor>.<revision>.

    Increment <major> for non-backwards compatible changes.

    Increment <minor> for new features.

    Increment <revision> for bug fixes.

  2. Write the new version in package.json. This file is used by PlatformIO 3 to find the current Simba release.

  3. Run the test suites and generate the documentation and other files.

    make -s -j8 test-all-boards
    make -s -j8 release-test
    
  4. Commit the generated files and tag the commit with <major>.<minor>.<revision>.

  5. Generate files for Arduino and PlatformIO releases. The generated archives and Arduino manifests are copied to the release repository.

    make -s release
    
  6. Add, commit and push the Simba Arduino releases in the release repository.

    (cd ../simba-releases && \
     git add arduino/*/*.zip platformio/*.zip && \
     git commit && \
     git push origin master)
    
  7. Start a http server used to download package manifests in the Arduino IDE.

    (cd make/arduino && python -m SimpleHTTPServer)
    
  8. Start the Arduino IDE and add these URL:s in Preferences.

    http://localhost:8000/avr/package_simba_avr_index.json
    http://localhost:8000/esp/package_simba_esp_index.json
    http://localhost:8000/esp32/package_simba_esp32_index.json
    http://localhost:8000/sam/package_simba_sam_index.json
    
  9. Install all four packages and run the blink example for each one of them.

  10. Commit and push.

  11. Add, commit and push the Simba Arduino package manifests in the release repository.

(cd ../simba-releases && \
 git add arduino/*/*.json && \
 git commit && \
 git push origin master)
  1. Done.

Porting

Adding a new board

Often the board you want to use in your project is not yet supported by Simba. If you are lucky, Simba is already ported to the MCU on your board. Just create a folder with you board name in src/boards/ and populate it with the board.h, board.c and board.mk. Also, create board documentation in doc/boards/, and add a pinout image in doc/images/boards/.

The same files as a file tree:

simba/
+-- doc/
|   +-- boards/
|   |   +-- <board-name>.rst
|   +-- images/
|       +-- boards/
|           +-- <board-name>-pinout.jpg
+-- src/
    +-- boards/
        +-- <board-name>.h
        +-- <board-name>.c
        +-- <board-name>.mk

If Simba is not ported to your MCU, the kernel and drivers has to be ported.

Kernel

Porting the kernel is a matter of configuring the system tick timer and inplement a few locking primitives. If you are familiar with your CPU, the port can be implemented quickly.

A kernel port is roughly 400 lines of code.

Kernel ports are implemented in src/kernel/ports.

Drivers

The required work to port the drivers depends of which drivers you are intrested in. The more drivers you have to port, the longer time it takes, obviously.

A drivers port is roughly 200 lines of code per driver.

Drivers ports are implemented in src/drivers/ports.

Boards

The boards supported by Simba.

Arduino Due

Pinout
_images/arduino-due-pinout.png
Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the Arduino Due module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 6144 1672
default-configuration 128000 10194
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 1
CONFIG_ANALOG_INPUT_PIN 1
CONFIG_ANALOG_OUTPUT_PIN 0
CONFIG_ASSERT 1
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 1
CONFIG_CHIPID 1
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 1
CONFIG_DEBUG 1
CONFIG_DS18B20 1
CONFIG_DS3231 0
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 0
CONFIG_EXTI 1
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 1
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 1
CONFIG_FS_CMD_ESP_WIFI_STATUS 0
CONFIG_FS_CMD_FS_APPEND 1
CONFIG_FS_CMD_FS_COUNTERS_LIST 1
CONFIG_FS_CMD_FS_COUNTERS_RESET 1
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 1
CONFIG_FS_CMD_FS_FORMAT 1
CONFIG_FS_CMD_FS_LIST 1
CONFIG_FS_CMD_FS_PARAMETERS_LIST 1
CONFIG_FS_CMD_FS_READ 1
CONFIG_FS_CMD_FS_REMOVE 1
CONFIG_FS_CMD_FS_WRITE 1
CONFIG_FS_CMD_I2C_READ 1
CONFIG_FS_CMD_I2C_WRITE 1
CONFIG_FS_CMD_LOG_LIST 1
CONFIG_FS_CMD_LOG_PRINT 1
CONFIG_FS_CMD_LOG_SET_LOG_MASK 1
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 1
CONFIG_FS_CMD_PIN_SET_MODE 1
CONFIG_FS_CMD_PIN_WRITE 1
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 1
CONFIG_FS_CMD_SETTINGS_READ 1
CONFIG_FS_CMD_SETTINGS_RESET 1
CONFIG_FS_CMD_SETTINGS_WRITE 1
CONFIG_FS_CMD_SYS_BACKTRACE 1
CONFIG_FS_CMD_SYS_CONFIG 1
CONFIG_FS_CMD_SYS_INFO 1
CONFIG_FS_CMD_SYS_PANIC 1
CONFIG_FS_CMD_SYS_REBOOT 1
CONFIG_FS_CMD_SYS_UPTIME 1
CONFIG_FS_CMD_THRD_LIST 1
CONFIG_FS_CMD_THRD_SET_LOG_MASK 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 1
CONFIG_FS_CMD_USB_HOST_LIST 1
CONFIG_FS_PATH_MAX 64
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 0
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 0
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_MCP2515 1
CONFIG_MODULE_INIT_ADC 1
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 1
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 0
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 1
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 1
CONFIG_MODULE_INIT_DAC 1
CONFIG_MODULE_INIT_DS18B20 1
CONFIG_MODULE_INIT_DS3231 0
CONFIG_MODULE_INIT_ESP_WIFI 0
CONFIG_MODULE_INIT_EXTI 1
CONFIG_MODULE_INIT_FLASH 1
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 0
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 1
CONFIG_MODULE_INIT_NETWORK_INTERFACE 0
CONFIG_MODULE_INIT_NRF24L01 0
CONFIG_MODULE_INIT_OWI 1
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 0
CONFIG_MODULE_INIT_PWM 0
CONFIG_MODULE_INIT_PWM_SOFT 0
CONFIG_MODULE_INIT_RANDOM 0
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 1
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 0
CONFIG_MODULE_INIT_SPI 1
CONFIG_MODULE_INIT_SSL 0
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 0
CONFIG_MODULE_INIT_UPGRADE 0
CONFIG_MODULE_INIT_USB 1
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 1
CONFIG_MODULE_INIT_WATCHDOG 0
CONFIG_MONITOR_THREAD 1
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 0
CONFIG_OWI 1
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 0
CONFIG_PWM_SOFT 0
CONFIG_RANDOM 0
CONFIG_SD 1
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 0
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 0
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SOFTWARE_I2C 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 1
CONFIG_SPIFFS 1
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 115200
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 32
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 1
CONFIG_START_FILESYSTEM_ADDRESS 0x000e0000
CONFIG_START_FILESYSTEM_SIZE 32768
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_SHELL 1
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 1536
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 1536
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 0
CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_ENV 1
CONFIG_THRD_IDLE_STACK_SIZE 384
CONFIG_THRD_MONITOR_STACK_SIZE 512
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 0
CONFIG_USB 1
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 1
CONFIG_WATCHDOG 0
Mcu

sam3x8e

Arduino Mega

Pinout
_images/arduino-mega-pinout.png
Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the Arduino Mega module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 1734 278
default-configuration 64282 3750
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 1
CONFIG_ANALOG_INPUT_PIN 1
CONFIG_ANALOG_OUTPUT_PIN 1
CONFIG_ASSERT 1
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 0
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 0
CONFIG_DEBUG 1
CONFIG_DS18B20 1
CONFIG_DS3231 1
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 0
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 1
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 0
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 1
CONFIG_FS_CMD_ESP_WIFI_STATUS 0
CONFIG_FS_CMD_FS_APPEND 1
CONFIG_FS_CMD_FS_COUNTERS_LIST 1
CONFIG_FS_CMD_FS_COUNTERS_RESET 1
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 1
CONFIG_FS_CMD_FS_FORMAT 1
CONFIG_FS_CMD_FS_LIST 1
CONFIG_FS_CMD_FS_PARAMETERS_LIST 1
CONFIG_FS_CMD_FS_READ 1
CONFIG_FS_CMD_FS_REMOVE 1
CONFIG_FS_CMD_FS_WRITE 1
CONFIG_FS_CMD_I2C_READ 1
CONFIG_FS_CMD_I2C_WRITE 1
CONFIG_FS_CMD_LOG_LIST 1
CONFIG_FS_CMD_LOG_PRINT 1
CONFIG_FS_CMD_LOG_SET_LOG_MASK 1
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 1
CONFIG_FS_CMD_PIN_SET_MODE 1
CONFIG_FS_CMD_PIN_WRITE 1
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 1
CONFIG_FS_CMD_SETTINGS_READ 1
CONFIG_FS_CMD_SETTINGS_RESET 1
CONFIG_FS_CMD_SETTINGS_WRITE 1
CONFIG_FS_CMD_SYS_BACKTRACE 1
CONFIG_FS_CMD_SYS_CONFIG 1
CONFIG_FS_CMD_SYS_INFO 1
CONFIG_FS_CMD_SYS_PANIC 1
CONFIG_FS_CMD_SYS_REBOOT 1
CONFIG_FS_CMD_SYS_UPTIME 1
CONFIG_FS_CMD_THRD_LIST 1
CONFIG_FS_CMD_THRD_SET_LOG_MASK 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 1
CONFIG_FS_CMD_USB_HOST_LIST 1
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 0
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 0
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS LOG_UPTO(INFO)
CONFIG_MCP2515 1
CONFIG_MODULE_INIT_ADC 1
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 1
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 1
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 0
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 0
CONFIG_MODULE_INIT_DS18B20 1
CONFIG_MODULE_INIT_DS3231 1
CONFIG_MODULE_INIT_ESP_WIFI 0
CONFIG_MODULE_INIT_EXTI 1
CONFIG_MODULE_INIT_FLASH 0
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 0
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 1
CONFIG_MODULE_INIT_NETWORK_INTERFACE 0
CONFIG_MODULE_INIT_NRF24L01 1
CONFIG_MODULE_INIT_OWI 1
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 0
CONFIG_MODULE_INIT_PWM 1
CONFIG_MODULE_INIT_PWM_SOFT 1
CONFIG_MODULE_INIT_RANDOM 0
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 1
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 0
CONFIG_MODULE_INIT_SPI 1
CONFIG_MODULE_INIT_SSL 0
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 1
CONFIG_MODULE_INIT_UPGRADE 0
CONFIG_MODULE_INIT_USB 0
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 1
CONFIG_MONITOR_THREAD 1
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 1
CONFIG_NVM_EEPROM_SOFT 0
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0
CONFIG_NVM_SIZE 256
CONFIG_OWI 1
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 1
CONFIG_PWM_SOFT 1
CONFIG_RANDOM 0
CONFIG_SD 1
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 0
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 0
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 1
CONFIG_SPIFFS 0
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 38400
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 32
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 0
CONFIG_START_FILESYSTEM_ADDRESS 0
CONFIG_START_FILESYSTEM_SIZE 65536
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 1
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 768
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 840
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 0
CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 1
CONFIG_THRD_IDLE_STACK_SIZE 156
CONFIG_THRD_MONITOR_STACK_SIZE 256
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 1
CONFIG_USB 0
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 1

Arduino Nano

Pinout
_images/arduino-nano-pinout.png
Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the Arduino Nano module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 1548 278
default-configuration 13168 801
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 1
CONFIG_ANALOG_INPUT_PIN 1
CONFIG_ANALOG_OUTPUT_PIN 1
CONFIG_ASSERT 0
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 0
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 0
CONFIG_DEBUG 1
CONFIG_DS18B20 1
CONFIG_DS3231 1
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 0
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 1
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 0
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 0
CONFIG_FS_CMD_ESP_WIFI_STATUS 0
CONFIG_FS_CMD_FS_APPEND 0
CONFIG_FS_CMD_FS_COUNTERS_LIST 0
CONFIG_FS_CMD_FS_COUNTERS_RESET 0
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 0
CONFIG_FS_CMD_FS_FORMAT 0
CONFIG_FS_CMD_FS_LIST 0
CONFIG_FS_CMD_FS_PARAMETERS_LIST 0
CONFIG_FS_CMD_FS_READ 0
CONFIG_FS_CMD_FS_REMOVE 0
CONFIG_FS_CMD_FS_WRITE 0
CONFIG_FS_CMD_I2C_READ 0
CONFIG_FS_CMD_I2C_WRITE 0
CONFIG_FS_CMD_LOG_LIST 0
CONFIG_FS_CMD_LOG_PRINT 0
CONFIG_FS_CMD_LOG_SET_LOG_MASK 0
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 0
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 0
CONFIG_FS_CMD_PIN_SET_MODE 0
CONFIG_FS_CMD_PIN_WRITE 0
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 0
CONFIG_FS_CMD_SETTINGS_READ 0
CONFIG_FS_CMD_SETTINGS_RESET 0
CONFIG_FS_CMD_SETTINGS_WRITE 0
CONFIG_FS_CMD_SYS_BACKTRACE 0
CONFIG_FS_CMD_SYS_CONFIG 0
CONFIG_FS_CMD_SYS_INFO 0
CONFIG_FS_CMD_SYS_PANIC 0
CONFIG_FS_CMD_SYS_REBOOT 0
CONFIG_FS_CMD_SYS_UPTIME 0
CONFIG_FS_CMD_THRD_LIST 0
CONFIG_FS_CMD_THRD_SET_LOG_MASK 0
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 0
CONFIG_FS_CMD_USB_HOST_LIST 0
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 0
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 0
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS -1
CONFIG_MCP2515 1
CONFIG_MODULE_INIT_ADC 1
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 1
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 1
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 0
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 0
CONFIG_MODULE_INIT_DS18B20 1
CONFIG_MODULE_INIT_DS3231 1
CONFIG_MODULE_INIT_ESP_WIFI 0
CONFIG_MODULE_INIT_EXTI 1
CONFIG_MODULE_INIT_FLASH 0
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 0
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 1
CONFIG_MODULE_INIT_NETWORK_INTERFACE 0
CONFIG_MODULE_INIT_NRF24L01 1
CONFIG_MODULE_INIT_OWI 1
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 0
CONFIG_MODULE_INIT_PWM 1
CONFIG_MODULE_INIT_PWM_SOFT 1
CONFIG_MODULE_INIT_RANDOM 0
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 1
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 0
CONFIG_MODULE_INIT_SPI 1
CONFIG_MODULE_INIT_SSL 0
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 1
CONFIG_MODULE_INIT_UPGRADE 0
CONFIG_MODULE_INIT_USB 0
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 1
CONFIG_MONITOR_THREAD 0
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 1
CONFIG_NVM_EEPROM_SOFT 0
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0
CONFIG_NVM_SIZE 256
CONFIG_OWI 1
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 1
CONFIG_PWM_SOFT 1
CONFIG_RANDOM 0
CONFIG_SD 1
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 1
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 0
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 1
CONFIG_SPIFFS 0
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 38400
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 32
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 0
CONFIG_START_FILESYSTEM_ADDRESS 0
CONFIG_START_FILESYSTEM_SIZE 65536
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 0
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 768
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 840
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 0
CONFIG_SYS_CONFIG_STRING 0
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 0
CONFIG_THRD_IDLE_STACK_SIZE 156
CONFIG_THRD_MONITOR_STACK_SIZE 256
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 1
CONFIG_USB 0
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 1

Arduino Pro Micro

Pinout
_images/arduino-pro-micro-pinout.png
Enter the bootloader

Recover a bricked board by entering the bootloader.

  1. Power up the board.
  2. Connect RST to GND for a second to enter the bootloader and stay in it for 8 seconds.
Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the Arduino Pro Micro module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 6472 519
default-configuration 14932 930
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 1
CONFIG_ANALOG_INPUT_PIN 1
CONFIG_ANALOG_OUTPUT_PIN 1
CONFIG_ASSERT 0
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 0
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 0
CONFIG_DEBUG 1
CONFIG_DS18B20 1
CONFIG_DS3231 1
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 0
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 1
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 0
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 0
CONFIG_FS_CMD_ESP_WIFI_STATUS 0
CONFIG_FS_CMD_FS_APPEND 0
CONFIG_FS_CMD_FS_COUNTERS_LIST 0
CONFIG_FS_CMD_FS_COUNTERS_RESET 0
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 0
CONFIG_FS_CMD_FS_FORMAT 0
CONFIG_FS_CMD_FS_LIST 0
CONFIG_FS_CMD_FS_PARAMETERS_LIST 0
CONFIG_FS_CMD_FS_READ 0
CONFIG_FS_CMD_FS_REMOVE 0
CONFIG_FS_CMD_FS_WRITE 0
CONFIG_FS_CMD_I2C_READ 0
CONFIG_FS_CMD_I2C_WRITE 0
CONFIG_FS_CMD_LOG_LIST 0
CONFIG_FS_CMD_LOG_PRINT 0
CONFIG_FS_CMD_LOG_SET_LOG_MASK 0
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 0
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 0
CONFIG_FS_CMD_PIN_SET_MODE 0
CONFIG_FS_CMD_PIN_WRITE 0
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 0
CONFIG_FS_CMD_SETTINGS_READ 0
CONFIG_FS_CMD_SETTINGS_RESET 0
CONFIG_FS_CMD_SETTINGS_WRITE 0
CONFIG_FS_CMD_SYS_BACKTRACE 0
CONFIG_FS_CMD_SYS_CONFIG 0
CONFIG_FS_CMD_SYS_INFO 0
CONFIG_FS_CMD_SYS_PANIC 0
CONFIG_FS_CMD_SYS_REBOOT 0
CONFIG_FS_CMD_SYS_UPTIME 0
CONFIG_FS_CMD_THRD_LIST 0
CONFIG_FS_CMD_THRD_SET_LOG_MASK 0
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 0
CONFIG_FS_CMD_USB_HOST_LIST 0
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 0
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 0
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS -1
CONFIG_MCP2515 1
CONFIG_MODULE_INIT_ADC 1
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 1
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 1
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 0
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 0
CONFIG_MODULE_INIT_DS18B20 1
CONFIG_MODULE_INIT_DS3231 1
CONFIG_MODULE_INIT_ESP_WIFI 0
CONFIG_MODULE_INIT_EXTI 1
CONFIG_MODULE_INIT_FLASH 0
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 0
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 1
CONFIG_MODULE_INIT_NETWORK_INTERFACE 0
CONFIG_MODULE_INIT_NRF24L01 1
CONFIG_MODULE_INIT_OWI 1
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 0
CONFIG_MODULE_INIT_PWM 1
CONFIG_MODULE_INIT_PWM_SOFT 1
CONFIG_MODULE_INIT_RANDOM 0
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 1
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 0
CONFIG_MODULE_INIT_SPI 1
CONFIG_MODULE_INIT_SSL 0
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 1
CONFIG_MODULE_INIT_UPGRADE 0
CONFIG_MODULE_INIT_USB 1
CONFIG_MODULE_INIT_USB_DEVICE 1
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 1
CONFIG_MONITOR_THREAD 0
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 1
CONFIG_NVM_EEPROM_SOFT 0
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0
CONFIG_NVM_SIZE 256
CONFIG_OWI 1
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 1
CONFIG_PWM_SOFT 1
CONFIG_RANDOM 0
CONFIG_SD 1
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 1
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 0
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 1
CONFIG_SPIFFS 0
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_USB_CDC
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 38400
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 32
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 0
CONFIG_START_FILESYSTEM_ADDRESS 0
CONFIG_START_FILESYSTEM_SIZE 65536
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 0
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 768
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 840
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 0
CONFIG_SYS_CONFIG_STRING 0
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 0
CONFIG_THRD_IDLE_STACK_SIZE 156
CONFIG_THRD_MONITOR_STACK_SIZE 256
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 1
CONFIG_USB 1
CONFIG_USB_DEVICE 1
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 1

Arduino Uno

Pinout
_images/arduino-uno-pinout.png
Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the Arduino Uno module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 1548 278
default-configuration 13168 801
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 1
CONFIG_ANALOG_INPUT_PIN 1
CONFIG_ANALOG_OUTPUT_PIN 1
CONFIG_ASSERT 0
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 0
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 0
CONFIG_DEBUG 1
CONFIG_DS18B20 1
CONFIG_DS3231 1
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 0
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 1
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 0
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 0
CONFIG_FS_CMD_ESP_WIFI_STATUS 0
CONFIG_FS_CMD_FS_APPEND 0
CONFIG_FS_CMD_FS_COUNTERS_LIST 0
CONFIG_FS_CMD_FS_COUNTERS_RESET 0
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 0
CONFIG_FS_CMD_FS_FORMAT 0
CONFIG_FS_CMD_FS_LIST 0
CONFIG_FS_CMD_FS_PARAMETERS_LIST 0
CONFIG_FS_CMD_FS_READ 0
CONFIG_FS_CMD_FS_REMOVE 0
CONFIG_FS_CMD_FS_WRITE 0
CONFIG_FS_CMD_I2C_READ 0
CONFIG_FS_CMD_I2C_WRITE 0
CONFIG_FS_CMD_LOG_LIST 0
CONFIG_FS_CMD_LOG_PRINT 0
CONFIG_FS_CMD_LOG_SET_LOG_MASK 0
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 0
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 0
CONFIG_FS_CMD_PIN_SET_MODE 0
CONFIG_FS_CMD_PIN_WRITE 0
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 0
CONFIG_FS_CMD_SETTINGS_READ 0
CONFIG_FS_CMD_SETTINGS_RESET 0
CONFIG_FS_CMD_SETTINGS_WRITE 0
CONFIG_FS_CMD_SYS_BACKTRACE 0
CONFIG_FS_CMD_SYS_CONFIG 0
CONFIG_FS_CMD_SYS_INFO 0
CONFIG_FS_CMD_SYS_PANIC 0
CONFIG_FS_CMD_SYS_REBOOT 0
CONFIG_FS_CMD_SYS_UPTIME 0
CONFIG_FS_CMD_THRD_LIST 0
CONFIG_FS_CMD_THRD_SET_LOG_MASK 0
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 0
CONFIG_FS_CMD_USB_HOST_LIST 0
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 0
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 0
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS -1
CONFIG_MCP2515 1
CONFIG_MODULE_INIT_ADC 1
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 1
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 1
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 0
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 0
CONFIG_MODULE_INIT_DS18B20 1
CONFIG_MODULE_INIT_DS3231 1
CONFIG_MODULE_INIT_ESP_WIFI 0
CONFIG_MODULE_INIT_EXTI 1
CONFIG_MODULE_INIT_FLASH 0
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 0
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 1
CONFIG_MODULE_INIT_NETWORK_INTERFACE 0
CONFIG_MODULE_INIT_NRF24L01 1
CONFIG_MODULE_INIT_OWI 1
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 0
CONFIG_MODULE_INIT_PWM 1
CONFIG_MODULE_INIT_PWM_SOFT 1
CONFIG_MODULE_INIT_RANDOM 0
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 1
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 0
CONFIG_MODULE_INIT_SPI 1
CONFIG_MODULE_INIT_SSL 0
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 1
CONFIG_MODULE_INIT_UPGRADE 0
CONFIG_MODULE_INIT_USB 0
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 1
CONFIG_MONITOR_THREAD 0
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 1
CONFIG_NVM_EEPROM_SOFT 0
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0
CONFIG_NVM_SIZE 256
CONFIG_OWI 1
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 1
CONFIG_PWM_SOFT 1
CONFIG_RANDOM 0
CONFIG_SD 1
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 1
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 0
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 1
CONFIG_SPIFFS 0
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 38400
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 32
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 0
CONFIG_START_FILESYSTEM_ADDRESS 0
CONFIG_START_FILESYSTEM_SIZE 65536
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 0
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 768
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 840
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 0
CONFIG_SYS_CONFIG_STRING 0
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 0
CONFIG_THRD_IDLE_STACK_SIZE 156
CONFIG_THRD_MONITOR_STACK_SIZE 256
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 1
CONFIG_USB 0
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 1

ESP-01

Pinout
_images/esp01-pinout.png
Flashing
  1. Connect VCC to 3.3 V and GND to ground.
  2. Connect GPIO0 to GND.
  3. Connect EN/CHPH to 3.3 V.
  4. Turn on the power.
  5. Upload the software to Flash using esptool.
Boot from flash
  1. Connect VCC to 3.3 V and GND to ground.
  2. Connect GPIO0 to 3.3 V.
  3. Connect EN/CHPH to 3.3 V.
  4. Turn on the power.
Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the ESP-01 module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 265804 33992
default-configuration 311796 46852
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 1
CONFIG_ANALOG_INPUT_PIN 1
CONFIG_ANALOG_OUTPUT_PIN 0
CONFIG_ASSERT 0
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 0
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 0
CONFIG_DEBUG 1
CONFIG_DS18B20 1
CONFIG_DS3231 1
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 1
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 1
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 1
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 1
CONFIG_FS_CMD_ESP_WIFI_STATUS 1
CONFIG_FS_CMD_FS_APPEND 1
CONFIG_FS_CMD_FS_COUNTERS_LIST 1
CONFIG_FS_CMD_FS_COUNTERS_RESET 1
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 1
CONFIG_FS_CMD_FS_FORMAT 1
CONFIG_FS_CMD_FS_LIST 1
CONFIG_FS_CMD_FS_PARAMETERS_LIST 1
CONFIG_FS_CMD_FS_READ 1
CONFIG_FS_CMD_FS_REMOVE 1
CONFIG_FS_CMD_FS_WRITE 1
CONFIG_FS_CMD_I2C_READ 1
CONFIG_FS_CMD_I2C_WRITE 1
CONFIG_FS_CMD_LOG_LIST 1
CONFIG_FS_CMD_LOG_PRINT 1
CONFIG_FS_CMD_LOG_SET_LOG_MASK 1
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 1
CONFIG_FS_CMD_PIN_SET_MODE 1
CONFIG_FS_CMD_PIN_WRITE 1
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 1
CONFIG_FS_CMD_SETTINGS_READ 1
CONFIG_FS_CMD_SETTINGS_RESET 1
CONFIG_FS_CMD_SETTINGS_WRITE 1
CONFIG_FS_CMD_SYS_BACKTRACE 1
CONFIG_FS_CMD_SYS_CONFIG 1
CONFIG_FS_CMD_SYS_INFO 1
CONFIG_FS_CMD_SYS_PANIC 1
CONFIG_FS_CMD_SYS_REBOOT 1
CONFIG_FS_CMD_SYS_UPTIME 1
CONFIG_FS_CMD_THRD_LIST 1
CONFIG_FS_CMD_THRD_SET_LOG_MASK 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 1
CONFIG_FS_CMD_USB_HOST_LIST 1
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 0
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 1
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS LOG_UPTO(INFO)
CONFIG_MCP2515 0
CONFIG_MODULE_INIT_ADC 1
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 1
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 0
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 0
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 0
CONFIG_MODULE_INIT_DS18B20 1
CONFIG_MODULE_INIT_DS3231 1
CONFIG_MODULE_INIT_ESP_WIFI 1
CONFIG_MODULE_INIT_EXTI 1
CONFIG_MODULE_INIT_FLASH 1
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 1
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 0
CONFIG_MODULE_INIT_NETWORK_INTERFACE 1
CONFIG_MODULE_INIT_NRF24L01 0
CONFIG_MODULE_INIT_OWI 1
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 1
CONFIG_MODULE_INIT_PWM 0
CONFIG_MODULE_INIT_PWM_SOFT 1
CONFIG_MODULE_INIT_RANDOM 1
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 0
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 1
CONFIG_MODULE_INIT_SPI 1
CONFIG_MODULE_INIT_SSL 0
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 1
CONFIG_MODULE_INIT_UPGRADE 0
CONFIG_MODULE_INIT_USB 0
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 0
CONFIG_MONITOR_THREAD 0
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 0
CONFIG_NVM_EEPROM_SOFT 0
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0
CONFIG_NVM_SIZE 2040
CONFIG_OWI 1
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 0
CONFIG_PWM_SOFT 1
CONFIG_RANDOM 1
CONFIG_SD 0
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 0
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 1
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SOFTWARE_I2C 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 1
CONFIG_SPIFFS 1
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 76800
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 32
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 1
CONFIG_START_FILESYSTEM_ADDRESS 0x0006b000
CONFIG_START_FILESYSTEM_SIZE 0x10000
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 1
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 1536
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 1536
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 1
CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 1
CONFIG_THRD_IDLE_STACK_SIZE 768
CONFIG_THRD_MONITOR_STACK_SIZE 768
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 1
CONFIG_USB 0
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 0
Mcu

esp8266

ESP-12E Development Board

Pinout
_images/esp12e-pinout.jpg
ESP-12 pinout
_images/esp12e-pinout.png
Flashing
  1. Connect 3.3 V to VCC and ground to GND.
  2. Attach the flash jumper (to the right in the picture).
  3. Turn on the power.
  4. Upload the software to Flash using esptool.
  5. The application starts automatically when the download is completed.
Hardware
  • 3.3 V power supply and logical level voltage.
  • Boot message at 76800 buad on a virgin board. Blue, red and RGB LEDs turned on.
  • 4 MB Flash.

How to determine the Flash size:

$ python esptool.py --port /dev/ttyUSB0 flash_id
Connecting...
head: 0 ;total: 0
erase size : 0
Manufacturer: e0
Device: 4016

Device 4016 gives a Flash of size 2 ^ (16 - 1) / 8 = 4096 kB = 4 MB.

Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the ESP-12E Development Board module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 265804 33992
default-configuration 311912 46880
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 1
CONFIG_ANALOG_INPUT_PIN 1
CONFIG_ANALOG_OUTPUT_PIN 0
CONFIG_ASSERT 0
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 0
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 0
CONFIG_DEBUG 1
CONFIG_DS18B20 1
CONFIG_DS3231 1
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 1
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 1
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 1
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 1
CONFIG_FS_CMD_ESP_WIFI_STATUS 1
CONFIG_FS_CMD_FS_APPEND 1
CONFIG_FS_CMD_FS_COUNTERS_LIST 1
CONFIG_FS_CMD_FS_COUNTERS_RESET 1
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 1
CONFIG_FS_CMD_FS_FORMAT 1
CONFIG_FS_CMD_FS_LIST 1
CONFIG_FS_CMD_FS_PARAMETERS_LIST 1
CONFIG_FS_CMD_FS_READ 1
CONFIG_FS_CMD_FS_REMOVE 1
CONFIG_FS_CMD_FS_WRITE 1
CONFIG_FS_CMD_I2C_READ 1
CONFIG_FS_CMD_I2C_WRITE 1
CONFIG_FS_CMD_LOG_LIST 1
CONFIG_FS_CMD_LOG_PRINT 1
CONFIG_FS_CMD_LOG_SET_LOG_MASK 1
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 1
CONFIG_FS_CMD_PIN_SET_MODE 1
CONFIG_FS_CMD_PIN_WRITE 1
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 1
CONFIG_FS_CMD_SETTINGS_READ 1
CONFIG_FS_CMD_SETTINGS_RESET 1
CONFIG_FS_CMD_SETTINGS_WRITE 1
CONFIG_FS_CMD_SYS_BACKTRACE 1
CONFIG_FS_CMD_SYS_CONFIG 1
CONFIG_FS_CMD_SYS_INFO 1
CONFIG_FS_CMD_SYS_PANIC 1
CONFIG_FS_CMD_SYS_REBOOT 1
CONFIG_FS_CMD_SYS_UPTIME 1
CONFIG_FS_CMD_THRD_LIST 1
CONFIG_FS_CMD_THRD_SET_LOG_MASK 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 1
CONFIG_FS_CMD_USB_HOST_LIST 1
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 0
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 1
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS LOG_UPTO(INFO)
CONFIG_MCP2515 0
CONFIG_MODULE_INIT_ADC 1
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 1
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 0
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 0
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 0
CONFIG_MODULE_INIT_DS18B20 1
CONFIG_MODULE_INIT_DS3231 1
CONFIG_MODULE_INIT_ESP_WIFI 1
CONFIG_MODULE_INIT_EXTI 1
CONFIG_MODULE_INIT_FLASH 1
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 1
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 0
CONFIG_MODULE_INIT_NETWORK_INTERFACE 1
CONFIG_MODULE_INIT_NRF24L01 0
CONFIG_MODULE_INIT_OWI 1
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 1
CONFIG_MODULE_INIT_PWM 0
CONFIG_MODULE_INIT_PWM_SOFT 1
CONFIG_MODULE_INIT_RANDOM 1
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 0
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 1
CONFIG_MODULE_INIT_SPI 1
CONFIG_MODULE_INIT_SSL 0
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 1
CONFIG_MODULE_INIT_UPGRADE 0
CONFIG_MODULE_INIT_USB 0
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 0
CONFIG_MONITOR_THREAD 0
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 0
CONFIG_NVM_EEPROM_SOFT 0
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0
CONFIG_NVM_SIZE 2040
CONFIG_OWI 1
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 0
CONFIG_PWM_SOFT 1
CONFIG_RANDOM 1
CONFIG_SD 0
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 0
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 1
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SOFTWARE_I2C 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 1
CONFIG_SPIFFS 1
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 76800
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 32
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 1
CONFIG_START_FILESYSTEM_ADDRESS 0x00300000
CONFIG_START_FILESYSTEM_SIZE 0xFB000
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 1
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 1536
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 1536
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 1
CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 1
CONFIG_THRD_IDLE_STACK_SIZE 768
CONFIG_THRD_MONITOR_STACK_SIZE 768
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 1
CONFIG_USB 0
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 0
Mcu

esp8266

ESP32-DevKitC

Pinout
_images/esp32-devkitc-pinout.png
Default pin mapping

Here is a list of additional pin mappings not part of the picture above.

Device function GPIO
LED 16
UART 0 TX 1
UART 0 RX 3
UART 1 TX 19
UART 1 RX 23
UART 2 TX 18
UART 2 RX 5
CAN TX 16
CAN RX 17
Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the ESP32-DevKitC module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 91356 8636
default-configuration 355004 83384
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 1
CONFIG_ANALOG_INPUT_PIN 1
CONFIG_ANALOG_OUTPUT_PIN 0
CONFIG_ASSERT 1
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 1
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 1
CONFIG_DEBUG 1
CONFIG_DS18B20 1
CONFIG_DS3231 1
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 1
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 0
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 1
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 1
CONFIG_FS_CMD_ESP_WIFI_STATUS 0
CONFIG_FS_CMD_FS_APPEND 1
CONFIG_FS_CMD_FS_COUNTERS_LIST 1
CONFIG_FS_CMD_FS_COUNTERS_RESET 1
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 1
CONFIG_FS_CMD_FS_FORMAT 1
CONFIG_FS_CMD_FS_LIST 1
CONFIG_FS_CMD_FS_PARAMETERS_LIST 1
CONFIG_FS_CMD_FS_READ 1
CONFIG_FS_CMD_FS_REMOVE 1
CONFIG_FS_CMD_FS_WRITE 1
CONFIG_FS_CMD_I2C_READ 1
CONFIG_FS_CMD_I2C_WRITE 1
CONFIG_FS_CMD_LOG_LIST 1
CONFIG_FS_CMD_LOG_PRINT 1
CONFIG_FS_CMD_LOG_SET_LOG_MASK 1
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 1
CONFIG_FS_CMD_PIN_SET_MODE 1
CONFIG_FS_CMD_PIN_WRITE 1
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 1
CONFIG_FS_CMD_SETTINGS_READ 1
CONFIG_FS_CMD_SETTINGS_RESET 1
CONFIG_FS_CMD_SETTINGS_WRITE 1
CONFIG_FS_CMD_SYS_BACKTRACE 1
CONFIG_FS_CMD_SYS_CONFIG 1
CONFIG_FS_CMD_SYS_INFO 1
CONFIG_FS_CMD_SYS_PANIC 1
CONFIG_FS_CMD_SYS_REBOOT 1
CONFIG_FS_CMD_SYS_UPTIME 1
CONFIG_FS_CMD_THRD_LIST 1
CONFIG_FS_CMD_THRD_SET_LOG_MASK 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 1
CONFIG_FS_CMD_USB_HOST_LIST 1
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 1
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 0
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS LOG_UPTO(INFO)
CONFIG_MCP2515 0
CONFIG_MODULE_INIT_ADC 1
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 1
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 0
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 1
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 1
CONFIG_MODULE_INIT_DS18B20 1
CONFIG_MODULE_INIT_DS3231 1
CONFIG_MODULE_INIT_ESP_WIFI 1
CONFIG_MODULE_INIT_EXTI 0
CONFIG_MODULE_INIT_FLASH 1
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 1
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 0
CONFIG_MODULE_INIT_NETWORK_INTERFACE 1
CONFIG_MODULE_INIT_NRF24L01 0
CONFIG_MODULE_INIT_OWI 1
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 1
CONFIG_MODULE_INIT_PWM 0
CONFIG_MODULE_INIT_PWM_SOFT 0
CONFIG_MODULE_INIT_RANDOM 1
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 0
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 1
CONFIG_MODULE_INIT_SPI 1
CONFIG_MODULE_INIT_SSL 1
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 0
CONFIG_MODULE_INIT_UPGRADE 1
CONFIG_MODULE_INIT_USB 0
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 0
CONFIG_MONITOR_THREAD 0
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 0
CONFIG_NVM_EEPROM_SOFT 0
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0
CONFIG_NVM_SIZE 2040
CONFIG_OWI 1
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 0
CONFIG_PWM_SOFT 0
CONFIG_RANDOM 1
CONFIG_SD 0
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 0
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 0
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SOFTWARE_I2C 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 1
CONFIG_SPIFFS 1
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 115200
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 512
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 1
CONFIG_START_FILESYSTEM_ADDRESS 0x00300000
CONFIG_START_FILESYSTEM_SIZE 0x20000
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 1
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 4096
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 4096
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 0
CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 8192
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 1
CONFIG_THRD_IDLE_STACK_SIZE 1024
CONFIG_THRD_MONITOR_STACK_SIZE 768
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 0
CONFIG_USB 0
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 0
Mcu

esp32

Adafruit HUZZAH ESP8266 breakout

Pinout
_images/huzzah-pinout.jpg
Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the Adafruit HUZZAH ESP8266 breakout module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 265804 33992
default-configuration 311088 46336
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 1
CONFIG_ANALOG_INPUT_PIN 1
CONFIG_ANALOG_OUTPUT_PIN 0
CONFIG_ASSERT 0
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 0
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 0
CONFIG_DEBUG 1
CONFIG_DS18B20 1
CONFIG_DS3231 1
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 1
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 1
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 1
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 1
CONFIG_FS_CMD_ESP_WIFI_STATUS 0
CONFIG_FS_CMD_FS_APPEND 1
CONFIG_FS_CMD_FS_COUNTERS_LIST 1
CONFIG_FS_CMD_FS_COUNTERS_RESET 1
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 1
CONFIG_FS_CMD_FS_FORMAT 1
CONFIG_FS_CMD_FS_LIST 1
CONFIG_FS_CMD_FS_PARAMETERS_LIST 1
CONFIG_FS_CMD_FS_READ 1
CONFIG_FS_CMD_FS_REMOVE 1
CONFIG_FS_CMD_FS_WRITE 1
CONFIG_FS_CMD_I2C_READ 1
CONFIG_FS_CMD_I2C_WRITE 1
CONFIG_FS_CMD_LOG_LIST 1
CONFIG_FS_CMD_LOG_PRINT 1
CONFIG_FS_CMD_LOG_SET_LOG_MASK 1
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 1
CONFIG_FS_CMD_PIN_SET_MODE 1
CONFIG_FS_CMD_PIN_WRITE 1
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 1
CONFIG_FS_CMD_SETTINGS_READ 1
CONFIG_FS_CMD_SETTINGS_RESET 1
CONFIG_FS_CMD_SETTINGS_WRITE 1
CONFIG_FS_CMD_SYS_BACKTRACE 1
CONFIG_FS_CMD_SYS_CONFIG 1
CONFIG_FS_CMD_SYS_INFO 1
CONFIG_FS_CMD_SYS_PANIC 1
CONFIG_FS_CMD_SYS_REBOOT 1
CONFIG_FS_CMD_SYS_UPTIME 1
CONFIG_FS_CMD_THRD_LIST 1
CONFIG_FS_CMD_THRD_SET_LOG_MASK 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 1
CONFIG_FS_CMD_USB_HOST_LIST 1
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 0
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 1
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS LOG_UPTO(INFO)
CONFIG_MCP2515 0
CONFIG_MODULE_INIT_ADC 1
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 1
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 0
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 0
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 0
CONFIG_MODULE_INIT_DS18B20 1
CONFIG_MODULE_INIT_DS3231 1
CONFIG_MODULE_INIT_ESP_WIFI 1
CONFIG_MODULE_INIT_EXTI 1
CONFIG_MODULE_INIT_FLASH 1
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 1
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 0
CONFIG_MODULE_INIT_NETWORK_INTERFACE 1
CONFIG_MODULE_INIT_NRF24L01 0
CONFIG_MODULE_INIT_OWI 1
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 1
CONFIG_MODULE_INIT_PWM 0
CONFIG_MODULE_INIT_PWM_SOFT 1
CONFIG_MODULE_INIT_RANDOM 1
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 0
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 1
CONFIG_MODULE_INIT_SPI 1
CONFIG_MODULE_INIT_SSL 0
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 1
CONFIG_MODULE_INIT_UPGRADE 0
CONFIG_MODULE_INIT_USB 0
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 0
CONFIG_MONITOR_THREAD 0
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 0
CONFIG_NVM_EEPROM_SOFT 0
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0
CONFIG_NVM_SIZE 2040
CONFIG_OWI 1
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 0
CONFIG_PWM_SOFT 1
CONFIG_RANDOM 1
CONFIG_SD 0
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 0
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 1
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SOFTWARE_I2C 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 1
CONFIG_SPIFFS 1
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 76800
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 32
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 1
CONFIG_START_FILESYSTEM_ADDRESS 0
CONFIG_START_FILESYSTEM_SIZE 65536
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 1
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 1536
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 1536
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 1
CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 1
CONFIG_THRD_IDLE_STACK_SIZE 768
CONFIG_THRD_MONITOR_STACK_SIZE 768
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 1
CONFIG_USB 0
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 0
Mcu

esp8266

Linux

Pinout
_images/linux-pinout.png
Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the Linux module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 144940 318744
default-configuration 383483 473072
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 1
CONFIG_ANALOG_INPUT_PIN 1
CONFIG_ANALOG_OUTPUT_PIN 1
CONFIG_ASSERT 1
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 1
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 1
CONFIG_DEBUG 1
CONFIG_DS18B20 1
CONFIG_DS3231 1
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 0
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 1
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 1
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 1
CONFIG_FS_CMD_ESP_WIFI_STATUS 0
CONFIG_FS_CMD_FS_APPEND 1
CONFIG_FS_CMD_FS_COUNTERS_LIST 1
CONFIG_FS_CMD_FS_COUNTERS_RESET 1
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 1
CONFIG_FS_CMD_FS_FORMAT 1
CONFIG_FS_CMD_FS_LIST 1
CONFIG_FS_CMD_FS_PARAMETERS_LIST 1
CONFIG_FS_CMD_FS_READ 1
CONFIG_FS_CMD_FS_REMOVE 1
CONFIG_FS_CMD_FS_WRITE 1
CONFIG_FS_CMD_I2C_READ 1
CONFIG_FS_CMD_I2C_WRITE 1
CONFIG_FS_CMD_LOG_LIST 1
CONFIG_FS_CMD_LOG_PRINT 1
CONFIG_FS_CMD_LOG_SET_LOG_MASK 1
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 1
CONFIG_FS_CMD_PIN_SET_MODE 1
CONFIG_FS_CMD_PIN_WRITE 1
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 1
CONFIG_FS_CMD_SETTINGS_READ 1
CONFIG_FS_CMD_SETTINGS_RESET 1
CONFIG_FS_CMD_SETTINGS_WRITE 1
CONFIG_FS_CMD_SYS_BACKTRACE 1
CONFIG_FS_CMD_SYS_CONFIG 1
CONFIG_FS_CMD_SYS_INFO 1
CONFIG_FS_CMD_SYS_PANIC 1
CONFIG_FS_CMD_SYS_REBOOT 1
CONFIG_FS_CMD_SYS_UPTIME 1
CONFIG_FS_CMD_THRD_LIST 1
CONFIG_FS_CMD_THRD_SET_LOG_MASK 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 1
CONFIG_FS_CMD_USB_HOST_LIST 1
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 1
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 0
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS LOG_UPTO(INFO)
CONFIG_MCP2515 0
CONFIG_MODULE_INIT_ADC 1
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 1
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 1
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 1
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 1
CONFIG_MODULE_INIT_DS18B20 1
CONFIG_MODULE_INIT_DS3231 1
CONFIG_MODULE_INIT_ESP_WIFI 0
CONFIG_MODULE_INIT_EXTI 1
CONFIG_MODULE_INIT_FLASH 1
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 1
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 0
CONFIG_MODULE_INIT_NETWORK_INTERFACE 1
CONFIG_MODULE_INIT_NRF24L01 0
CONFIG_MODULE_INIT_OWI 1
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 1
CONFIG_MODULE_INIT_PWM 1
CONFIG_MODULE_INIT_PWM_SOFT 1
CONFIG_MODULE_INIT_RANDOM 1
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 1
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 1
CONFIG_MODULE_INIT_SPI 1
CONFIG_MODULE_INIT_SSL 1
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 0
CONFIG_MODULE_INIT_UPGRADE 1
CONFIG_MODULE_INIT_USB 0
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 0
CONFIG_MONITOR_THREAD 1
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 0
CONFIG_NVM_EEPROM_SOFT 0
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0
CONFIG_NVM_SIZE 2040
CONFIG_OWI 1
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 1
CONFIG_PWM_SOFT 1
CONFIG_RANDOM 1
CONFIG_SD 1
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 0
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 0
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 1
CONFIG_SPIFFS 1
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 38400
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 512
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 1
CONFIG_START_FILESYSTEM_ADDRESS 0
CONFIG_START_FILESYSTEM_SIZE 65536
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 1
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 768
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 840
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 0
CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 1
CONFIG_THRD_IDLE_STACK_SIZE 1024
CONFIG_THRD_MONITOR_STACK_SIZE 1024
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 0
CONFIG_USB 0
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 0
Mcu

linux

Maple-ESP32

Pinout
_images/maple-esp32-pinout.jpg
Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the Maple-ESP32 module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 91356 8636
default-configuration 355004 83384
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 1
CONFIG_ANALOG_INPUT_PIN 1
CONFIG_ANALOG_OUTPUT_PIN 0
CONFIG_ASSERT 1
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 1
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 1
CONFIG_DEBUG 1
CONFIG_DS18B20 1
CONFIG_DS3231 1
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 1
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 0
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 1
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 1
CONFIG_FS_CMD_ESP_WIFI_STATUS 0
CONFIG_FS_CMD_FS_APPEND 1
CONFIG_FS_CMD_FS_COUNTERS_LIST 1
CONFIG_FS_CMD_FS_COUNTERS_RESET 1
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 1
CONFIG_FS_CMD_FS_FORMAT 1
CONFIG_FS_CMD_FS_LIST 1
CONFIG_FS_CMD_FS_PARAMETERS_LIST 1
CONFIG_FS_CMD_FS_READ 1
CONFIG_FS_CMD_FS_REMOVE 1
CONFIG_FS_CMD_FS_WRITE 1
CONFIG_FS_CMD_I2C_READ 1
CONFIG_FS_CMD_I2C_WRITE 1
CONFIG_FS_CMD_LOG_LIST 1
CONFIG_FS_CMD_LOG_PRINT 1
CONFIG_FS_CMD_LOG_SET_LOG_MASK 1
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 1
CONFIG_FS_CMD_PIN_SET_MODE 1
CONFIG_FS_CMD_PIN_WRITE 1
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 1
CONFIG_FS_CMD_SETTINGS_READ 1
CONFIG_FS_CMD_SETTINGS_RESET 1
CONFIG_FS_CMD_SETTINGS_WRITE 1
CONFIG_FS_CMD_SYS_BACKTRACE 1
CONFIG_FS_CMD_SYS_CONFIG 1
CONFIG_FS_CMD_SYS_INFO 1
CONFIG_FS_CMD_SYS_PANIC 1
CONFIG_FS_CMD_SYS_REBOOT 1
CONFIG_FS_CMD_SYS_UPTIME 1
CONFIG_FS_CMD_THRD_LIST 1
CONFIG_FS_CMD_THRD_SET_LOG_MASK 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 1
CONFIG_FS_CMD_USB_HOST_LIST 1
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 1
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 0
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS LOG_UPTO(INFO)
CONFIG_MCP2515 0
CONFIG_MODULE_INIT_ADC 1
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 1
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 0
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 1
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 1
CONFIG_MODULE_INIT_DS18B20 1
CONFIG_MODULE_INIT_DS3231 1
CONFIG_MODULE_INIT_ESP_WIFI 1
CONFIG_MODULE_INIT_EXTI 0
CONFIG_MODULE_INIT_FLASH 1
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 1
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 0
CONFIG_MODULE_INIT_NETWORK_INTERFACE 1
CONFIG_MODULE_INIT_NRF24L01 0
CONFIG_MODULE_INIT_OWI 1
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 1
CONFIG_MODULE_INIT_PWM 0
CONFIG_MODULE_INIT_PWM_SOFT 0
CONFIG_MODULE_INIT_RANDOM 1
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 0
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 1
CONFIG_MODULE_INIT_SPI 1
CONFIG_MODULE_INIT_SSL 1
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 0
CONFIG_MODULE_INIT_UPGRADE 1
CONFIG_MODULE_INIT_USB 0
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 0
CONFIG_MONITOR_THREAD 0
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 0
CONFIG_NVM_EEPROM_SOFT 0
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0
CONFIG_NVM_SIZE 2040
CONFIG_OWI 1
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 0
CONFIG_PWM_SOFT 0
CONFIG_RANDOM 1
CONFIG_SD 0
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 0
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 0
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SOFTWARE_I2C 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 1
CONFIG_SPIFFS 1
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 115200
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 512
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 1
CONFIG_START_FILESYSTEM_ADDRESS 0x00300000
CONFIG_START_FILESYSTEM_SIZE 0x20000
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 1
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 4096
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 4096
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 0
CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 8192
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 1
CONFIG_THRD_IDLE_STACK_SIZE 1024
CONFIG_THRD_MONITOR_STACK_SIZE 768
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 0
CONFIG_USB 0
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 0
Mcu

esp32

Nano32

Pinout
_images/nano32-pinout.jpg
Default pin mapping

Here is a list of additional pin mappings not part of the picture above.

Device function GPIO
UART 0 TX 1
UART 0 RX 3
UART 1 TX 19
UART 1 RX 23
UART 2 TX 18
UART 2 RX 5
CAN TX 16
CAN RX 17
Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the Nano32 module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 91356 8636
default-configuration 354996 83384
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 1
CONFIG_ANALOG_INPUT_PIN 1
CONFIG_ANALOG_OUTPUT_PIN 0
CONFIG_ASSERT 1
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 1
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 1
CONFIG_DEBUG 1
CONFIG_DS18B20 1
CONFIG_DS3231 1
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 1
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 0
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 1
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 1
CONFIG_FS_CMD_ESP_WIFI_STATUS 0
CONFIG_FS_CMD_FS_APPEND 1
CONFIG_FS_CMD_FS_COUNTERS_LIST 1
CONFIG_FS_CMD_FS_COUNTERS_RESET 1
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 1
CONFIG_FS_CMD_FS_FORMAT 1
CONFIG_FS_CMD_FS_LIST 1
CONFIG_FS_CMD_FS_PARAMETERS_LIST 1
CONFIG_FS_CMD_FS_READ 1
CONFIG_FS_CMD_FS_REMOVE 1
CONFIG_FS_CMD_FS_WRITE 1
CONFIG_FS_CMD_I2C_READ 1
CONFIG_FS_CMD_I2C_WRITE 1
CONFIG_FS_CMD_LOG_LIST 1
CONFIG_FS_CMD_LOG_PRINT 1
CONFIG_FS_CMD_LOG_SET_LOG_MASK 1
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 1
CONFIG_FS_CMD_PIN_SET_MODE 1
CONFIG_FS_CMD_PIN_WRITE 1
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 1
CONFIG_FS_CMD_SETTINGS_READ 1
CONFIG_FS_CMD_SETTINGS_RESET 1
CONFIG_FS_CMD_SETTINGS_WRITE 1
CONFIG_FS_CMD_SYS_BACKTRACE 1
CONFIG_FS_CMD_SYS_CONFIG 1
CONFIG_FS_CMD_SYS_INFO 1
CONFIG_FS_CMD_SYS_PANIC 1
CONFIG_FS_CMD_SYS_REBOOT 1
CONFIG_FS_CMD_SYS_UPTIME 1
CONFIG_FS_CMD_THRD_LIST 1
CONFIG_FS_CMD_THRD_SET_LOG_MASK 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 1
CONFIG_FS_CMD_USB_HOST_LIST 1
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 1
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 0
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS LOG_UPTO(INFO)
CONFIG_MCP2515 0
CONFIG_MODULE_INIT_ADC 1
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 1
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 0
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 1
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 1
CONFIG_MODULE_INIT_DS18B20 1
CONFIG_MODULE_INIT_DS3231 1
CONFIG_MODULE_INIT_ESP_WIFI 1
CONFIG_MODULE_INIT_EXTI 0
CONFIG_MODULE_INIT_FLASH 1
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 1
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 0
CONFIG_MODULE_INIT_NETWORK_INTERFACE 1
CONFIG_MODULE_INIT_NRF24L01 0
CONFIG_MODULE_INIT_OWI 1
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 1
CONFIG_MODULE_INIT_PWM 0
CONFIG_MODULE_INIT_PWM_SOFT 0
CONFIG_MODULE_INIT_RANDOM 1
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 0
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 1
CONFIG_MODULE_INIT_SPI 1
CONFIG_MODULE_INIT_SSL 1
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 0
CONFIG_MODULE_INIT_UPGRADE 1
CONFIG_MODULE_INIT_USB 0
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 0
CONFIG_MONITOR_THREAD 0
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 0
CONFIG_NVM_EEPROM_SOFT 0
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0
CONFIG_NVM_SIZE 2040
CONFIG_OWI 1
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 0
CONFIG_PWM_SOFT 0
CONFIG_RANDOM 1
CONFIG_SD 0
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 0
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 0
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SOFTWARE_I2C 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 1
CONFIG_SPIFFS 1
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 115200
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 512
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 1
CONFIG_START_FILESYSTEM_ADDRESS 0x00300000
CONFIG_START_FILESYSTEM_SIZE 0x20000
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 1
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 4096
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 4096
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 0
CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 8192
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 1
CONFIG_THRD_IDLE_STACK_SIZE 1024
CONFIG_THRD_MONITOR_STACK_SIZE 768
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 0
CONFIG_USB 0
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 0
Mcu

esp32

NodeMCU

Pinout
_images/nodemcu-pinout.png
Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the NodeMCU module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 265804 33992
default-configuration 311952 46868
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 1
CONFIG_ANALOG_INPUT_PIN 1
CONFIG_ANALOG_OUTPUT_PIN 0
CONFIG_ASSERT 0
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 0
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 0
CONFIG_DEBUG 1
CONFIG_DS18B20 1
CONFIG_DS3231 1
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 1
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 1
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 1
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 1
CONFIG_FS_CMD_ESP_WIFI_STATUS 1
CONFIG_FS_CMD_FS_APPEND 1
CONFIG_FS_CMD_FS_COUNTERS_LIST 1
CONFIG_FS_CMD_FS_COUNTERS_RESET 1
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 1
CONFIG_FS_CMD_FS_FORMAT 1
CONFIG_FS_CMD_FS_LIST 1
CONFIG_FS_CMD_FS_PARAMETERS_LIST 1
CONFIG_FS_CMD_FS_READ 1
CONFIG_FS_CMD_FS_REMOVE 1
CONFIG_FS_CMD_FS_WRITE 1
CONFIG_FS_CMD_I2C_READ 1
CONFIG_FS_CMD_I2C_WRITE 1
CONFIG_FS_CMD_LOG_LIST 1
CONFIG_FS_CMD_LOG_PRINT 1
CONFIG_FS_CMD_LOG_SET_LOG_MASK 1
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 1
CONFIG_FS_CMD_PIN_SET_MODE 1
CONFIG_FS_CMD_PIN_WRITE 1
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 1
CONFIG_FS_CMD_SETTINGS_READ 1
CONFIG_FS_CMD_SETTINGS_RESET 1
CONFIG_FS_CMD_SETTINGS_WRITE 1
CONFIG_FS_CMD_SYS_BACKTRACE 1
CONFIG_FS_CMD_SYS_CONFIG 1
CONFIG_FS_CMD_SYS_INFO 1
CONFIG_FS_CMD_SYS_PANIC 1
CONFIG_FS_CMD_SYS_REBOOT 1
CONFIG_FS_CMD_SYS_UPTIME 1
CONFIG_FS_CMD_THRD_LIST 1
CONFIG_FS_CMD_THRD_SET_LOG_MASK 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 1
CONFIG_FS_CMD_USB_HOST_LIST 1
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 0
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 1
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS LOG_UPTO(INFO)
CONFIG_MCP2515 0
CONFIG_MODULE_INIT_ADC 1
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 1
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 0
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 0
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 0
CONFIG_MODULE_INIT_DS18B20 1
CONFIG_MODULE_INIT_DS3231 1
CONFIG_MODULE_INIT_ESP_WIFI 1
CONFIG_MODULE_INIT_EXTI 1
CONFIG_MODULE_INIT_FLASH 1
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 1
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 0
CONFIG_MODULE_INIT_NETWORK_INTERFACE 1
CONFIG_MODULE_INIT_NRF24L01 0
CONFIG_MODULE_INIT_OWI 1
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 1
CONFIG_MODULE_INIT_PWM 0
CONFIG_MODULE_INIT_PWM_SOFT 1
CONFIG_MODULE_INIT_RANDOM 1
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 0
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 1
CONFIG_MODULE_INIT_SPI 1
CONFIG_MODULE_INIT_SSL 0
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 1
CONFIG_MODULE_INIT_UPGRADE 0
CONFIG_MODULE_INIT_USB 0
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 0
CONFIG_MONITOR_THREAD 0
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 0
CONFIG_NVM_EEPROM_SOFT 0
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0
CONFIG_NVM_SIZE 2040
CONFIG_OWI 1
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 0
CONFIG_PWM_SOFT 1
CONFIG_RANDOM 1
CONFIG_SD 0
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 0
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 1
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SOFTWARE_I2C 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 1
CONFIG_SPIFFS 1
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 76800
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 32
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 1
CONFIG_START_FILESYSTEM_ADDRESS 0x00300000
CONFIG_START_FILESYSTEM_SIZE 0xFB000
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 1
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 1536
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 1536
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 1
CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 1
CONFIG_THRD_IDLE_STACK_SIZE 768
CONFIG_THRD_MONITOR_STACK_SIZE 768
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 1
CONFIG_USB 0
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 0
Mcu

esp8266

Particle IO Photon

Pinout
_images/photon-pinout.png
Detailed pinout
Right side pins
_images/photon-pinout1.png
Left side pins
_images/photon-pinout2.png
User I/O
_images/photon-pinout3.png
Prerequisities

Install the dfu-utility.

git clone git://git.code.sf.net/p/dfu-util/dfu-util
cd dfu-util
sudo apt-get build-dep dfu-util
./autogen.sh
./configure
make
sudo make install
cd ..

# Give users access to the device.
sudo cp simba/environment/udev/49-photon.rules /etc/udec/rules.d
Flashing

The Photon must enter DFU mode before software can be uploaded to it. It’s recommended to use the manual method to verify that software can be successfully uploaded to the board, and then start using the automatic method to reduce the manual work for each software upload.

Manual

To enter DFU Mode:

  1. Hold down the RESET and SETUP buttons.
  2. Release only the RESET button, while holding down the SETUP button.
  3. Wait for the LED to start flashing yellow (it will flash magenta first).
  4. Release the SETUP button.

NOTE: Do not connect DTR and/or RTS using manual upload. They must only be connected using the automatic method.

Upload the software with make BOARD=photon upload.

Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the Particle IO Photon module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 4204 1672
default-configuration 81768 5986
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 0
CONFIG_ANALOG_INPUT_PIN 0
CONFIG_ANALOG_OUTPUT_PIN 0
CONFIG_ASSERT 1
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 0
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 0
CONFIG_DEBUG 1
CONFIG_DS18B20 0
CONFIG_DS3231 0
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 0
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 0
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 1
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 1
CONFIG_FS_CMD_ESP_WIFI_STATUS 0
CONFIG_FS_CMD_FS_APPEND 1
CONFIG_FS_CMD_FS_COUNTERS_LIST 1
CONFIG_FS_CMD_FS_COUNTERS_RESET 1
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 1
CONFIG_FS_CMD_FS_FORMAT 1
CONFIG_FS_CMD_FS_LIST 1
CONFIG_FS_CMD_FS_PARAMETERS_LIST 1
CONFIG_FS_CMD_FS_READ 1
CONFIG_FS_CMD_FS_REMOVE 1
CONFIG_FS_CMD_FS_WRITE 1
CONFIG_FS_CMD_I2C_READ 1
CONFIG_FS_CMD_I2C_WRITE 1
CONFIG_FS_CMD_LOG_LIST 1
CONFIG_FS_CMD_LOG_PRINT 1
CONFIG_FS_CMD_LOG_SET_LOG_MASK 1
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 1
CONFIG_FS_CMD_PIN_SET_MODE 1
CONFIG_FS_CMD_PIN_WRITE 1
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 1
CONFIG_FS_CMD_SETTINGS_READ 1
CONFIG_FS_CMD_SETTINGS_RESET 1
CONFIG_FS_CMD_SETTINGS_WRITE 1
CONFIG_FS_CMD_SYS_BACKTRACE 1
CONFIG_FS_CMD_SYS_CONFIG 1
CONFIG_FS_CMD_SYS_INFO 1
CONFIG_FS_CMD_SYS_PANIC 1
CONFIG_FS_CMD_SYS_REBOOT 1
CONFIG_FS_CMD_SYS_UPTIME 1
CONFIG_FS_CMD_THRD_LIST 1
CONFIG_FS_CMD_THRD_SET_LOG_MASK 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 1
CONFIG_FS_CMD_USB_HOST_LIST 1
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 0
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 0
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS LOG_UPTO(INFO)
CONFIG_MCP2515 0
CONFIG_MODULE_INIT_ADC 0
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 0
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 0
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 0
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 0
CONFIG_MODULE_INIT_DS18B20 0
CONFIG_MODULE_INIT_DS3231 0
CONFIG_MODULE_INIT_ESP_WIFI 0
CONFIG_MODULE_INIT_EXTI 0
CONFIG_MODULE_INIT_FLASH 1
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 0
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 0
CONFIG_MODULE_INIT_NETWORK_INTERFACE 0
CONFIG_MODULE_INIT_NRF24L01 0
CONFIG_MODULE_INIT_OWI 0
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 0
CONFIG_MODULE_INIT_PWM 0
CONFIG_MODULE_INIT_PWM_SOFT 0
CONFIG_MODULE_INIT_RANDOM 0
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 0
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 0
CONFIG_MODULE_INIT_SPI 0
CONFIG_MODULE_INIT_SSL 0
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 0
CONFIG_MODULE_INIT_UPGRADE 0
CONFIG_MODULE_INIT_USB 0
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 0
CONFIG_MONITOR_THREAD 1
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 0
CONFIG_NVM_EEPROM_SOFT 1
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0
CONFIG_NVM_SIZE 2040
CONFIG_OWI 0
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 0
CONFIG_PWM_SOFT 0
CONFIG_RANDOM 0
CONFIG_SD 0
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 0
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 0
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SOFTWARE_I2C 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 0
CONFIG_SPIFFS 0
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 38400
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 32
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 0
CONFIG_START_FILESYSTEM_ADDRESS 0
CONFIG_START_FILESYSTEM_SIZE 65536
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 1
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 768
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 840
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 0
CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 1
CONFIG_THRD_IDLE_STACK_SIZE 384
CONFIG_THRD_MONITOR_STACK_SIZE 512
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 0
CONFIG_USB 0
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 0

SPC56D Discovery

Pinout
_images/spc56d-discovery-pinout.png
Pin functions

These are the default pin functions in Simba.

List Index Pin Function
X1 12 PB0 CAN TX
X2 9 PB1 CAN RX
X1 10 PB2 UART0 TX
X2 10 PB3 UART0 RX
X4 6 PC2 LED (D8)
Toolchain

Download S32 Design Studio for Power v1.1 for Linux and install it.

Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the SPC56D Discovery module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 13108 944
default-configuration 75148 5830
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 0
CONFIG_ANALOG_INPUT_PIN 0
CONFIG_ANALOG_OUTPUT_PIN 0
CONFIG_ASSERT 1
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 1
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 0
CONFIG_DEBUG 1
CONFIG_DS18B20 0
CONFIG_DS3231 0
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 0
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 0
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 1
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 1
CONFIG_FS_CMD_ESP_WIFI_STATUS 0
CONFIG_FS_CMD_FS_APPEND 0
CONFIG_FS_CMD_FS_COUNTERS_LIST 0
CONFIG_FS_CMD_FS_COUNTERS_RESET 0
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 0
CONFIG_FS_CMD_FS_FORMAT 0
CONFIG_FS_CMD_FS_LIST 0
CONFIG_FS_CMD_FS_PARAMETERS_LIST 0
CONFIG_FS_CMD_FS_READ 0
CONFIG_FS_CMD_FS_REMOVE 0
CONFIG_FS_CMD_FS_WRITE 0
CONFIG_FS_CMD_I2C_READ 1
CONFIG_FS_CMD_I2C_WRITE 1
CONFIG_FS_CMD_LOG_LIST 1
CONFIG_FS_CMD_LOG_PRINT 1
CONFIG_FS_CMD_LOG_SET_LOG_MASK 1
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 1
CONFIG_FS_CMD_PIN_SET_MODE 1
CONFIG_FS_CMD_PIN_WRITE 1
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 1
CONFIG_FS_CMD_SETTINGS_READ 1
CONFIG_FS_CMD_SETTINGS_RESET 1
CONFIG_FS_CMD_SETTINGS_WRITE 1
CONFIG_FS_CMD_SYS_BACKTRACE 1
CONFIG_FS_CMD_SYS_CONFIG 1
CONFIG_FS_CMD_SYS_INFO 1
CONFIG_FS_CMD_SYS_PANIC 1
CONFIG_FS_CMD_SYS_REBOOT 1
CONFIG_FS_CMD_SYS_UPTIME 1
CONFIG_FS_CMD_THRD_LIST 1
CONFIG_FS_CMD_THRD_SET_LOG_MASK 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 1
CONFIG_FS_CMD_USB_HOST_LIST 1
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 0
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 0
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS LOG_UPTO(INFO)
CONFIG_MCP2515 0
CONFIG_MODULE_INIT_ADC 0
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 0
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 0
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 1
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 0
CONFIG_MODULE_INIT_DS18B20 0
CONFIG_MODULE_INIT_DS3231 0
CONFIG_MODULE_INIT_ESP_WIFI 0
CONFIG_MODULE_INIT_EXTI 0
CONFIG_MODULE_INIT_FLASH 1
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 0
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 0
CONFIG_MODULE_INIT_NETWORK_INTERFACE 0
CONFIG_MODULE_INIT_NRF24L01 0
CONFIG_MODULE_INIT_OWI 0
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 0
CONFIG_MODULE_INIT_PWM 0
CONFIG_MODULE_INIT_PWM_SOFT 0
CONFIG_MODULE_INIT_RANDOM 0
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 0
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 0
CONFIG_MODULE_INIT_SPI 0
CONFIG_MODULE_INIT_SSL 0
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 0
CONFIG_MODULE_INIT_UPGRADE 0
CONFIG_MODULE_INIT_USB 0
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 1
CONFIG_MONITOR_THREAD 1
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 0
CONFIG_NVM_EEPROM_SOFT 1
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 1
CONFIG_NVM_SIZE 2040
CONFIG_OWI 0
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 0
CONFIG_PWM_SOFT 0
CONFIG_RANDOM 0
CONFIG_SD 0
CONFIG_SETTINGS_AREA_SIZE 1028
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 0
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 0
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SOFTWARE_I2C 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 0
CONFIG_SPIFFS 0
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 115200
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 32
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 0
CONFIG_START_FILESYSTEM_ADDRESS 0
CONFIG_START_FILESYSTEM_SIZE 65536
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 1
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 1536
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 840
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 256
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 0
CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 1
CONFIG_THRD_IDLE_STACK_SIZE 156
CONFIG_THRD_MONITOR_STACK_SIZE 768
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 0
CONFIG_USB 0
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 1

STM32F3DISCOVERY

Pinout
_images/stm32f3discovery.jpg
Pin functions

These are the default pin functions in Simba.

Function Pin
UART0 TX PA9
UART0 RX PA10
UART1 TX PA2
UART1 RX PA3
UART2 TX PB10
UART2 RX PB11
SPI0 SCK PA5
SPI0 MISO PA6
SPI0 MOSI PA7
SPI1 SCK PA13
SPI1 MISO PA14
SPI1 MOSI PA15
SPI2 SCK PC10
SPI2 MISO PC11
SPI2 MOSI PC12
I2C0 SCL PB8
I2C0 SDA PB9
I2C1 SCL PF0
I2C1 SDA PF1
CAN TX PD1
CAN RX PD0
Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the STM32F3DISCOVERY module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 4352 1672
default-configuration 80384 5490
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 0
CONFIG_ANALOG_INPUT_PIN 0
CONFIG_ANALOG_OUTPUT_PIN 0
CONFIG_ASSERT 1
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 0
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 0
CONFIG_DEBUG 1
CONFIG_DS18B20 0
CONFIG_DS3231 0
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 0
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 0
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 1
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 1
CONFIG_FS_CMD_ESP_WIFI_STATUS 0
CONFIG_FS_CMD_FS_APPEND 1
CONFIG_FS_CMD_FS_COUNTERS_LIST 1
CONFIG_FS_CMD_FS_COUNTERS_RESET 1
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 1
CONFIG_FS_CMD_FS_FORMAT 1
CONFIG_FS_CMD_FS_LIST 1
CONFIG_FS_CMD_FS_PARAMETERS_LIST 1
CONFIG_FS_CMD_FS_READ 1
CONFIG_FS_CMD_FS_REMOVE 1
CONFIG_FS_CMD_FS_WRITE 1
CONFIG_FS_CMD_I2C_READ 1
CONFIG_FS_CMD_I2C_WRITE 1
CONFIG_FS_CMD_LOG_LIST 1
CONFIG_FS_CMD_LOG_PRINT 1
CONFIG_FS_CMD_LOG_SET_LOG_MASK 1
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 1
CONFIG_FS_CMD_PIN_SET_MODE 1
CONFIG_FS_CMD_PIN_WRITE 1
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 1
CONFIG_FS_CMD_SETTINGS_READ 1
CONFIG_FS_CMD_SETTINGS_RESET 1
CONFIG_FS_CMD_SETTINGS_WRITE 1
CONFIG_FS_CMD_SYS_BACKTRACE 1
CONFIG_FS_CMD_SYS_CONFIG 1
CONFIG_FS_CMD_SYS_INFO 1
CONFIG_FS_CMD_SYS_PANIC 1
CONFIG_FS_CMD_SYS_REBOOT 1
CONFIG_FS_CMD_SYS_UPTIME 1
CONFIG_FS_CMD_THRD_LIST 1
CONFIG_FS_CMD_THRD_SET_LOG_MASK 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 1
CONFIG_FS_CMD_USB_HOST_LIST 1
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 0
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 0
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS LOG_UPTO(INFO)
CONFIG_MCP2515 0
CONFIG_MODULE_INIT_ADC 0
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 0
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 0
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 0
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 0
CONFIG_MODULE_INIT_DS18B20 0
CONFIG_MODULE_INIT_DS3231 0
CONFIG_MODULE_INIT_ESP_WIFI 0
CONFIG_MODULE_INIT_EXTI 0
CONFIG_MODULE_INIT_FLASH 1
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 0
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 0
CONFIG_MODULE_INIT_NETWORK_INTERFACE 0
CONFIG_MODULE_INIT_NRF24L01 0
CONFIG_MODULE_INIT_OWI 0
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 0
CONFIG_MODULE_INIT_PWM 0
CONFIG_MODULE_INIT_PWM_SOFT 0
CONFIG_MODULE_INIT_RANDOM 0
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 0
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 0
CONFIG_MODULE_INIT_SPI 0
CONFIG_MODULE_INIT_SSL 0
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 0
CONFIG_MODULE_INIT_UPGRADE 0
CONFIG_MODULE_INIT_USB 0
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 0
CONFIG_MONITOR_THREAD 1
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 0
CONFIG_NVM_EEPROM_SOFT 1
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0
CONFIG_NVM_SIZE 2040
CONFIG_OWI 0
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 0
CONFIG_PWM_SOFT 0
CONFIG_RANDOM 0
CONFIG_SD 0
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 0
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 0
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SOFTWARE_I2C 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 0
CONFIG_SPIFFS 0
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 38400
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 32
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 0
CONFIG_START_FILESYSTEM_ADDRESS 0
CONFIG_START_FILESYSTEM_SIZE 65536
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 1
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 768
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 840
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 0
CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 1
CONFIG_THRD_IDLE_STACK_SIZE 384
CONFIG_THRD_MONITOR_STACK_SIZE 512
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 0
CONFIG_USB 0
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 0

STM32VLDISCOVERY

Pinout
_images/stm32vldiscovery.jpg
Pin functions

These are the default pin functions in Simba.

Function Pin
UART0 TX PA9
UART0 RX PA10
UART1 TX PA2
UART1 RX PA3
UART2 TX PC10
UART2 RX PC11
SPI0 SCK PA5
SPI0 MISO PA6
SPI0 MOSI PA7
I2C0 SCL PB8
I2C0 SDA PB9
Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the STM32VLDISCOVERY module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 4352 1672
default-configuration 81664 5986
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 0
CONFIG_ANALOG_INPUT_PIN 0
CONFIG_ANALOG_OUTPUT_PIN 0
CONFIG_ASSERT 1
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 0
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 0
CONFIG_DEBUG 1
CONFIG_DS18B20 0
CONFIG_DS3231 0
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 0
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 0
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 1
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 1
CONFIG_FS_CMD_ESP_WIFI_STATUS 0
CONFIG_FS_CMD_FS_APPEND 1
CONFIG_FS_CMD_FS_COUNTERS_LIST 1
CONFIG_FS_CMD_FS_COUNTERS_RESET 1
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 1
CONFIG_FS_CMD_FS_FORMAT 1
CONFIG_FS_CMD_FS_LIST 1
CONFIG_FS_CMD_FS_PARAMETERS_LIST 1
CONFIG_FS_CMD_FS_READ 1
CONFIG_FS_CMD_FS_REMOVE 1
CONFIG_FS_CMD_FS_WRITE 1
CONFIG_FS_CMD_I2C_READ 1
CONFIG_FS_CMD_I2C_WRITE 1
CONFIG_FS_CMD_LOG_LIST 1
CONFIG_FS_CMD_LOG_PRINT 1
CONFIG_FS_CMD_LOG_SET_LOG_MASK 1
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 1
CONFIG_FS_CMD_PIN_SET_MODE 1
CONFIG_FS_CMD_PIN_WRITE 1
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 1
CONFIG_FS_CMD_SETTINGS_READ 1
CONFIG_FS_CMD_SETTINGS_RESET 1
CONFIG_FS_CMD_SETTINGS_WRITE 1
CONFIG_FS_CMD_SYS_BACKTRACE 1
CONFIG_FS_CMD_SYS_CONFIG 1
CONFIG_FS_CMD_SYS_INFO 1
CONFIG_FS_CMD_SYS_PANIC 1
CONFIG_FS_CMD_SYS_REBOOT 1
CONFIG_FS_CMD_SYS_UPTIME 1
CONFIG_FS_CMD_THRD_LIST 1
CONFIG_FS_CMD_THRD_SET_LOG_MASK 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 1
CONFIG_FS_CMD_USB_HOST_LIST 1
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 0
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 0
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS LOG_UPTO(INFO)
CONFIG_MCP2515 0
CONFIG_MODULE_INIT_ADC 0
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 0
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 0
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 0
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 0
CONFIG_MODULE_INIT_DS18B20 0
CONFIG_MODULE_INIT_DS3231 0
CONFIG_MODULE_INIT_ESP_WIFI 0
CONFIG_MODULE_INIT_EXTI 0
CONFIG_MODULE_INIT_FLASH 1
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 0
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 0
CONFIG_MODULE_INIT_NETWORK_INTERFACE 0
CONFIG_MODULE_INIT_NRF24L01 0
CONFIG_MODULE_INIT_OWI 0
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 0
CONFIG_MODULE_INIT_PWM 0
CONFIG_MODULE_INIT_PWM_SOFT 0
CONFIG_MODULE_INIT_RANDOM 0
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 0
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 0
CONFIG_MODULE_INIT_SPI 0
CONFIG_MODULE_INIT_SSL 0
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 0
CONFIG_MODULE_INIT_UPGRADE 0
CONFIG_MODULE_INIT_USB 0
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 0
CONFIG_MONITOR_THREAD 1
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 0
CONFIG_NVM_EEPROM_SOFT 1
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0
CONFIG_NVM_SIZE 2040
CONFIG_OWI 0
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 0
CONFIG_PWM_SOFT 0
CONFIG_RANDOM 0
CONFIG_SD 0
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 0
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 0
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SOFTWARE_I2C 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 0
CONFIG_SPIFFS 0
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 38400
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 32
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 0
CONFIG_START_FILESYSTEM_ADDRESS 0
CONFIG_START_FILESYSTEM_SIZE 65536
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 1
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 768
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 840
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 0
CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 1
CONFIG_THRD_IDLE_STACK_SIZE 384
CONFIG_THRD_MONITOR_STACK_SIZE 512
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 0
CONFIG_USB 0
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 0

WEMOS D1 mini

Pinout
_images/wemos-d1-mini-pinout.jpg
Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the WEMOS D1 mini module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 265804 33992
default-configuration 311124 46356
Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ADC 1
CONFIG_ANALOG_INPUT_PIN 1
CONFIG_ANALOG_OUTPUT_PIN 0
CONFIG_ASSERT 0
CONFIG_ASSERT_FORCE_FATAL 1
CONFIG_CAN 0
CONFIG_CHIPID 0
CONFIG_CRC_TABLE_LOOKUP 1
CONFIG_DAC 0
CONFIG_DEBUG 1
CONFIG_DS18B20 1
CONFIG_DS3231 1
CONFIG_EMACS_COLUMNS_MAX 80
CONFIG_EMACS_HEAP_SIZE 32768
CONFIG_EMACS_ROWS_MAX 24
CONFIG_ESP_WIFI 1
CONFIG_EXTERNAL_OSCILLATOR_FREQUENCY_HZ 16000000
CONFIG_EXTI 1
CONFIG_FAT16 1
CONFIG_FATAL_ASSERT 1
CONFIG_FILESYSTEM_GENERIC 1
CONFIG_FLASH 1
CONFIG_FLOAT 1
CONFIG_FS_CMD_DS18B20_LIST 1
CONFIG_FS_CMD_ESP_WIFI_STATUS 0
CONFIG_FS_CMD_FS_APPEND 1
CONFIG_FS_CMD_FS_COUNTERS_LIST 1
CONFIG_FS_CMD_FS_COUNTERS_RESET 1
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 1
CONFIG_FS_CMD_FS_FORMAT 1
CONFIG_FS_CMD_FS_LIST 1
CONFIG_FS_CMD_FS_PARAMETERS_LIST 1
CONFIG_FS_CMD_FS_READ 1
CONFIG_FS_CMD_FS_REMOVE 1
CONFIG_FS_CMD_FS_WRITE 1
CONFIG_FS_CMD_I2C_READ 1
CONFIG_FS_CMD_I2C_WRITE 1
CONFIG_FS_CMD_LOG_LIST 1
CONFIG_FS_CMD_LOG_PRINT 1
CONFIG_FS_CMD_LOG_SET_LOG_MASK 1
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1
CONFIG_FS_CMD_NVM_READ 1
CONFIG_FS_CMD_NVM_WRITE 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 1
CONFIG_FS_CMD_PIN_SET_MODE 1
CONFIG_FS_CMD_PIN_WRITE 1
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 1
CONFIG_FS_CMD_SETTINGS_READ 1
CONFIG_FS_CMD_SETTINGS_RESET 1
CONFIG_FS_CMD_SETTINGS_WRITE 1
CONFIG_FS_CMD_SYS_BACKTRACE 1
CONFIG_FS_CMD_SYS_CONFIG 1
CONFIG_FS_CMD_SYS_INFO 1
CONFIG_FS_CMD_SYS_PANIC 1
CONFIG_FS_CMD_SYS_REBOOT 1
CONFIG_FS_CMD_SYS_UPTIME 1
CONFIG_FS_CMD_THRD_LIST 1
CONFIG_FS_CMD_THRD_SET_LOG_MASK 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ENTER 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_ERASE 1
CONFIG_FS_CMD_UPGRADE_APPLICATION_IS_VALID 1
CONFIG_FS_CMD_UPGRADE_BOOTLOADER_ENTER 1
CONFIG_FS_CMD_USB_DEVICE_LIST 1
CONFIG_FS_CMD_USB_HOST_LIST 1
CONFIG_FS_PATH_MAX 64
CONFIG_HARNESS_EXPECT_BUFFER_SIZE 512
CONFIG_HARNESS_SLEEP_MS 300
CONFIG_HTTP_SERVER_REQUEST_BUFFER_SIZE 128
CONFIG_HTTP_SERVER_SSL 0
CONFIG_I2C 1
CONFIG_I2C_SOFT 1
CONFIG_LED_7SEG_HT16K33 1
CONFIG_LINUX_SOCKET_DEVICE 0
CONFIG_LOG_MASK_SYS LOG_UPTO(INFO)
CONFIG_MCP2515 0
CONFIG_MODULE_INIT_ADC 1
CONFIG_MODULE_INIT_ANALOG_INPUT_PIN 1
CONFIG_MODULE_INIT_ANALOG_OUTPUT_PIN 0
CONFIG_MODULE_INIT_BUS 1
CONFIG_MODULE_INIT_CAN 0
CONFIG_MODULE_INIT_CHAN 1
CONFIG_MODULE_INIT_CHIPID 0
CONFIG_MODULE_INIT_DAC 0
CONFIG_MODULE_INIT_DS18B20 1
CONFIG_MODULE_INIT_DS3231 1
CONFIG_MODULE_INIT_ESP_WIFI 1
CONFIG_MODULE_INIT_EXTI 1
CONFIG_MODULE_INIT_FLASH 1
CONFIG_MODULE_INIT_FS 1
CONFIG_MODULE_INIT_I2C 1
CONFIG_MODULE_INIT_I2C_SOFT 1
CONFIG_MODULE_INIT_INET 1
CONFIG_MODULE_INIT_LOG 1
CONFIG_MODULE_INIT_MCP2515 0
CONFIG_MODULE_INIT_NETWORK_INTERFACE 1
CONFIG_MODULE_INIT_NRF24L01 0
CONFIG_MODULE_INIT_OWI 1
CONFIG_MODULE_INIT_PIN 1
CONFIG_MODULE_INIT_PING 1
CONFIG_MODULE_INIT_PWM 0
CONFIG_MODULE_INIT_PWM_SOFT 1
CONFIG_MODULE_INIT_RANDOM 1
CONFIG_MODULE_INIT_RWLOCK 1
CONFIG_MODULE_INIT_SD 0
CONFIG_MODULE_INIT_SEM 1
CONFIG_MODULE_INIT_SETTINGS 1
CONFIG_MODULE_INIT_SOCKET 1
CONFIG_MODULE_INIT_SPI 1
CONFIG_MODULE_INIT_SSL 0
CONFIG_MODULE_INIT_STD 1
CONFIG_MODULE_INIT_THRD 1
CONFIG_MODULE_INIT_TIMER 1
CONFIG_MODULE_INIT_UART 1
CONFIG_MODULE_INIT_UART_SOFT 1
CONFIG_MODULE_INIT_UPGRADE 0
CONFIG_MODULE_INIT_USB 0
CONFIG_MODULE_INIT_USB_DEVICE 0
CONFIG_MODULE_INIT_USB_HOST 0
CONFIG_MODULE_INIT_WATCHDOG 0
CONFIG_MONITOR_THREAD 0
CONFIG_MONITOR_THREAD_PERIOD_US 2000000
CONFIG_NRF24L01 0
CONFIG_NVM_EEPROM_SOFT 0
CONFIG_NVM_EEPROM_SOFT_BLOCK_0_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_BLOCK_1_SIZE 16384
CONFIG_NVM_EEPROM_SOFT_CHUNK_SIZE (CONFIG_NVM_SIZE + 8)
CONFIG_NVM_EEPROM_SOFT_FLASH_DEVICE_INDEX 0
CONFIG_NVM_SIZE 2040
CONFIG_OWI 1
CONFIG_PANIC_ASSERT 1
CONFIG_PIN 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_PWM 0
CONFIG_PWM_SOFT 1
CONFIG_RANDOM 1
CONFIG_SD 0
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SETTINGS_BLOB 1
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 0
CONFIG_SHELL_PROMPT “$ “
CONFIG_SHT3XD 1
CONFIG_SOAM_EMBEDDED_DATABASE 0
CONFIG_SOCKET_RAW 1
CONFIG_SOFTWARE_I2C 1
CONFIG_SPC5_BOOT_ENTRY_RCHW 1
CONFIG_SPC5_RAM_CLEAR_ALL 1
CONFIG_SPI 1
CONFIG_SPIFFS 1
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 76800
CONFIG_START_CONSOLE_UART_RX_BUFFER_SIZE 32
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 1
CONFIG_START_FILESYSTEM_ADDRESS 0x00300000
CONFIG_START_FILESYSTEM_SIZE 0xFB000
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_NVM 1
CONFIG_START_SHELL 1
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 1536
CONFIG_START_SOAM 0
CONFIG_START_SOAM_PRIO 30
CONFIG_START_SOAM_STACK_SIZE 1536
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_INTERRUPTS 1
CONFIG_SYSTEM_INTERRUPT_STACK_SIZE 0
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYSTEM_TICK_SOFTWARE 1
CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_PANIC_KICK_WATCHDOG 0
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_DEFAULT_LOG_MASK LOG_UPTO(INFO)
CONFIG_THRD_ENV 1
CONFIG_THRD_IDLE_STACK_SIZE 768
CONFIG_THRD_MONITOR_STACK_SIZE 768
CONFIG_THRD_SCHEDULED 1
CONFIG_THRD_STACK_HEAP 0
CONFIG_THRD_STACK_HEAP_SIZE 0
CONFIG_THRD_TERMINATE 1
CONFIG_TIME_UNIX_TIME_TO_DATE 1
CONFIG_UART 1
CONFIG_UART_SOFT 1
CONFIG_USB 0
CONFIG_USB_DEVICE 0
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341
CONFIG_USB_HOST 0
CONFIG_WATCHDOG 0
Mcu

esp8266

Examples

Below is a list of simple examples that are useful to understand the basics of Simba.

There are a lot more examples and unit tests on Github that shows how to use most of the Simba modules.

Analog Read

About

Read the value of an analog pin periodically once every second and print the read value to standard output.



Source code
/**
 * @section License
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2017, Erik Moqvist
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 * This file is part of the Simba project.
 */

#include "simba.h"

int main()
{
    int value;
    struct analog_input_pin_t pin;

    sys_start();
    analog_input_pin_module_init();

    /* Initialize the analog input pin. */
    if (analog_input_pin_init(&pin, &pin_a0_dev) != 0) {
        std_printf(FSTR("Failed to initialize the analog input pin.\r\n"));
        return (-1);
    }

    while (1) {
        /* Read the analog pin value and print it. */
        value = analog_input_pin_read(&pin);
        std_printf(FSTR("value = %d\r\n"), value);

        /* Wait 100 ms. */
        thrd_sleep_ms(100);
    }

    return (0);
}

The source code can also be found on Github in the examples/analog_read folder.

Build and run

Build and run the application.

$ cd examples/analog_read
$ make -s BOARD=<board> run
value = 234
value = 249
value = 230

Analog Write

About

Write analog values to an analog output pin to form a sawtooth wave. Connect a LED to the analog output pin and watch the brightness of the LED change.

Source code
/**
 * @section License
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2017, Erik Moqvist
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 * This file is part of the Simba project.
 */

#include "simba.h"

int main()
{
    int value;
    struct analog_output_pin_t pin;

    sys_start();
    analog_output_pin_module_init();

    /* Initialize the analog output pin. */
    analog_output_pin_init(&pin, &pin_d10_dev);

    value = 0;

    while (1) {
        /* Write a sawtooth wave to the analog output pin. */
        analog_output_pin_write(&pin, value);
        value += 5;
        value %= 1024;

        /* Wait ten milliseconds. */
        thrd_sleep_ms(10);
    }

    return (0);
}

The source code can also be found on Github in the examples/analog_write folder.

Build and run

Build and upload the application.

$ cd examples/analog_write
$ make -s BOARD=<board> upload

DS18B20

About

Read and print the temperature measured with one or more DS18B20 sensors.



Source code
/**
 * @section License
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2017, Erik Moqvist
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 * This file is part of the Simba project.
 */

#include "simba.h"

int main()
{
    struct owi_driver_t owi;
    struct ds18b20_driver_t ds;
    struct owi_device_t devices[4];
    char temperature[16], *temperature_p;
    int number_of_sensors;
    int i;

    /* Initialization. */
    sys_start();
    ds18b20_module_init();
    owi_init(&owi, &pin_d7_dev, devices, membersof(devices));
    ds18b20_init(&ds, &owi);
    time_busy_wait_us(50000);

    /* Search for devices on the OWI bus. */
    number_of_sensors = owi_search(&owi);
    std_printf(FSTR("Number of sensors: %d\r\n"), number_of_sensors);

    while (1) {
        /* Take a new temperature sample. */
        ds18b20_convert(&ds);

        for (i = 0; i < owi.len; i++) {
            if (devices[i].id[0] != DS18B20_FAMILY_CODE) {
                continue;
            }

            temperature_p = ds18b20_get_temperature_str(&ds,
                                                        devices[i].id,
                                                        temperature);

            if (temperature_p == NULL) {
                temperature_p = "failed to get";
            }

            std_printf(FSTR("Device id: %02x %02x %02x %02x %02x %02x %02x %02x,"
                            " Temperature: %s\r\n"),
                       (unsigned int)devices[i].id[0],
                       (unsigned int)devices[i].id[1],
                       (unsigned int)devices[i].id[2],
                       (unsigned int)devices[i].id[3],
                       (unsigned int)devices[i].id[4],
                       (unsigned int)devices[i].id[5],
                       (unsigned int)devices[i].id[6],
                       (unsigned int)devices[i].id[7],
                       temperature_p);
        }
    }

    return (0);
}

The source code can also be found on Github in the examples/ds18b20 folder.

Build and run

Build and run the application.

$ cd examples/ds18b20
$ make -s BOARD=<board> run
Number of sensors: 2
Device id: 28 9c 1d 5d 05 00 00 32, Temperature: 22.6250
Device id: 28 95 32 5d 05 00 00 33, Temperature: 22.6875

Filesystem

About

Create the file counter.txt and write 0 to it. Everytime the application is restarted the counter is incremented by one.

Source code
/**
 * @section License
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2017, Erik Moqvist
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 * This file is part of the Simba project.
 */

#include "simba.h"

#if !defined(BOARD_ARDUINO_DUE) && !defined(ARCH_ESP) && !defined(ARCH_ESP32)
#    error "This example can only be built for Arduino Due, ESP and ESP32."
#endif

/**
 * Increment the counter in 'counter.txt'.
 */
static int increment_counter(void)
{
    char buf[32];
    struct fs_file_t file;
    long counter;
    size_t size;

    std_printf(FSTR("Incrementing the counter in 'counter.txt'.\r\n"));

    if (fs_open(&file, "counter.txt", FS_RDWR) != 0) {
        /* Create the file if missing. */
        if (fs_open(&file,
                    "counter.txt",
                    FS_CREAT | FS_TRUNC | FS_RDWR) != 0) {
            return (-1);
        }

        if (fs_write(&file, "0", 2) != 2) {
            return (-2);
        }

        if (fs_seek(&file, 0, FS_SEEK_SET) != 0) {
            return (-3);
        }
    }

    if (fs_read(&file, buf, 16) <= 0) {
        return (-4);
    }

    if (std_strtol(buf, &counter) == NULL) {
        return (-5);
    }

    /* Increment the counter. */
    counter++;
    std_sprintf(buf, FSTR("%lu"), counter);
    size = strlen(buf) + 1;

    if (fs_seek(&file, 0, FS_SEEK_SET) != 0) {
        return (-6);
    }

    if (fs_write(&file, buf, size) != size) {
        return (-7);
    }

    if (fs_close(&file) != 0) {
        return (-8);
    }

    std_printf(FSTR("Counter incremented to %lu\r\n"), counter);

    return (0);
}

int main()
{
    int res;

    sys_start();
    std_printf(sys_get_info());

    /* Increment the counter. */
    res = increment_counter();

    if (res != 0) {
        std_printf(FSTR("Failed to increment the counter with error %d.\r\n"),
                   res);
    }

    /* The shell thread is started in sys_start() so just suspend this
       thread. */
    thrd_suspend(NULL);

    return (0);
}

The source code can also be found on Github in the examples/filesystem folder.

Build and run

Build and run the application.

$ cd examples/filesystem
$ make -s BOARD=arduino_due upload

The output in the terminal emulator:

Incrementing the counter in 'counter.txt'.
Counter incremented to 1.
<manually reset the board>
Incrementing the counter in 'counter.txt'.
Counter incremented to 2.
<manually reset the board>
Incrementing the counter in 'counter.txt'.
Counter incremented to 3.

Hello World

About

This application prints “Hello world!” to standard output.



Source code
/**
 * @section License
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2017, Erik Moqvist
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 * This file is part of the Simba project.
 */

#include "simba.h"

int main()
{
    /* Start the system. */
    sys_start();

    std_printf(FSTR("Hello world!\r\n"));

    return (0);
}

The source code can also be found on Github in the examples/hello_world folder.

Build and run

Build and run the application.

$ cd examples/hello_world
$ make -s BOARD=<board> run
...
Hello world!
$

HTTP Client

About

Conenct to a remote host perform a HTTP GET action to fetch the root page ‘/’ from the remote host.

Define CONFIG_START_NETWORK_INTERFACE_WIFI_SSID and CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD in config.h to the SSID and password of your WiFi, otherwise the board will fail to connect to the WiFi network. Alternatively, the defines can be given as defines on the make command line as seen in the example below.

Source code
/**
 * @section License
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2017, Erik Moqvist
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 * This file is part of the Simba project.
 */

#include "simba.h"

/* The ip address of the host to connect to. */
#define REMOTE_HOST_IP 216.58.211.142

int main()
{
    struct socket_t socket;
    char http_request[] =
        "GET / HTTP/1.1\r\n"
        "Host: " STRINGIFY(REMOTE_HOST_IP) "\r\n"
        "\r\n";
    char http_response[64];
    char remote_host_ip[] = STRINGIFY(REMOTE_HOST_IP);
    struct inet_addr_t remote_host_address;

    /* Start the system. Brings up the configured network interfaces
       and starts the TCP/IP-stack. */
    sys_start();

    /* Open the tcp socket. */
    socket_open_tcp(&socket);

    std_printf(FSTR("Connecting to '%s'.\r\n"), remote_host_ip);

    if (inet_aton(remote_host_ip, &remote_host_address.ip) != 0) {
        std_printf(FSTR("Bad ip address ''.\r\n"), remote_host_ip);
        return (-1);
    }

    remote_host_address.port = 80;

    if (socket_connect(&socket, &remote_host_address) != 0) {
        std_printf(FSTR("Failed to connect to '%s'.\r\n"), remote_host_ip);
        return (-1);
    }

    /* Send the HTTP request... */
    if (socket_write(&socket,
                     http_request,
                     strlen(http_request)) != strlen(http_request)) {
        std_printf(FSTR("Failed to send the HTTP request.\r\n"));
        return (-1);
    }

    /* ...and receive the first 64 bytes of the response. */
    if (socket_read(&socket,
                    http_response,
                    sizeof(http_response)) != sizeof(http_response)) {
        std_printf(FSTR("Failed to receive the response.\r\n"));
    }

    std_printf(FSTR("First 64 bytes of the response:\r\n"
                    "%s"),
               http_response);

    /* Close the socket. */
    socket_close(&socket);

    return (0);
}

The source code can also be found on Github in the examples/http_client folder.

Build and run

Build and run the application. It must be built for ESP12E or ESP01 since those are the only boards with a network connection (WiFi).

$ cd examples/http_client
$ make -s BOARD=esp12e CDEFS_EXTRA="CONFIG_START_NETWORK_INTERFACE_WIFI_SSID=Qvist CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD=FooBar" run
...
Connecting to WiFi with SSID 'Qvist'.
Connected to WiFi with SSID 'Qvist'. Got IP address '192.168.1.103'.
Connecting to '216.58.211.142'.
First 64 bytes of the response:
HTTP/1.1 301 Moved Permanently
Location: http://www.google.com/GET / HTTP/1.1
Host: 216.58.211.142
...
$

Ping

About

Ping a remote host periodically once every second.

Source code
/**
 * @section License
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2017, Erik Moqvist
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 * This file is part of the Simba project.
 */

#include "simba.h"

/* The ip address of the host to ping. */
#define REMOTE_HOST_IP 216.58.211.142

int main()
{
    int res, attempt;
    char remote_host_ip[] = STRINGIFY(REMOTE_HOST_IP);
    struct inet_ip_addr_t remote_host_ip_address;
    struct time_t round_trip_time, timeout;

    sys_start();

    if (inet_aton(remote_host_ip, &remote_host_ip_address) != 0) {
        std_printf(FSTR("Bad ip address '%s'.\r\n"), remote_host_ip);
        return (-1);
    }

    timeout.seconds = 3;
    timeout.nanoseconds = 0;
    attempt = 1;

    /* Ping the remote host once every second. */
    while (1) {
        res = ping_host_by_ip_address(&remote_host_ip_address,
                                      &timeout,
                                      &round_trip_time);

        if (res == 0) {
            std_printf(FSTR("Successfully pinged '%s' (#%d).\r\n"),
                       remote_host_ip,
                       attempt);
        } else {
            std_printf(FSTR("Failed to ping '%s' (#%d).\r\n"),
                       remote_host_ip,
                       attempt);
        }

        attempt++;
        thrd_sleep(1);
    }

    return (0);
}

The source code can also be found on Github in the examples/ping folder.

Build and run

Build and run the application.

$ cd examples/ping
$ make -s BOARD=<board> run
Successfully pinged '192.168.1.100' in 20 ms (#1).
Successfully pinged '192.168.1.100' in 20 ms (#2).
Successfully pinged '192.168.1.100' in 20 ms (#3).

Queue

About

Use a queue to communicate between two threads.

Source code
/**
 * @section License
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2017, Erik Moqvist
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 * This file is part of the Simba project.
 */

#include "simba.h"

static struct queue_t queue;

static THRD_STACK(writer_stack, 256);

static void *writer_main(void *arg_p)
{
    int value;

    /* Write to the queue. */
    value = 1;
    queue_write(&queue, &value, sizeof(value));

    return (NULL);
}

int main()
{
    int value;

    sys_start();
    queue_init(&queue, NULL, 0);
    thrd_spawn(writer_main, NULL, 0, writer_stack, sizeof(writer_stack));

    /* Read from the queue. */
    queue_read(&queue, &value, sizeof(value));

    std_printf(FSTR("read value = %d\r\n"), value);

    return (0);
}

The source code can also be found on Github in the examples/queue folder.

Build and run

Build and upload the application.

$ cd examples/queue
$ make -s BOARD=<board> run
read value = 1

Shell

About

Use the serial port to monitor and control the application.

Source code
/**
 * @section License
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2017, Erik Moqvist
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 * This file is part of the Simba project.
 */

#include "simba.h"

/* Hello world command. */
static struct fs_command_t cmd_hello_world;

static struct shell_t shell;

/**
 * The shell command callback for "/hello_world".
 */
static int cmd_hello_world_cb(int argc,
                              const char *argv[],
                              void *out_p,
                              void *in_p,
                              void *arg_p,
                              void *call_arg_p)
{
    /* Write "Hello World!" to the output channel. */
    std_fprintf(out_p, OSTR("Hello World!\r\n"));

    return (0);
}

int main()
{
    /* Start the system. */
    sys_start();

    std_printf(sys_get_info());

    /* Register the hello world command. */
    fs_command_init(&cmd_hello_world,
                    CSTR("/hello_world"),
                    cmd_hello_world_cb,
                    NULL);
    fs_command_register(&cmd_hello_world);

    /* Start the shell. */
    shell_init(&shell,
               sys_get_stdin(),
               sys_get_stdout(),
               NULL,
               NULL,
               NULL,
               NULL);
    shell_main(&shell);

    return (0);
}

The source code can also be found on Github in the examples/shell folder.

Build and run

Build and run the application.

$ cd examples/shell
$ make -s BOARD=<board> upload

Communicate with the board using a serial terminal emulator, for example TeraTerm.

Type hello_world in the terminal emulator and press Enter. Hello World! is printed.

Press Tab to print a list of all registered commands and try them if you want to.

$ hello_world
Hello World!
$ <tab>
drivers/
filesystems/
hello_world
help
history
kernel/
logout
oam/
$ kernel/thrd/list
            NAME        STATE  PRIO   CPU  MAX-STACK-USAGE  LOGMASK
           shell      current     0    0%       358/  5575     0x0f
            idle        ready   127    0%        57/   156     0x0f
$

Timer

About

Start a periodic timer that writes an event to the main thread. The main thread reads the event and prints “timeout” to the standard output.

Source code
/**
 * @section License
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2017, Erik Moqvist
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 * This file is part of the Simba project.
 */

#include "simba.h"

#define TIMEOUT_EVENT    0x1

static struct event_t event;
static struct timer_t timer;

static void timer_cb(void *arg_p)
{
    uint32_t mask;

    mask = TIMEOUT_EVENT;
    event_write_isr(&event, &mask, sizeof(mask));
}

int main()
{
    uint32_t mask;
    struct time_t timeout;

    sys_start();
    event_init(&event);

    /* Initialize and start a periodic timer. */
    timeout.seconds = 1;
    timeout.nanoseconds = 0;
    timer_init(&timer, &timeout, timer_cb, NULL, TIMER_PERIODIC);
    timer_start(&timer);

    while (1) {
        mask = TIMEOUT_EVENT;
        event_read(&event, &mask, sizeof(mask));

        std_printf(FSTR("timeout\r\n"));
    }

    return (0);
}

The source code can also be found on Github in the examples/timer folder.

Build and run

Build and upload the application.

$ cd examples/timer
$ make -s BOARD=<board> run
timeout
timeout
timeout

Library Reference

Simba’s standard library is very extensive, offering a wide range of facilities as indicated by the long table of contents listed below. The library contains modules used by many developers in their everyday programming.

Besides the generated documentation, the source code of the interfaces and their implementatins are available on Github.

kernel

The kernel package is the heart in Simba. It implements the thread scheduler.

The kernel package on Github.

assert — Assertions

Source code: src/kernel/assert.h


Defines

FATAL(n) (-n)