Coder Social home page Coder Social logo

i-syst / ehal Goto Github PK

View Code? Open in Web Editor NEW
95.0 18.0 24.0 31.39 MB

Embedded Hardware Abstraction Library

License: BSD 3-Clause "New" or "Revised" License

C 96.81% C++ 1.87% Python 0.01% Swift 0.01% Assembly 0.26% PHP 1.04%
c c-plus-plus embedded arm osx windows sensortag iot mcu bluetooth-low-energy

ehal's Introduction

I-SYST inc.

nRF5x product line

Nordic nRF51 & nRF52 product line

EHAL (Embedded Hardware Abstraction Library)

NOTE : This library is now replaced by https://github.com/IOsonata/IOsonata

This is a multi-archtecture multi-platform Hardware Abstraction Library. The main purpose is to create a layer of generic peripherals and devices interface (drivers) that is common across MCU architectures and platforms. This will allow creation of more reusable and portable applications (firmware for most part) that can be moved form on MCU to an other with minimal changes.

See https://embeddedsoftdev.blogspot.ca/p/h.html for more detail installation and setup of development environment.

Library online documentation located here https://www.i-syst.com/docs/EHAL/

Library source code on GitHub at https://github.com/I-SYST/EHAL

  • Need to port a specific driver or MCU ? Put your request in issues. It will get done eventually. If you want to have it faster, a fee based port is available.

external vendors' SDK and library required :

CMSIS : ARM CMSIS SDK for all ARM platform

nRF5_SDK : Nordic nRF5x Bluetooth Low Energy

nrf5_SDK_Mesh : Nordic nRF5 SDK for Bluetoth Mesh

Micro-ECC : Encryption library

ICM-20948 Motion_Driver : Create a user at https://www.invensense.com/developers. Under "Downloads" download "DK-20948 eMD-SmartMotion ...". Unzip the downloaded file and navigate to EMD-Core/sources. Copy the folder Invn to external/Invn as indected in the folder tree bellow.

KSDK : Kinetis SDK

BSEC : Bosch Sensortec Environmental Cluster (BSEC) Software for #BME680 environmental sensor. BSEC is needed for calculating Air Quality Index. Go to https://www.bosch-sensortec.com/bst/products/all_products/bsec at the end of the page. Select checkbox to accept license terms to download. Unzip the the downloaded file. Rename the extracted folder BSEC and copy the whole folder to external as indicated in the folder tree bellow.

BLUEIO-TAG-EVIM

BLYST Nano sensor board

EHAL folder structure

The way the EHAL folder is structure is simple. The deeper you go inside the more it is specific the the architecture or platform. The parent folder contains all that is commonly available to the child folder. Which means, source file from child folder can access any source in the upper parent folder but not the other way around. This is the way to keep the abstraction separated from implementation and easier to keep track of things.

There are 2 main libraries in the EHAL for each ARM based MCU.

  • CMSIS : This contains the startup code, main interrupt vector and RTOS if available. This lib is required for all firmware
  • EHAL : This is the main hardware abstraction library. It contains all peripheral drivers, SPI, I2C, UART, Timer, BLE,...
