Solution Pattern Port

1. Introduction

  • During solution development, you may encounter a situation where the desired development board type is not available in the required product category, but it is available in another product category. This article describes how to quickly and easily port the required development board configuration to other projects. The file modifications are relatively simple, suitable for adapting and verifying existing project board types.
  • Example: how to port em_lb566_nand from grid_view to the watch project.
  • Before porting, the available board types for the two projects are as follows. You can see that grid_view has the em_lb566_nand development board model, but the watch project does not have a corresponding model.
  • solution_v2.4.1


2. Reference Documents

Reference document: Creating a New Project - SiFli Solution Documents

The reference document introduces a more detailed porting process, as well as the process for creating a new board type.

3. File Description

No. File Description Modification Type File Path
1 em_lb566_nand Project folder Copy grid_view\project
2 PrjCfg.ini Project configuration file Modify watch\project\em_lb566_nand
3 CompileBurnUser.ini Tool configuration file Modify tools\sifli_develop\Butterfli\configure
4 Image resources If image resource errors Convert watch\resource\images

4. Porting Process

1. em_lb566_nand

File path: solution\examples\grid_view\project

Copy the file from grid_view\project to watch\project.

2. PrjCfg.ini

File path: solution\examples\watch\project\em_lb566_nand

PrjCfg.ini is the core project configuration file, corresponding to the options in the Butterfli interface, used to configure the flash_map path, etc. However, for porting projects, complex configuration is not required. Just replace all occurrences of grid_view in the content with watch.

File corresponding to the tool interface configuration.

3. CompileBurnUser.ini

File path: solution\tools\sifli_develop\Butterfli\configure

The purpose of the modification is to allow the Butterfli interface to load the new project. The following changes are needed:

No. Modification Item Description
1 GROUP_TYPE Project grouping
2 COMPILE_SET Project compilation configuration

1) Configure project grouping (GROUP_TYPE) +1

  • GROUP_NUM indicates the total number of projects; if a new project is added, GROUP_NUM must be incremented by 1.
  • Here, the watch project added em-lb566_nand, so for the corresponding watch GROUP_TYPE_0, GROUP_NUM is incremented by 1.

2) Project compilation configuration (COMPILE_SET)

  • Add the following content after [TYPE_0_COMPILE_SET_4] as [TYPE_0_COMPILE_SET_5].
  • The content is copied and modified from [TYPE_1_COMPILE_SET_2].
  • Ensure the group name, development board model, etc., are correct.
[TYPE_0_COMPILE_SET_5]
GROUP_NAME=em_lb566_nand
COMPILE_TYPE=SCONS
COMPILE_DEV=SF32LB56X_NAND
PRJBASE_PATH=solution\examples\watch\project\em_lb566_nand
IMGBACK_PATH=solution\examples\watch\project\em_lb566_nand\bin_bak\em_lb566_nand
LCD_TYPE=(LB555)1.78 rect DSI LCD(ED-LB55DSI17801)
VSYNC=1
HPIX=368
VPIX=448
DPI=315
FRAME_LINE=448
WFBACK_PATH=solution\examples\watch\project\em_lb566_nand\wf_bak\em_lb566_nand

After completing the above modifications, open Butterfli. In the compilation group, the em_lb566_nand option will appear, and the configuration file will be automatically recognized.


5. Image Resource Conversion

  • If you have the same configuration as mine, don’t rush to compile, otherwise you will encounter image resource errors. You need to perform image resource conversion first before compiling.

Error message:

1. Cause of Error

Image Resource Documentation

The main cause of this error is mismatched image resources. Before porting, em_lb566_nand under grid_view uses a 1024×600 resolution screen by default, and the grid_view project resource directory contains the corresponding image resource folder. After porting, the watch project’s image resources do not have 1024×600 resolution resources, hence the error.

2. Solutions

1) Image Resource Conversion

Image Resource Conversion Documentation

Click the conversion button in the upper right corner of the Butterfli tool. It will automatically detect and guide you to convert. Wait for the conversion to complete. If only specific folders need image resource conversion, change the search path to the designated folder.

2) menuconfig

If you do not want to use a 1024×600 screen but instead a 1.85-inch 390×450 small screen (Huangshan Pie) or any other screen with an existing resolution, you can directly modify the screen configuration through menuconfig without conversion. Here we take 390×450 as an example.

Right-click HCPU, open menuconfig


Type /Built-in LCD module driver, press Enter to enter


Select the screen and save to exit

6. Compilation

Finally, successful compilation

Final note: This article is about a simple and quick project port. For more in-depth modification of project files, please refer to [Creating a New Project - SiFli Solution Documents], including creating a new board, making flash_map, etc.

1 Like