Sunrise Camera Development Guide
Sunrise Camera System Design
System Block Diagram
Sunrise Camera implements multiple application solutions, such as intelligent cameras and intelligent analytics boxes.
The Sunrise Camera source code includes the WebPages layer (user interaction layer), communication module layer, and functional module layer. This document primarily introduces the design of these three modules.
The HAL layer modules include multimedia-related module calling interface libraries, BPU module inference libraries, etc.
The kernel version includes standard driver libraries as well as the system BSP.
The software block diagram is shown below:

Microkernel Design
The microkernel architecture, also known as the "plug-in architecture," refers to a software design where the kernel is relatively small, and most core functionalities and business logic are implemented through plug-ins.
The kernel (core) typically contains only the minimal functionality required for system operation. Plug-ins are mutually independent, and communication between plug-ins should be minimized to avoid interdependencies.
Advantages and Disadvantages of the Architecture
Advantages
- Excellent extensibility: new features can be added simply by developing plug-ins.
- Functional isolation: plug-ins can be independently loaded and unloaded, facilitating deployment.
- High customizability to meet diverse development requirements.
- Supports incremental development, allowing features to be added gradually.
Disadvantages
- Poor scalability: the kernel is usually a single unit, making it difficult to implement in a distributed manner.
- Higher development complexity due to the need to manage communication between plug-ins and the kernel, as well as plug-in registration mechanisms.
Sunrise Camera Architecture Overview
Module Partitioning
| Module | Directory | Description |
|---|---|---|
| Event Bus Module | communicate | Implements event registration, reception, and distribution across modules. |
| Common Library Module | common | Provides common utility functions such as logging, locking, thread operations, queue operations, etc. |
| Camera Module | Platform | Contains chip-platform-specific code, encapsulating hardware-dependent components. |
| External Interaction Module | Transport | Handles external device interactions, including rtspserver, websocket, etc. |
| Main Program Entry | Main | Contains the main() function entry point. |
Top-level Code Structure
.
├── common # Common library module code
├── communicate # Event bus module
├── config # Build configuration directory
├── main # Main entry program
├── Makefile # Build script
├── makefile.param # Build configuration
├── Platform # Camera module: platform-specific, application scenario, and chip IP-related code
├── start_app.sh # Startup script
├── sunrise_camera.service # Auto-start configuration file
├── third_party # Third-party dependencies