Projects

Powered by experience, improve by knowledge.

Different projects have different challenges. Years of experience while learning new technology to serve you better.

Previous works,

u-blox NEO-6 (GPS) Sensor Driver

u-blox NEO-6 is a GPS receiver with the powerful u-blox 6 positioning engine. Driver development began with the definition of basic and alternative scenarios, the API required for parsing NMEA messages and the creation of sample projects with CMake, GCC and NXP LPC54114.

As always, the development work is mainly based on our maintained and stable HAL and BSP for NXP LPC54114 (v0.5.0). In the early development phase, NMEA messages from Arduino are simulated for cold start, valid and invalid messages to ensure that the implementation can cover all corner cases specified in the use cases. During this time, we also create unit tests to ensure that the behavior works statically as intended.

The driver provides some selected NMEA parsers such as RMC, VTG, GGA, GSA, GSV and GLL, and all these messages are enabled by default in NEO-6 with 9600 as UART baudrate. The development process continues by evaluating our driver implementation with the actual GPS receivers.

The image on the left shows the recorded coordinates as we drove through the residential area with the GPS receivers mounted on the vehicle. The recording was done with Python scripts and Google Earth to visualize the route.

Keyword: u-Blox, NEO-6, GPS, NXP LPC54114, Google Earth

TDK MPU-9250 (IMU) Sensor Driver

TDK MPU-9250 is an IMU that contains accelerometer, gyroscope, magnetometer and an internal temperature sensor. The development of this driver started with defined use cases and various diagrams used in the interface design process, mainly use cases, class diagrams and sequence diagrams.

The development work uses the NXP LPCXpresso54114 development board and utilizes our BSP for LPC54114, which supports the implementation of the I2C peripherals. This helps to speed up the development work and allows us to focus exclusively on the implementation of the driver interface.

The driver provides 15 functions that support the most important features of the sensor. The sensor initialization process involves the user providing information about the I2C channel to be connected to the sensor and various sensor configurations such as low pass filter (LPF) and measurement scale factor to be used.

The image on the left shows our automatically generated software documentation with Doxygen, and from the class diagram we can clearly see that the TDK MPU-9250 driver relies solely on the HAL I2C peripheral, while the “app_config.h” is the custom file that contains I2C configuration information.

Keyword: MPU-9250, IMU, accelerometer, gyroscope, magnetometer, NXP LPC54114

Generic & Reusable Bootloader

Bootloader is a program whose main purpose is to load the application program accordingly. A well-designed, efficient, small yet robust bootloader program is important for updating software in the field without an additional debugger. This allows the end user to perform the software update themselves via communication channels such as UART, SPI, CAN, etc.

In this project, we designed, implemented and tested a generic bootloader program, another reusable component that can be used across projects to perform a software upgrade via UART. We also developed a Python script that allows the end user to perform the software upgrade themselves with minimal supervision.

The bootloader program code used has a size of about 4.8 KB and offers a little more space for custom routines of the end user, since the minimum bootloader memory space is normally 8 KB, while the Microchip PIC32MK used in this development has 16 KB. This is just another step towards improving product maintainability in the future.

Keyword: Bootloader, BSP, PIC32MK, reusable component

FreeRTOS Porting to Microchip PIC32MK

The Microchip PIC32MK has numerous on-board peripherals, security functions and numerous channels for peripherals such as CAN (6 channels), I2C (4 channels), SPI (6 channels), UART (6 channels) and many more. In addition, Microchip also has security features such as Memory Protection Unit (MPU) and certifiable ready for ISO26262 and configurable peripheral pins input and output.

To utilize all these features, an RTOS is recommended to manage all peripherals and create a solid application software with low latency, high responsiveness and most importantly determinism. The FreeRTOS adaptation to the PIC32MK has seamless integration with our proprietary Board Support Package (BSP), which includes HAL drivers to easily configure and utilize the provided peripherals.

The FreeRTOS used was derived from FreeRTOS kernel v11.0 and was not changed except for a few files for the Microchip PIC32MK configuration. In our sample project, we were able to successfully use all 12 peripherals from our BSP modules simultaneously without blocking operation.

Keyword: BSP, FreeRTOS, PIC32MK, ISO26262, HAL

Finite State Machine (FSM) for Embedded System

Common problem exist for available FSM for embedded is lacking of understandable documentation, untested code and overwhelm interface. We manage to tackle all these issues and produced fully tested (100% line coverage, 100% branch coverage), compliance to C coding standard and MISRA C:2012.

