Spectre = RTOS + HAL + IO + COMSTACK + CI + C++
Spectre consists of a Real Time Operating System + a Hardware Abstraction Layer + IO driver support for various sensors, actuators and communication controllers + industrial communication stacks written mostly in C++. The codebase can be simultaneously compiled for both host and desired target platform which enables the user to run and verify the complete firmware within the host pc without the need for target hardware. Furthermore unit tests are run and code quality metrics are gathered automatically upon commit in order to ensure code quality and functionality.
The application of OO principles such as SOLID leads to a clean code base and minimizes coupling between modules. This enables the application of Test Driven Development which gives developers instantenous feedback on their code therefore eliminating tedious integration and bug fixing sessions typical for Debug-Later-Programming.
In his book "Refactoring: Improving the Design of Existing Code" Martin Fowler frankly states that “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” This project aims to do just that for the embedded domain. You are kindly invited to browse the code and form your own opinion about how well the code is adhering to our claim.
Work in progress ...
Hardware Abstraction Layers
|AT90CAN128||...||at90can128||Olimex AVR-CAN, AL-ERAM128 V2.0|
|ATMega1284P||...||atmega1284p||Moteino Mega USB|
Host (Test Build)
|Host (Test Build)||host||host|
I/O Device Drivers
- MCP2515 (CAN Controller) (Seedstudio CAN Shield V2.0)
- RA6963 (GLCD Controller)
- DRV2605L (Haptic Driver for LRA and ERM)
- MCP23017 (16-Bit I/O Expander)
- PCA9547 (8-channel I2C-Bus multiplexer)
- RFM9x (HopeRF RFM95/96/97/98 Low Power Long Range Transceiver Module) (Dragino LoRa Shield V1.4, Moteino Mega USB)
- AT45DBx (SPI Data Flash)
- PCF8570 (256 × 8-Bit Static Low-Voltage RAM)
- AD7151 (1-channel capacitance converter for proximity sensing)
- AS5600 (12-Bit programmable contactless potentiometer)
- BMG160 (3-axis digital output MEMS gyroscope)
- INA220 (Low- or high-side, bidirectional, I2C current monitor)
- L3GD20 (3-axis digital output MEMS gyroscope)
- LIS2DSH (3-axis digital output MEMS accelerometer)
- LIS3DSH (3-axis digital output MEMS accelerometer)
- LIS3MDL (3-axis digital output MEMS magnetometer)
- UART (Serial UART Driver)
- TMC26x (Trinamic TMC26x configurable stepper driver) (Trinamic TOS-100 TMC-26x Shield)
- HD44780 (Dot Matrix LCD Controller/Driver)
- CANOpen ( Work in progress ... )
sudo apt-get install cmake
sudo apt-get install avr-libc binutils-avr gcc-avr avrdude
git clone https://github.com/lxrobotics/spectre.git cd spectre
Copy and edit configuration
cp config/atmega328p-default.cmake config.cmake vim config.cmake
mkdir build && cd build cmake .. make sudo make install (sudo make uninstall)
cp examples/debug/debug-serial-atmega328p-uart0/config.cmake config.cmake mkdir build cd build cmake .. make sudo make install
cd examples/debug/debug-serial-atmega328p-uart0 mkdir build && cd build cmake .. make
Spectre is open source and licensed under version 3 of the GNU GPL. Spectre is free under this license and can be freely used and distributed under its terms.
The freedom that this GNU GPL license offers, comes with responsibilities and side effects that are not always desirable. This is especially the case if you want to integrate Spectre in your closed source product and/or don’t want your customers to know that your product contains Spectre.
As an alternative, Spectre can be made available under a commercial license. Under the commercial license, Spectre does not contain any references to the GNU GPL. Refer to the following license comparison matrix to determine the Spectre license your product requires.
|Question||GNU GPL version 3||Commercial License|
|Is Spectre free?||yes||no|
|Do I have the right to change the Spectre source code?||yes||yes|
|Can I use Spectre in my closed source product?||no||yes|
|Do I have to open my source code?||yes||no|
|Do I have to open source my changes to Spectre?||yes||no|
|Do I have to offer the Spectre source code to users of my product?||yes||no|
|Do I have to document that my product uses Spectre?||yes||no|
|Can I redistribute Spectre in source code format?||yes||no|
|Can I receive professional technical support on a commercial basis?||no||yes|
Contact Alexander Entinger / LXRobotics GmbH (firstname.lastname@example.org) to request additional information, customisation and/or a quote for a commercial license for the whole library or parts of it.