/McuLib

Embedded software library for multiple MCUs

Primary LanguageCOtherNOASSERTION

This is the 'McuOnEclipseLibrary' or short 'McuLib': a scalable C/C++ library from the McuOnEclipse (https://mcuoneclipse.com/) project. Some of the drivers are generated by Processor Expert for legacy reasons, but no Processor Expert is required to use the library.

Directories:

  • Generator: Processor Expert (NXP Kinetis Design Studio) project used to create some of the files.
  • lib/src: driver source and interface files
  • lib/config: driver configuration header files
  • lib/fonts: graphical fonts used with the McuFontDisplay

Additionally following middleware is provided:

Make sure you follow my McuOnEclipse blog: http://mcuoneclipse.com/ for updates and new articles.

How to integrate the library

NEW: if you consider adding the McuLib to many Eclipse/MCUXpresso projects, consider using the PowerShell scripts written by 'urhano': https://github.com/urhano/addMCULib

../McuLib/config
../McuLib/config/fonts
../McuLib/fonts
../McuLib/src
../McuLib/FreeRTOS/Source/include
../McuLib/FreeRTOS/Source/portable/GCC/ARM_CM4F
../McuLib/SEGGER_RTT
../McuLib/SEGGER_Sysview
../McuLib/TraceRecorder
../McuLib/TraceRecorder/config
../McuLib/TraceRecorder/include
../McuLib/TraceRecorder/streamports/Jlink_RTT/include
../McuLib/HD44780
../McuLib/minIni
  • Disable or remove not used FreeRTOS ports, e.g. ../McuLib/FreeRTOS/Source/portable/GCC/ARM_CM33 ../McuLib/FreeRTOS/Source/portable/GCC/RISC-V
  • If the project contains a hard fault handler: disable or remove it, as the McuLib comes with its own handler.
  • Edit the McuLib/config/McuLibConfig.h header file which configures the library. Below the settings for the Kinetis (ARM Cortex-M4F with FPU) using the MCUXpresso SDK 2.5.0:
#define McuLib_CONFIG_CPU_IS_ARM_CORTEX_M  (1 || defined(__CORTEX_M))
#define McuLib_CONFIG_CPU_IS_KINETIS       (1 && McuLib_CONFIG_CPU_IS_ARM_CORTEX_M)
#define McuLib_CONFIG_CORTEX_M             (4)
#define McuLib_CONFIG_FPU_PRESENT          (1 || (defined(__FPU_PRESENT) && (__FPU_PRESENT)==1))
#define McuLib_CONFIG_FPU_USED             (1 || (defined(__FPU_USED) && (__FPU_USED)==1))
#define McuLib_CONFIG_SDK_VERSION_MAJOR    (2)
#define McuLib_CONFIG_SDK_VERSION_MINOR    (5)
#define McuLib_CONFIG_SDK_VERSION_BUILD    (0)
#define McuLib_CONFIG_SDK_VERSION_USED     McuLib_CONFIG_SDK_MCUXPRESSO_2_0

How to use the Modules in the library

a) Include the Module header file:

#include "McuWait.h"

b) Initialize the Module before using it:

McuWait_Init(); /* initialize the module */

c) Use the Module:

McuWait_Waitms(100); /* wait for 100 ms */

Enjoy! Erich