The framework documentation consists of example usage, software design (sequence and class diagram) to visualize the detail operation and use cases. The implementation of this framework is platform agnostic (independent from any HAL, BSP, OSAL or MCU), easy to be adopted for simple or complex project, and implementation with less than 50 lines of code (LOC).

The FSM is equipped with a safety mechanism that rigorously regulates the state flow according to user specifications, incorporating a state recovery feature to address scenarios in which the entrance to the target state encounters failures. This framework is truly designed for embedded devices, streamlined interface with only two (2) public APIs while retaining essential features characteristic of a robust FSM implementation.

Keyword: C, FSM, MISRA, CERT, CWE

 

Board Support Package (BSP) for PIC32 MCUs

Developing a robust, reusable Hardware Abstraction Layer (HAL) and Board Support Package (BSP) represents a formidable undertaking. Yet, this is an ideal and effective method for microcontroller migration and the creation of new drivers. The versatility of this BSP, coupled with its generic HAL, proves invaluable, potentially affording companies significant reductions in development time.

We offer a comprehensive and readily deployable BSP implementation covering all available peripheral channels for the Microchip PIC32MK1024MCM100 microcontroller. This consists of communication protocols such as UART, I2C, and SPI, as well as functionalities including GPIO, Timer, ADC, DAC, PWM, Real-time Clock & Calendar, Watchdog, and more. All developed code undergoes rigorous testing against MISRA C, CERT, and CWE standards to ensure the production of high-quality code devoid of potential risks and bugs.

Furthermore, the BSP package has an example project that serves to validate the proper functioning of all peripherals, tailored specifically for the Microchip PIC32MK MCM Curiosity Pro development board.

Keyword: C, BSP, HAL, PIC32, MISRA, CERT, CWE

Drive-by-Wire (DBW) Software Development

In this project, we undertook the comprehensive design, development, and deployment of a drive-by-wire system for gas-powered vehicles, commissioned by a prominent research institute in Malaysia. Our solution encompasses dual communication protocols, namely UART and CAN bus messaging, to receive vehicle’s velocity control and heading direction command from the autonomous module system computer reside in the vehicle itself.

The software development was meticulously crafted in C and C++, leveraging our proprietary reusable components such as Hardware Abstraction Layer (HAL) and Board Support Package (BSP), specifically designed for Atmel microcontrollers. With FreeRTOS as the Operating System, it enables the concurrent management of multiple control systems without compromising critical timing parameters for other modules.

In addition to delivering a functional prototype, we have provided comprehensive user manual and software documentation, troubleshooting, guidelines, and Hazard Analysis and Risk Assessment (HARA). These resources serve to bridge any potential gaps in understanding between stakeholders and our team. Notably, we adopted UML as a standardized methodology for articulating the software architecture and detailed design, serving as a foundational blueprint prior to the firmware implementation.

Keyword: C++, Atmel, RTOS, FreeRTOS, Drive-By-Wire, HARA

Generic RTOS & Hardware Abstraction for ESP32

In this project, we have developed a versatile Operating System Abstraction Layer (OSAL) endowed with Real-Time Operating System (RTOS) capabilities, utilizing the well-regarded FreeRTOS, alongside a universal Hardware Abstraction Layer (HAL) customized for the ESP32 chipset. The efficacy of these generic interfaces has been demonstrated in significantly reducing migration and re-development efforts, especially in scenarios necessitating a transition from the ESP32 to a different MCU, such as an NXP chipset.
 
With this architectural framework, the re-development process is streamlined to the HAL layer, leaving other libraries and application code intact. Additionally, the adaptable nature of the generic OSAL empowers projects with the flexibility to opt for a diverse array of high-performing RTOS options beyond FreeRTOS, including SafeRTOS, MicriumOS, and others, all while preserving the integrity of other essential features.
 
Keyword: C, C++, ESP32, RTOS, HAL, OSAL, FreeRTOS

Board Support Package (BSP) for NXP MCUs

In this project, we have established a comprehensive set of Hardware Abstraction Layer (HAL) interfaces and definitions tailored specifically for the NXP LPC microcontroller. The peripherals implemented within this framework include GPIO, I2C, SPI, ADC, PWM, and Timer. Our design approach ensures that the interface remains adaptable for unforeseen client projects, demonstrating a tangible return-on-investment, particularly in the realm of software development.

