1、选择文件 --> 新建 --> Renesas C/C++ Project --> Renesas RX
2、 选择Renesas CC-RX C/C++ Library Project，单击下一步继续
You should post in Chinese community or translate and post to English community.Simply speaking, library file is just an archive of object files.(Not exactly same as *.a in GCC, but *.lib is very similarly formatted and works similarly.)Therefore, linking library is virtually the same as linking other objects compiled separately.The usage of header file should be the same as you use external reference of functions and variables in other source files.
To generate a static library project in Renesas CC-RX and use it in other projects, you can follow these steps:
Create a new Renesas C/C++ project in the RX series.Choose the "Renesas CC-RX C/C++ Library Project" option and give your project a name.Select the same device and tool chain as the executable project in the device and tool selection page.Write your source code and add it to the project. Be sure to include any necessary header files.Compile the project by selecting "Build All" from the "Project" menu.After the project has been successfully compiled, a static library (.lib) file will be generated in the project's output folder.To use this library in another project, you need to include the library file and the necessary header files in the project settings.Finally, you can use the functions and variables defined in your static library in the other project by including the appropriate header files and calling the functions as needed.It's important to note that the process may vary slightly depending on the specific version of Renesas CC-RX you are using and the requirements of your project. Be sure to consult the documentation and seek additional assistance as needed. SkyWard Alpine
Ok, thanks, I have one more question, if you use the firmware library provided by the official, the intelligent configurator generates the code accordingly, and makes the configuration. Now, what if you want to make a static library of this project file?
For example, I used the firmware library of e2studio in my CAN project, which CAN generate the corresponding code through the intelligent configurator. I added the CAN module using it. Now, I have realized the CAN communication function of it, and I want to generate the lib library with it.
I also built a static library project and copied all the source code from CAN project, but they all lacked the corresponding firmware library file declaration, indicating that the compilation would not pass. There were a bunch of problems, because in CAN project, some contents such as configuration interrupt and peripheral clock module PLCKB were generated directly on the intelligent configurator. The static library project does not have this.scfg file, or smart configurator