Introduction

OSS-ECAL stands for Open Source Software for Electronic Components Abstraction Layer. OSS-ECAL is a software layer aimed at streamlining software development for electronic components and improving the availability of electronic components, and is equipped with a software interface tailored to the characteristics of electronic components.
The programming language of OSS-ECAL is C.

Definition of Terms

TermDefinition
ABCModel number of electronic component temporary name
APIApplication interface
c(prefix)Const constant label name prefix
COMMANDCommand temporary name
e(prefix)Enumerated type member-name prefix
et(prefix)Enumerated type tag-name prefix
etCMPOSS-ECAL common component code enum definition
etSTSOSS-ECAL common status code enum definition
gv(prefix)Global variables label name prefix
HALHardware Abstraction Layer
In AUTOSAR, MCAL
HALNAMEHAL temporary name
Refer to the HAL correspondence table for HALNAME.
i(prefix)Immediate constant label name prefix
o(prefix)Command API function name prefix
OSS-ECALOpen Source Software for Electronic Components Abstraction Layer
st(prefix)Struct type label name prefix
sv(prefix)Static variable label name prefix
tbl(prefix)Table constants label name prefix
ComponentElectronic component
SW ComponentSoftware component

API Function

Basic API Structure

The API is a command API function by electronic component model number and command as follows.

etSTS oABC_COMMAND( stABC_I, stABC_O* )

Function nameoABC_COMMANDAPI function name of ABC
Return valueetSTSOSS-ECAL status code
Parameter INstABC_IInput data of ABC function
Parameter OUTstABC_O*Output data of ABC function

Command API Function Examples

The Byte Write command API function of Microchip Technology’s EEPROM 24xx256 series is introduced as an example.

etSTS o24xx256_BYTE_WRITE( etCMP cmp, uint16 mem_adr, uint8 val )

Process Overview:

The o24xx256_BYTE_WRITE function is an API function that writes the value of val to the specified address mem_adr for the 24xx256 series (24AA256, 24LC256, 24FC256). This function returns the return value eSTS_EXE until the time (i24xx256_WRITE_TIME [ms]) to complete writing has elapsed.

Return valueetSTSOSS-ECALステータスコード
 eSTS_FIN
 eSTS_EXE
 eSTS_ERR_PARAMETER
 eSTS_ERR_I2C_OBJECT
 eSTS_ERR_OTHERS_RUN
 eSTS_ERR_HAL_OTHERS_RUN
 eSTS_ERR_HAL_I2C

Completed successfully
During execution
parameter error(メモリアドレス範囲外)
I2C object selection error
Other components are executing the process
Other applications are running HAL
HAL I2C error
Parameter INetCMP cmpCommon component codee24xx256 20007U

6.2)⑦ Three 24xx256s are connected.
e24xx256_1 49900U
e24xx256_2 49901U
e24xx256_3 49902U
uint16 mem_adrMemory addressRange 0x0000 to 0x7fff
uint8 valData to be writtenRange 0x00 to 0xff

Note:
The i24xx256_WRITE_TIME [ms] elapsed measurement is calculated from the Thread period that calls this function, so set the Thread period to THREAD_OSS_ECAL_PERIOD [ms]. When using this function, please use the o24xx256_WP_DIS function to release write-protection before using this function.

HAL Support

OSS-ECAL’s HAL support is as follows (expanding sequentially). Please check each electronic component’s OSS-ECAL page for HAL support. Please note that even the same HAL may not work with different versions, MCUs, or development environments.

ManufacturerSDK/IDE ToolHAL NameVerSupport
ArduinoArduino IDEArduino1.8.6X
ArmKeil MDK v6Mbed OS6.17.0X
DebianGNU/Linux10.3
InfineonModusToolboxmtb-hal-cat12.4.3X
NXPMCUXpresso SDKSDK_2.x_EVKB-IMXRT10502.16X
STMicroelectronicsPlatformSDK_S32K1_2022_02AUTOSAR MCAL4.4
RenesasSynergy Software PackageHAL2.6.0
STMicroelectronicsSTM32CubeSTM32CubeF4V1.28.1X
Development environment

The MCU and development environment during development are as follows.

HAL NameManufacturerBoardMCUIDE
ARDUINOArduino1.Mega 2560 Rev3
2.Arduino Pro Mini 3.3V
ATmega2560
ATmega328P
Arduino IDE 2.3.3
MBEDSTMicroelectronicsSTM32 Nucleo-64 boardsSTM32F401RETxArm Keil Studio Cloud
LinuxBeagleBoardBeagleBone BlackTI AM335x
ModusToolboxInfineonCY8CPROTO-063-BLE PSoC 6 BLE Prototyping KitCYBLE-416045-02ModusToolbox
iMXRT1051B1052BNXPIMXRT1050-EVKBi.MX RT1050MCUXpresso IDE
MCALSTMicroelectronicsS32K144EVB-Q100S32K144S32 Design Studio for S32 Platform
SSPRenesasS7G2 SKR7FS7G27H3A01CFCe² studio for Renesas Synergy
STM32F4STMicroelectronicsSTM32 Nucleo-64 boardsSTM32F401RETxSTM32CubeIDE

File configuration

Please refer to the following example for the file structure of OSS-ECAL. The file structure differs depending on the HAL, so please check the OSS-ECAL page for each component.

Example: 24xx256 Folder structure

FolderFileSummary
24xx256_IMXRT1050_010000/samplesample.cSample application program
sample.hSample application header
24xx256_IMXRT1050_010000o24xx256.cOSS-ECAL program for 24xx256
o24xx256.hOSS-ECAL header for 24xx256
oss_ecal.hOSS-ECAL common header
user_setting.cUser configured constants and tables
user_setting.hUser configuration Header
readme.mdReadme
OSS-ECAL Terms of Use.txtOSS-ECAL Terms of Use

Built-in How to

How to incorporate OSS-ECAL into user programs

How to incorporate multiple OSS-ECALs in a user program (same MCU function)

How to incorporate multiple OSS-ECALs in a user program (different MCU function)

How to incorporate multiple identical electronic components into a user program

How to reduce the impact on user programs by replacing electronic components

OSS-ECAL English
error: Content is protected !!