/your_root     - Development root directory
 |-- external        - Contains downloaded SDKs from silicon vendors
 |   |-- CMSIS           - ARM CMSIS SDK for all ARM platform (https://github.com/ARM-software/CMSIS_5)
 |   |-- nRF5_SDK        - Latest Nordic SDK (https://developer.nordicsemi.com)
 |   |-- nrf5_SDK_Mesh   - Latest Nordic SDK for Mesh (https://www.nordicsemi.com/eng/nordic/Products/nRF5-SDK-for-Mesh/nRF5-SDK-for-Mesh/62377)
 |   |---nRF5_SDK_12     - Last version of Nordick SDK12 for nRF51 series
 |   |-- Micro-ECC       - Micro-ECC (download from https://github.com/kmackay/micro-ecc)
 |   |-- KSDK            - Kinetis SDK
 |   |-- BSEC            - Bosch Sensortec Environmental Cluster (BSEC) Software (https://www.bosch-sensortec.com/bst/products/all_products/bsec) for #BME680
 |   |-- MPL             - Invensense Motion Driver (download https://www.invensense.com/developers)
 |   |   |-- core        - Copy core from motion_driver_6.12/arm/STM32F4_MD6/Projects/eMD6 here
 |   |   |-- lib
 |   |   |   |-- m0      - Unzip the liblibmplmpu_m0.zip, copy liblibmplmpu.a here
 |   |   |   |-- m3      - Unzip the liblibmplmpu_m3.zip, copy liblibmplmpu.a here
 |   |   |   |-- m4hfp   - Unzip the liblibmplmpu_m4_hardfp.zip, copy liblibmplmpu.a here
 |   |   |   |-- m4nfp   - Unzip the liblibmplmpu_m4_npfp.zip, copy liblibmplmpu.a here
 |   |   |   |-- m4sfp   - Unzip the liblibmplmpu_m4_softfp.zip, copy liblibmplmpu.a here
 |   |-- Invn            - Invensense SmartMotion Driver (download https://www.invensense.com/developers) 
 |   |   |-- Devices
 |   |   |...
 |   |...
 |   |
 |-- EHAL      - Put the EHAL here
 |   |-- docs        - Contains EHAL Doxygen documentations. (https://i-syst.github.io/docs/EHAL/)
 |   |-- include     - Generic include common to all platform
 |   |   |-- bluetooth   - Generic definition for Bluetooth
 |   |   |-- converters  - Generic definition for ADV, DAC, etc...
 |   |   |-- coredev     - Generic core processor builtin devices such as i2c, uart, spi, timer, etc...
 |   |   |-- miscdev     - Generic definition for other non categorized devices
 |   |   |-- sensors     - Generic definition for al sort of sensors (environmental, motion, etc...)
 |   |   |-- usb         - Generic definition for USB
 |   |-- src         - Generic implementation source common to all platform
 |   |
 |   |-- ARM         - Cortex-M series based MCU
 |   |   |-- include     - Common include for all ARM platform
 |   |   |-- src         - Common source for all ARM platform
 |   |   |
 |   |   |-- NXP         - NXP based MCU
 |   |   |   |-- LPC11xx      - LPC11xx processor workspace
 |   |   |   |   |-- CMSIS    - Static library containing startup code, interrupt vector, etc...
 |   |   |   |   |-- EHAL     - Embedded Hardware Abstraction Library project for NXP
 |   |   |   |   |   |-- include
 |   |   |   |   |   |-- src
 |   |   |   |   |-- exemples - Example code
 |   |   |   |   |
 |   |   |   |-- LPC17xx      - LPC17xx processor workspace
 |   |   |   |   |-- CMSIS    - Static library containing startup code, interrupt vector, etc...
 |   |   |   |   |-- EHAL     - Embedded Hardware Abstraction Library project for NXP
 |   |   |   |   |   |-- include
 |   |   |   |   |   |-- src
 |   |   |   |   |-- exemples - Example code
 |   |   |
 |   |   |-- Nordic      - Nordic Semiconductor based  MCU
 |   |   |   |-- nRF51        - nRF51 processor workspace
 |   |   |   |   |-- CMSIS        - Static library containing startup code, interrupt vector, etc...
 |   |   |   |   |-- EHAL         - Embedded Hardware Abstraction Library project for Nordic
 |   |   |   |   |   |-- include
 |   |   |   |   |   |-- src
 |   |   |   |   |-- exemples     - exemple projects
 |   |   |   |-- nRF52        - nRF52 processor workspace
 |   |   |   |   |-- CMSIS        - Static library containing startup code, interrupt vector, etc...
 |   |   |   |   |-- EHAL         - Embedded Hardware Abstraction Library project for Nordic
 |   |   |   |   |   |-- include
 |   |   |   |   |   |-- src
 |   |   |   |   |-- exemples     - exemple projects
 |   |   |
 |   |   |-- ST          - ST based MCU
 |   |   |   |-- STM32F0xx
 |   |   |   |-- STM32F4xx
 |   |   |   |-- STM32L0xx
 |   |   |
 |   |   |-- TI          - Texas Instruments based MCU
 |   |   |   |-- CC3200
 |   |   |   |   |-- CMSIS
 |   |   |   |   |-- EHAL
 |   |   |   |   |   |-- include
 |   |   |   |   |   |-- src
 |   |   |   |   |-- exemples - Example code
 |   |   |
 |   |   |-- Freescale   - Freescale based MCU
 |   |   |   |-- MKL
 |   |   |   |   |-- CMSIS
 |   |   |   |   |-- EHAL
 |   |   |   |   |   |-- include
 |   |   |   |   |   |-- src
 |   |   |   |   |-- exemples - Example code
 |   |...
 |   |-- Linux
 |   |   |...
 |   |-- OSX
 |   |   |...
 |   |-- Win
 |   |   |...
 | ...

All EHAL projects are Eclipse native project with GCC compiler. For Eclipse & Gcc installations, follow this blog page http://embeddedsoftdev.blogspot.ca/p/eclipse.html.

ehal's People

Contributors

cyberluke avatar hnhoan avatar souellet-ms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ehal's Issues

nRF 51 library 'SVCALL' syntax error

Hi,

I have tried to compile the IOsonata_nRF51 library, but I received this error:

../../../../../../../external/nRF5_SDK_12/components/softdevice/s130/headers/ble_gap.h:1452:1: note: in expansion of macro 'SVCALL' SVCALL(SD_BLE_GAP_LESC_DHKEY_REPLY, uint32_t, sd_ble_gap_lesc_dhkey_reply(uint16_t conn_handle, ble_gap_lesc_dhkey_t const *p_dhkey)); ^ ../../../../../../../external/nRF5_SDK_12/components/softdevice/s130/headers/nrf_svc.h:69:6: error: impossible constraint in 'asm'

ARM-GCC: 10.2.1 20201103
OS: Windows 7
SDK: nRF5_SDK_12.3.0_d7731ad

Do you have any idea?
Thank you!

Slight typo ...

The (sub)directory name exemples, should be spelled "examples"

Thanks for posting, very neat library...

Enabling multiple interrupt causes multiple triggering even when only one should be triggered

Using EHAL for Nordic nRF52.

When enabling multiple interrupt using IOPinEnableInterrupt with different Interrupt number, if we trigger an interrupt by applying the desired transition on a specific pin, the GPIOTE_IRQHandler called all assigned callback for all PIN, instead of only the triggered pin. The IRQHandler should not check for either EVENTS_IN or EVENTS_PORT is valid but the condition should be separated, in order to detect specific pin interrupt (EVENTS_IN) and sense detect (EVENTS_PORT) separately since a EVENTS_IN interrupt will always trigger EVENTS_PORT.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.