EclipseArmebs4/DemoProjects

From UIT
Revision as of 16:02, 3 December 2014 by Marc.pignat (Talk | contribs)
Jump to: navigation, search

Contents

Some sample code is available in the subversion repository, please have a look at the First steps page. The sample projects are located in the trunk/demos/PROJECT_NAME directory.

libheivs_stm32

All our sample (and labs) code use the libheivs_stm32 library, it source can be found at svn+https://repos.hevs.ch/svn/armebs4/trunk/libheivs_stm32. This is an eclipse project that must be checked out into the eclipse workspace. This project can't be build, it is linked into other projects and compiled directly into them.

Configurable modules

Several libraries have integrated into our library. The heivs and stm32 parts mostly contain drivers and support code and are therefore mandatory. Each project can configure optional modules by modifying the project's config/config.h file.

Name Version Brief Provider License config/config.h
heivs r640 Board support package and more ARMEBS4 team FIXME (mandatory)
stm32 1.1.0 + custom changes STM32 support ST unkown (mandatory)
ugfx  ? + custom changes µGFX graphics library µGFX GFX License version 1.2 USE_UGFX
freertos 8.0.0 + custom changes FreeRTOS real time kernel FreeRTOS GPLv2 modified license USE_FREERTOS
cmsis 1.4.3 + custom changes CMSIS MCU Software Standard ARM CMSIS license (automatic)
fatfs 0.10a + custom changes Board support package ChaN custom - free software USE_FATFS
lwip 1.4.1 + custom changes A Lightweight TCP/IP stack lwip Modified BSD License USE_LWIP
jpeg 9a + custom changes libjpeg ijg custom - free software USE_LIBJPEG
cyassl 3.2.0 + custom changes Cryptographic and SSL library yassl GPLv2 USE_CYASSL

BOARD_XXX

Several boards are supported (see libheivs/include/heivs/bsp.h). For the ARMEBS4, the BOARD_ARMEBS4 symbol MUST be define in "project properties/C/C++ Build/Cross GCC Compiler/Symbols".

current_project/config/config.h

Each project MUST contain the config/config.h file which can define some compilation options. A complete and commented sample file can be found in libheivs_stm32/include/heivs/samples/config.h.txt

Define Brief Default
USE_UGFX, USE_FREERTOS, USE_FATFS, USE_LWIP, USE_FATFS, USE_LWIP, USE_LIBJPEG, USE_CYASSL See Configurable modules 0 (== desactivated)
USE_STDIO_USART Which serial port will be used for stdio 0 (== use bus_usart[0] for stdio)
USE_SEMIHOSTING stdio using semihosting (over JTAG) 0 (don't use semihosting)
USE_STDIO_NOBUF Disable stdio buffers 1 (buffers disabled)
USE_STDIO_ECHO Echo every char received on stdin to stdout 0 (no echo)
USE_STDIO_AUTO_CR_BEFORE_LF Fix stio line endings for Windows 1 (add CR before LF)
USE_STM32_LIB_ASSERT Check most parameters of stm32 library functions 0 (disabled)
USE_STM32_USB_USE_DEVICE_MODE, USE_STM32_USB_HOST_MODE, USE_STM32_USB_OTG_MODE stm32 USB stack configuration 0 (disabled)

newlib's iprintf/iscanf

newlib implements some lightweight versions of *printf and *scanf fuctions named *iprintf and *iscanf. These functions does not support floating point numbers. for instance the vfiprintf can be used instead of vfprintf where floating point is not required.

The heivs_bus_t abstraction

FIXME

Exclude from build

FIXME


Sample projects

Every project contains:

  • The basic configuration
    • working settings for the compiler/linker
    • BOARD_XXX is defined in properties/C/C++ Build/Cross GCC Compiler/Symbols
  • config/config.h file : the configuration of the project
  • project_name.lauch
  • libheivs_stm32 -> an eclipse link to the libheivs_stm32 library

_MODEL

Sample project, mainly used for storing the default compile and debug configuration. This project is always up to date with the latest and best recommended settings.

Peripherals used : leds, buttons (polling)

mems

Display accelerometer and gyroscope values on the LCD.

Peripherals used : accelerometer, gyroscope, LCD

stdio

stdin/stdout example.

Peripherals used : serial port

buttons_interrupts

Copy the button values on the led and display the button's state on the serial port. This software use the BSP abstraction for buttons.

Peripherals used : buttons, serial port

gpio_interrupts

Same as buttons_interrupts, but using gpio_interrupts (not the BSP abstraction for buttons).

Peripherals used : gpio, serial port

hashes

Comparison of software and hardware MD5 implementation.

Peripherals used : hash engine

hello_cpp

Minimal project using C++

Peripherals used : serial port

hello_cpp_nano

Minimal project using C++ and newlib-nano. The newlib-nano library is smaller but some features are not available (C++ exception, no floating point printf, ...)

Peripherals used : serial port

hello_freertos

Simple FreeRTOS sample code, creates 3 task printing on the serial port and one task for each led.

Peripherals used : serial port

hello_lcd_freertos

Simple FreeRTOS + uGFX sample code. Print on the serial port when a graphical button is clicked and put chars from the keyboard on the screen.

Peripherals used : LCD, touchscreen, serial port, keyboard

leds_usb_serial_cdc

USB CDC echo. This sample code will create a pseudo serial over the USB and will echo back every character received.

Peripherals used : leds, USB slave

random

Test the random number generator from the stm32f4 family.

Peripherals used : RNG, serial port

sd_card

Test the micro SD/SDHC card, low-level access and filesystem (fat32) access Peripherals used : SD, serial port

sections

Show how to force the compiler to use non-default section (using external RAM, ...) Peripherals used : external RAM, serial port

Peripherals used :

Peripherals used :

Peripherals used :

Peripherals used :

Peripherals used :

Peripherals used :

Personal tools
Namespaces
Variants
Actions
Navigation
Browse
Toolbox