C
RH850 D1M1A
This topic provides board-specific information about Renesas' RH850.
Supported color depths
The reference port for this board supports 32bpp color depth. The board also supports 16bpp and 24bpp with the ItemLayer API, but not with QUL_COLOR_DEPTH. See Color depth for more information.
Board configuration
Connect the Mango Adapter to the Main Board, and ensure that all jumpers and switches are set exactly as described.
Enable HDMI Output
To enable HDMI video output, follow the jumper and dip-switch configuration.
On the Mango Main Board:
- Connect the JP96 pins
- Open JP98 pins 2 and 3, and connect pin PJ99 to JP98-2.
- DSW31.7 switch set to OFF
On the Mango Adapter Board:
- DSW1.1 switch set to OFF
Enable Flashing
To enable flashing and debugging, ensure that the following switch configuration is set:
Switch | State |
---|---|
SW3 | PU |
SW5 | OFF |
SW9 | OFF |
SW2 | PU |
SW7 | PD |
SW1 | OFF |
SW4 | OFF |
SW6 | PD |
SW8 | OFF |
SW10 | PD |
Enable HMI section
To be able to use the HMI section on the board (HMI knob and 4-direction switch), open JP30 and set the DWS29.1-1 switches to ON.
Note: This setup can interfere with CAN. See Mango Main Board reference docs for more details.
Platform-specific CMake options
Following CMake options are available exclusively for this platform:
CMake Option | Description |
---|---|
QUL_USE_DEFAULT_RH850_STARTUP_FILE | By default Qt Quick Ultralite is using startup file that comes with the RGL library. Set this global variable to OFF to disable this behavior. Then you are able to add your custom startup file to the executable target sources. |
Resource cache policy
By default, an application's resource data is copied to SDRAM on startup. In order to retain these resources in flash and not load them to RAM on startup, add the following CMake option to your CMake project file:
set(QUL_DEFAULT_RESOURCE_CACHE_POLICY "NoCaching")
Alternatively, it can be enabled only for individual images like this:
set_source_files_properties( big/button.png PROPERTIES QUL_RESOURCE_CACHE_POLICY "NoCaching" )
Note: Set these CMake options before the qul_add_resource entry.
Loading resources to VRAM
In some cases, performance might be improved when loading resources to VRAM. When using ImageLayer, there can also be memory bandwidth issues that can be solved by placing some resources in VRAM. Images that are rotated or transformed are especially suited for being placed in VRAM.
To specify that a resource should be loaded to VRAM, set the QUL_RESOURCE_RUNTIME_ALLOCATION_TYPE property of the resource to 128 as follows:
set_source_files_properties( "image.png" PROPERTIES QUL_RESOURCE_RUNTIME_ALLOCATION_TYPE 128)
Custom layer requirements
On RH850, there are some special requirements for resources that are used as source for an ImageLayer.
Rendering errors might appear if using a resource placed in internal flash as the source of an ImageLayer inside a SpriteLayer. It's not recommended to use the NoCaching
resource cache policy for these images. If the resource has to be kept internal flash, use a root level ImageLayer instead.
Resources used as the source of an ImageLayer inside a SpriteLayer need to have an eight byte aligned width. That means 32 bit per pixel images need to have a width that's a multiple of two, and 16 bit per pixel images need to have a width that's a multiple of four.
Resources used as the source of a root level ImageLayer need to have a 128 byte aligned width. That means 32 bit per pixel images need to have a width that's a multiple of 32, and 16 bit per pixel images need to have a width that's a multiple of 16.
Resources used as the source of a root level ImageLayer need to have an address alignment of 128 bytes, and the internal resource split image optimization needs to be turned off. This can be configured with the QUL_RESOURCE_ALIGNMENT
and QUL_RESOURCE_SPLIT_IMAGE_OPTIMIZATION
properties:
set_source_files_properties(background.png QUL_RESOURCE_SPLIT_IMAGE_OPTIMIZATION off QUL_RESOURCE_ALIGNMENT 128)
RLE image layers
To use RLE compressed images as the source for an ImageLayer, the RGB888RLE
pixel format needs to be used.
set_source_files_properties( background.png PROPERTIES QUL_RESOURCE_IMAGE_PIXEL_FORMAT "RGB888RLE" QUL_RESOURCE_SPLIT_IMAGE_OPTIMIZATION off QUL_RESOURCE_ALIGNMENT 128)
Now the QML ImageLayer API can be used like this:
ImageLayer { source: "background.png" }
It's also necessary to enable RLE support for the corresponding hardware layer using the Qt Quick Ultralite configuration API for Renesas RH850.
#include <rh850extras/rh850configuration.h>
Then set the layer type of the given hardware layer to Rh850::Configuration::Rle
like this:
Rh850::Configuration::setLayerType(0, Rh850::Configuration::Rle);
In this case it's assumed that the bottom-most root layer will be an ImageLayer with an RGB888RLE
image source. The RH850 supports up to four root layers. If several RLE image layers are needed, or if there should be any other layers below the RLE image layer, then you must adjust the layer indexes correspondingly when calling Rh850::Configuration::setLayerType.
Finally, you must link your application against Qul::PlatformRh850Extras:
target_link_libraries(<target> PRIVATE Qul::PlatformRh850Extras)
RLE image pixel format support
For normal images apart from ImageLayers, the RGB888RLE
option of the QUL_RESOURCE_IMAGE_PIXEL_FORMAT property is not supported on RH850. For RLE compression of opaque images on RH850, it's recommended to use the AutomaticCompressedLossless
option, as that will automatically choose the XRGB8888RLE
option for opaque images.
set_source_files_properties( image.png PROPERTIES QUL_RESOURCE_IMAGE_PIXEL_FORMAT "AutomaticCompressedLossless")
Renesas RH850 Extras module
Qt Quick Ultralite comes with a Renesas RH850 Extras module which includes additional APIs specific to Renesas RH850. To use these APIs, link Qul::PlatformRh850Extras
to your project.
The following APIs are available through the extras module:
Provides extra configuration functions for the Renesas RH850 platform |
Available under certain Qt licenses.
Find out more.