...
Hardware layer: the physical hardware where the application applications built with the One SDK runs. The hardware can be MCU registers, peripheral registers, memory, include MCU and external devices such as BMIC, TCPC, SPI Flash, Battery Chargers. etc.
Driver layer (HAL): a collection of device drivers callable by the upper layer code to interact with the hardware. Usually, each module in the driver layer is associated with a specific hardware component, e.g., UART, I2C, SPI, Flash, etc. The driver layer is usually hardware specific. For example, different MCU may require a different driver layer. However, since different MCU often share the same peripheral blocks, the driver modules may be common between the MCUs.
...
Figure 1 - One SDK high-level architecture.
Application stackstacks: each application stack is a collection of application threads and middleware modules that implements a specific application. In One SDK each application stack is standalone and can be included or excluded at build time. For instance, if the above example as only the a MCU has only TCPM application stack, then the MCU running the application would become be a TCPM controller. If only the ; but if it also has a FG application stack is included, then running then the MCU becomes a battery fuel gauge. If both application stacks are included, then the MCU becomes a multi-function ASSP capable of functioning both as TCPM and battery fuel gauge, subject to MCU bandwidth limitation, available peripherals and memory capacity.
...
2
...
.2 Repository file structure
<One SDK follows RA e2studio/FSP project file structure, but also have extra folders for scripts, tools and docs.>
Describe not only how the repository is laid out, but also what the customer distribution package would look like.>
2.3
3.2.1 Without Trust Zone
- RL78
- Cortex M0+
3.2.2 With Trust Zone
- Cortex M23
- Cortex M33
3.3 File structure
- Closely following e2studio/FSP
- Project/make files
- S project
- src
- include
- test
- NS project
- src
- include
- test
- Scripts
- Tools
- Docs
...
Privilege states
One SDK supports MCU with Trust Zone support or without. For MCU with TZ, three privilege states are supported: Factory (Renesas), Unsealed (OEM/ODM), Sealed (User). For MCU without with TZ support, only Unsealed and Sealed , three privilege states are supported. The meaning of each is defined below:
- Factory(STATE_FACTORY) – Factory state is intended to be accessed by – Intended for Renesas only. In this stateAfter reset, MCU runs will always run the factory bootloader in secure (S) mode. Both secure and non-secure code/data can be read and written. Factory state can only be entered from unsealed state with factory command and factory password known only to Renesas. Factory state always exits to Sealed state with a self-reset. Sealed (STATE_SEALED) mode. The factory bootloader first checks S mode NV memory for the wake state set by previous wake--if the wake state is set to STATE_FACTORY, execution will enter the factory bootloader command loop; else the factory bootloader will set the state to Sealed and call the NS mode entry point.
- Sealed – Sealed state is where the NS application runs . After reset the factory bootloader runs, and it quickly checks if it should enter the factory state; if not it will immediately transition to sealed state and jumps to the application. normally after reset. In this state, only a basic set of commands required for the intended application are available. Users may enter the Unsealed state (STATE_UNSEALED) by issuing the CMD_UNSEAL command along with the correct customer password.
- Unsealed – Unsealed state Unsealed (STATE_UNSEALED) – Unsealed state is only entered from the Sealed state with CMD_UNSEAL command and the correct customer password. Unsealed state Sealed state. Like Sealed state, Unsealed state also runs in NS mode and , but it supports additional commands. One of the command is CMD_FACTORY, which when issued with the correct Renesas password, will setup the wake state to STATE_FACTORY, such that subsequent wake from reset the execution path will enter the factory bootloader command loop.
Figure 2. Privilege states of MCU with TZ support.
...