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
Term | Definition |
---|---|
ABC | Model number of electronic component temporary name |
API | Application interface |
c(prefix) | Const constant label name prefix |
COMMAND | Command temporary name |
e(prefix) | Enumerated type member-name prefix |
et(prefix) | Enumerated type tag-name prefix |
etCMP | OSS-ECAL common component code enum definition |
etSTS | OSS-ECAL common status code enum definition |
gv(prefix) | Global variables label name prefix |
HAL | Hardware Abstraction Layer In AUTOSAR, MCAL |
HALNAME | HAL 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-ECAL | Open 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 |
Component | Electronic component |
SW Component | Software 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 name | oABC_COMMAND | API function name of ABC |
Return value | etSTS | OSS-ECAL status code |
Parameter IN | stABC_I | Input data of ABC function |
Parameter OUT | stABC_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 value | etSTS | OSS-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 IN | etCMP cmp | Common component code | e24xx256 20007U 6.2)⑦ Three 24xx256s are connected. e24xx256_1 49900U e24xx256_2 49901U e24xx256_3 49902U |
uint16 mem_adr | Memory address | Range 0x0000 to 0x7fff | |
uint8 val | Data to be written | Range 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.
Manufacturer | SDK/IDE Tool | HAL Name | Ver | Support |
---|---|---|---|---|
Arduino | Arduino IDE | Arduino | 1.8.6 | X |
Arm | Keil MDK v6 | Mbed OS | 6.17.0 | X |
Debian | – | GNU/Linux | 10.3 | – |
Infineon | ModusToolbox | mtb-hal-cat1 | 2.4.3 | X |
NXP | MCUXpresso SDK | SDK_2.x_EVKB-IMXRT1050 | 2.16 | X |
STMicroelectronics | PlatformSDK_S32K1_2022_02 | AUTOSAR MCAL | 4.4 | – |
Renesas | Synergy Software Package | HAL | 2.6.0 | – |
STMicroelectronics | STM32Cube | STM32CubeF4 | V1.28.1 | X |
Development environment
The MCU and development environment during development are as follows.
HAL Name | Manufacturer | Board | MCU | IDE |
---|---|---|---|---|
ARDUINO | Arduino | 1.Mega 2560 Rev3 2.Arduino Pro Mini 3.3V | ATmega2560 ATmega328P | Arduino IDE 2.3.3 |
MBED | STMicroelectronics | STM32 Nucleo-64 boards | STM32F401RETx | Arm Keil Studio Cloud |
Linux | BeagleBoard | BeagleBone Black | TI AM335x | – |
ModusToolbox | Infineon | CY8CPROTO-063-BLE PSoC 6 BLE Prototyping Kit | CYBLE-416045-02 | ModusToolbox |
iMXRT1051B1052B | NXP | IMXRT1050-EVKB | i.MX RT1050 | MCUXpresso IDE |
MCAL | STMicroelectronics | S32K144EVB-Q100 | S32K144 | S32 Design Studio for S32 Platform |
SSP | Renesas | S7G2 SK | R7FS7G27H3A01CFC | e² studio for Renesas Synergy |
STM32F4 | STMicroelectronics | STM32 Nucleo-64 boards | STM32F401RETx | STM32CubeIDE |
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
Folder | File | Summary |
---|---|---|
24xx256_IMXRT1050_010000/sample | sample.c | Sample application program |
sample.h | Sample application header | |
24xx256_IMXRT1050_010000 | o24xx256.c | OSS-ECAL program for 24xx256 |
o24xx256.h | OSS-ECAL header for 24xx256 | |
oss_ecal.h | OSS-ECAL common header | |
user_setting.c | User configured constants and tables | |
user_setting.h | User configuration Header | |
readme.md | Readme | |
OSS-ECAL Terms of Use.txt | OSS-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