In the course of this Board Support Package (BSP) implementation, we seamlessly transitioned from the LPC845 to the LPC54114 MCU, augmenting available memory resources for application programs. Importantly, this transition incurred no adjustments to the application program, HAL, OSAL, or middleware components. The implementation of the BSP for the LPC54114 MCU was executed smoothly, seamlessly supplanting the LPC845 BSP.

Keyword: C, NXP, BSP, HAL, Unit Test

High Performance Software with RTOS

In this project, we undertook the comprehensive design, development, and deployment of a sophisticated software suite tailored for actuator control, sensor data acquisition, and control system management employing PID techniques. This solution is designed and developed for Atmel microcontroller, leveraging a Real-Time Operating System (RTOS) to augment overall performance.

The employment of an RTOS is pivotal in embedded systems, as it not only addresses speed but also ensures that critical deadlines are consistently met. This is imperative, as any deviation could lead to unpredictable system behavior and potential bugs. The RTOS framework affords seamless task integration and management, with each task being allocated dedicated resources, thereby preserving the autonomy of other modules.

Keyword: C, C++, Middleware, HAL, BSP, OSAL, RTOS, Unit Test

u-blox GPS Sensor Driver

In this project, we have created a sensor driver that interfaces seamlessly with the application layer. The driver is meticulously designed with a generic interface and abstraction layer, ensuring that any potential changes in sensor or device do not disrupt application implementations. The GPS sensor used is the CAM-M8, a compact and omnidirectional GNSS receiver from u-blox.

To account for the diversity in sensor specifications across different products, our sensor driver is engineered to be modular and adaptable, requiring minimal configuration adjustments for the integration of new sensors. Each sensor driver undergoes a thorough quality assessment, encompassing static code analysis and unit testing utilizing the Ceedling framework.

Keyword: C++, HAL, BSP, Middleware, Unit Test

State-of-the-Art (SOTA) Object Recognition with YOLOv4

This project use Python programming language for development, and TCP/UDP communication for remote drone control. Additionally, the application integrates a state-of-the-art object recognition framework named YOLOv4 to effectively track pre-trained objects and utilize gestures for drone manipulation.

Given the utilization of multiple UDP ports for receiving sensor data, capturing camera frames, and transmitting commands to the drone, proficient multi-threading management is imperative. This intricate orchestration is streamlined through the implementation of a Finite-State-Machine (FSM), facilitating discernment of the drone’s behavior.

All code, including that of the application and the FSM framework, undergoes rigorous unit testing utilizing Python’s unittest tools. This rigorous validation process ensures functional integrity and serves to preempt unforeseen bugs and issues, particularly during phases of code refinement and enhancement.

Keyword: Python, State Machine, Object Recognition, Machine Learning, Python unittest

Code Quality & Compliance Assurance

This initiative is dedicated to elevating code quality and refining implementation practices in strict adherence to established coding standards, all facilitated through the utilization of cutting-edge SonarQube software tools. We have meticulously configured SonarQube quality checks to be automatically triggered for each Pull Request directed towards the Main branch within Bitbucket. This methodical approach not only nurtures heightened code robustness within the development branch but also proactively addresses potential pitfalls.

In addition, with Sonar’s Quality Gates, stakeholder and software management team have the ability to establish elevated quality benchmarks for developer deliverables. Our team also provides comprehensive training services for SonarQube, coupled with the option of hosting the server for your project on an annual basis.

The proven efficacy of this tool lies in its ability to offer invaluable feedback, especially in contexts characterized by collaborative code development with multiple contributors. The seamless integration of SonarQube within your CI/CD pipeline significantly amplifies the efficiency of the code review process, enabling the early detection and rectification of potential bugs.

Keyword: MISRA, CERT, C, C++, Python, SonarQube, CI/CD, Docker, Bitbucket

Continuous Integration & Deployment

We possess the capability to autonomously compile the software, execute unit tests, assess coverage results, and conduct static analysis upon every Pull Request (PR), or in the event of commits to the Master or Release branch. This procedural framework guarantees the attainment of requisite code quality prior to the deployment and release of the software.

Our Continuous Integration & Deployment (CI/CD) workflows are driven by Docker containers, with the underlying infrastructure leveraging the commendable services offered by Atlassian, including Bitbucket and Pipeline, among others. We stand prepared to offer consultation and assistance to your project in order to meet the CI/CD prerequisites, thereby enhancing in-house development and software deployment processes.

Keyword: CI/CD, Bitbucket, Docker, Unit Test, Code Coverage

Contact for details,