This post was last edited by Future Developer on 2022-3-17 10:59
After receiving feedback from many engineers about Jianchi CDK, we found that many of the problems have certain commonalities, which can be compiled into a book for other developers to learn from. Therefore, we have compiled the currently collected problems into a Q&A document for everyone to learn and refer to.
If you encounter problems not covered in this post, please ask us for technical support via a work order at: https://occ.t-head.cn/people/workorder-submit
After communicating and resolving the problem, you are welcome to add the problem and solution to the bottom of this post to help more developers.
Q1: How does Jianchi CDK search for keywords in the project directory?
A1: You can click the search button on the CDK toolbar to search, as shown in the figure:
Q2: Jianchi CDK cannot be started, or crashes after starting. How to solve it?
A2: CDK cannot be started (or crashes after starting), which may be caused by the following reasons:
- The CDK installation path cannot contain Chinese characters
- Check the path: %appdata% (you can enter the command: cd %appdata% in cmd), the path cannot contain Chinese characters; if there are Chinese characters, change the Windows account to an English account, and install and use CDK in the English account
- Please install CDK in a non-C drive; if you must install it in the C drive, it is recommended to install it in the %appdata% directory
- If it is not the above reason, you can try to clear the contents of the %appdata%/cdk directory
- In addition, some anti-virus software (such as 360) may also cause crashes. Please close the anti-virus software and try again.
Q3: How does Jianchi CDK generate a map file? How does Jianchi CDK view the memory usage after compilation?
A3: Generate a map file in CDK as follows:
- Right click on the project and select the first option: "Options for ..." to open the project options window.
- Select the tab [Output] and check [Linker Map Listing: ./Lst/*.map] under [Listing].
- Recompile
- After the compilation is complete, open the project folder and you will see a .map file in the [Lst] directory.
- Open the .map file and drag to the end to see the memory usage of the compiled image. The map file also contains the memory usage of each library.
Q4: How can I view the function definition in Jianchi CDK? What should I do if the function definition cannot be jumped?
A4: In CDK, right-click a function and select "goto declaration" to view the function definition. If you cannot jump after clicking, it is generally because the project is not automatically parsed. You can do it manually:
- Click on the menu bar Project -> parse all project and wait for the progress bar in the Project View to end.
- Again through the "goto declaration" function
Then you can view the function normally.
Q5: How to change the compilation options of Jianchi CDK?
A5: 1. Right click on the project name -> select "Option for..."
2. Click the [Compiler] tab and configure the compilation options in the [Other flags] column
Q6: How to check the version number of Jianchi CDK?
A6: Select [Help] -> [About...] on the CDK toolbar to get the CDK version number.
Q7: How to check the toolchain version of Jianchi CDK?
A7: Select [Help] -> [About...] on the CDK toolbar, and select [Tools] in the pop-up window to see the CDK toolchain version.
Q8: How does Jianchi CDK use custom scripts to execute commands?
A8: Right-click the project and select [options for xxx] -> [User]. In the Run #1 column, you can enter the execution command or script as needed.
- Run User Programs Before Completion of a C/C++ File: CDK will execute the commands entered here before compiling each C/C++ file;
- Run User Programs Before Build/Rebuild: CDK will execute the entered command before each Build/Rebuild;
- Run User Programs After Build/Rebuild: CDK will execute the entered command after each Build/Rebuild;
Q9: How to configure the Flash script when burning
A9: The steps to configure the Flash script during CDK burning are as follows:
- Select [Flash]->[Flash Management] from the menu bar to open the Flash algorithm management page
- Click [Add] to add the Flash algorithm file of the project; the Flash algorithm file (file name is similar to: xxxFlash.elf) is generally located in the project root directory or script directory. You can try to search in the directory.
- Right-click the project -> select [Options for xxx], open the project configuration page -> select the [Flash] tab -> click [Add] at the bottom of the page to add the Flash algorithm file configured in the previous step to the project.
Q10: What should I do if the message "Component name has been used by another account xxx" appears when uploading a component?
A10: Reason: Component names are scarce. If a component name is used by a certain account, other accounts will not have permission to use the component name.
Solution: Modify the local component name and upload it again.
Q11: What is the reason for Jianchi CDK burning failure?
A11: First check whether it is a CKLink/JTAG connection problem. You can check it as follows:
- Re-plug the JTAG cable and restart the device
- Check if the CKLink cable is connected incorrectly or is loose.
- Check whether the development board has started normally and has not experienced any abnormalities or entered low power consumption mode.
- Open the tool CskyDebugServer and check whether CskyDebugServer can connect
If it is not a connection problem, check whether the Flash script is configured:
- Select CDK toolbar 'Flash'->'Configure Flash Tools…' and confirm whether to configure the Flash script (as shown below):
- If you want to configure a new script file, select 'Add' and add the '.elf' file in the project directory. The '.elf' file is generally located in the project root directory or the script directory. You can try searching in the directory
Q12: How to use Jianchi CDK to debug?
A12: Click 'Help' on the CDK toolbar -> select 'CDK Help', and select 'Debug' in the pop-up user manual to see the CDK debugging instructions. See the figure below:
Q13: How to download components of Jianchi CDK?
A13: The method for downloading new components from CDK is as follows (CDK version >= V2.8.1):
- Click the [Home] button on the toolbar to enter the [Welcome] interface:
- Click [Component Resources], search for the component you want to download, select the correct version, and click [Download and Use]
Q14: Where is the help document for Jianchi CDK?
A14: If you are using CDK for the first time, it is recommended that you read the CDK User Manual first to learn some basic operations in CDK; select Help->CDK Help in the menu bar; in addition, you can also refer to the following help information:
Q15: Where can I download Jianchi CDK?
A15: Please follow the steps below to download CDK:
- Log in to Pingtouge Chip Open Community
- Click Development Center -> Integrated Development Environment -> Jianchi CDK -> Learn more
- In the pop-up page, click " Resource Download " to download the latest version of CDK
Q16: How to configure big and small ends in Jianchi CDK?
A16: If errors related to big and small endianness occur during the use of CDK, it may be caused by incorrect big and small endianness configuration. Follow the steps below to configure big and small endianness:
- Right-click on the project and select the first option: [Options for ...] to open the project options window.
- In the [Target] tab, if you check [Big Endian], you will select big endian; otherwise, you will select little endian.
Q17: How to open Flash Programmer in Jianchi CDK?
A17: If you want to open Flash Programmer through Jianchi CDK, you need to configure the xxxxx.cdkflashconfig file in the project root directory. This file will configure the Flash burning parameters; Introduction to different burning methods:
- 'Flash Download' button on the toolbar: Use default burning parameters to burn all partitions
- Use Flash Programmer: Customize the flash program by reading the xxxxx.cdkflashconfig file
Q18: A compilation error occurred in Jianchi CDK: unexpected end of file. What should I do?
A18: This problem occurs because there are too many project configuration paths or the path length is too long, which exceeds the limit of Windows command line processing;
Solution:
- Right click the project name -> [Options for xxxxx...]
- Click the [Compiler] tab and check the [Include] column to see if there are too many paths or they are too long; reduce the number of paths
- Check other tags to see if there are similar situations
Q19: Jianchi CDK reports an error: Component not found, what should I do?
A19: If you encounter a CDK error as shown below, it may be due to a component configuration error or a version mismatch:
Solution:
- In CDK, right-click the Pacakges directory of the project -> select [Packages for xxxx]
- In the [Depends packages] column, check whether the component exists; if not, import the component from the [Available package list] list.
- Check whether the version number is consistent with the version number under the path; if the versions are inconsistent, you need to modify the package.yaml file under the component to make the version number consistent with the path display
Q20: What should I do if I cannot enter the breakpoint during Jianchi CDK debugging?
A20: Check whether the optimization option is turned on in the project configuration Compiler Tab. Os/O2 may have inaccurate debugging; Og will be relatively accurate. Please refer to the following method to change the optimization option:
- Right-click the project and select the first item: [Options for xxxx]
- Click the [Compiler] tab and view the [Optimization] option.
Q21: How to set code optimization options in Jianchi CDK?
A21: Please refer to the following steps to optimize the code size:
- Right click on the project -> Options fox.. to open the project configuration window
- Click the [Compiler] tab and find [Optimization] to configure optimization options. The different options are described as follows:
O0: No optimization
O1: Try to optimize code size and running speed without affecting compilation speed
O2: Perform almost all optimizations, which will sacrifice compilation speed
O3: Compared with -O2, it will try its best to improve program running speed, even if it increases the target code size
Os: Based on -O2, it will try to reduce the target code size
Og: Suitable for debugging
Please configure the corresponding optimization options according to your needs.
Q22: How to improve the compilation speed of Jianchi CDK?
A22: 1. When compiling, select the [build] button to compile only the modified files; do not select [rebuild], otherwise the entire project will be recompiled.
2. In addition, through the menu Edit -> Configuration -> Build Settings, select [Multi core build] to speed up the compilation:
Q23: How to publish SDK through Jianchi CDK?
A23: If you want to use CDK to publish SDK, please refer to Chapter 6 of "Pingtou Ge Jianchi CDK Quick Start Guide": "How to publish the completed SDK to other developers for use":
- Log in to OCC chip open community
- Click "Development Center" -> "Resource Download" -> "E-book" -> " Jianchi CDK "
- Download "Pingtouge Jianchi CDK Quick Start Guide"
- Refer to Chapter 6 on page 27: "How to release the completed SDK to other developers for use"
At the same time, you can also refer to the following blog post: How to release chip product components to T-HEAD OCC
Q24: How does Jianchi CDK include math libraries?
A24: To use the math library in CDK, please follow the steps below:
- Right click the project -> select "Options for xxxx" to open the project options
- Select the "Linker" tab and add the option "-lm" in "Link Flags":
- The header file of the code contains: #include "math.h"
Q25: How to change components of Jianchi CDK?
A25: To change components in a CDK project, please refer to the following steps:
- If you want to add a component, first make sure the component has been downloaded. Refer to the following link [Related Questions].
- Find [Packages] in the project, right-click and select [Pacakges for xxxxx]
- In the Pacakges management interface that pops up, the [Available packages list] column lists all the downloaded components in the project, and the [Depends pacakges] column lists the components that the project currently depends on
- Click [>>], [<<] to change the component and add the correct component to [Depends pacakges]:
- Click [OK] to exit the interface. The updated components will be displayed under the Pacakges list on the left side of the project.
Q26: Introduction to Jianchi CDK development environment
A26: Jianchi CDK is an IDE integrated development environment launched by Pingtouge. It is based on the concept of minimal development and is an integrated development environment specially designed for IoT application development. Without changing the user's development habits, it fully accesses cloud development resources and combines graphical debugging and analysis tools such as OSTracer and Profiling to accelerate user product development.
For details, please refer to OCC Chip Open Community -> Development Center -> Integrated Development Environment
Q27: Which chips does Jianchi CDK support?
A27: CDK currently mainly supports the development of chips for Hematite processors and RISC-V instruction architecture processors, and does not yet support the development of Arm chips. Arm chips can use the Keil development environment, and you are also welcome to use Pingtouge chips and experience the CDK development environment!
Q28: How does Jianchi CDK redevelop the flash burning driver?
A28: For a detailed introduction to the Flash algorithm files in CDK, please refer to the "Pingtouge Jianchi CDK Quick Start Guide":
- Go to OCC home page
- Click [Development Center] -> [Resource Download] at the top of the page, and find [E-book] -> [Jianchi CDK] on the left side of the page.
- Click to download "Pingtouge Jianchi CDK Quick Start Guide" -> Chapter 4: [How to create a Flash algorithm file]
In addition, you can also watch the CDK teaching video: link , and learn "5.2 Chip SDK Development: Algorithm Engineering Principles and Creation", "5.3 Chip SDK Development: Secondary Development of Algorithm Engineering", "5.4 Chip SDK Development: Debugging and Use of Algorithm Engineering"
Q29: What is Jianchi CDK flash driver?
A29: Flash driver (also called Flash algorithm) is an executable program used in CDK/CDS and developed by customers to run on the device RAM. It is used in conjunction with CDK/CDS to burn the image file that needs to be burned into the device Flash area into the device Flash space. Flash driver can be adapted to different types of Flash models through secondary development. For specific secondary development methods, please refer to the following question Q28.
Q30: What is the hex format of the output of Jianchi CDK?
A30: The ihex format generated in CDK is equivalent to the one generated using the command line tool: csky-elfabiv2-objcopy -O ihex xx.elf xx.ihex
Q31: Why does the interrupt vector table in the Jianchi CDK startup code need to be .align 10?
A31: In the startup file, something like:
section .vectors
.align 10
.globl
__Vectors
.type
__Vectors, @object
The interrupt vector table base address must match the vbr register, and the vbr register is required to be 1k aligned, so when setting the interrupt vector table, you must .align 10
Q32: The difference between assembly files .S and .s
A32: The uppercase S file is the default file to be preprocessed. It can contain macro definitions and macro expansions starting with #. The lowercase s file can only contain assembly macros.
Q33: How to view predefined macros in Jianchi CDK?
A33: View the predefined macros of the toolchain in CDK as follows:
Open CDK, select [Windows]->[Open Shell] from the menu bar, then create an empty c file in the directory where the command line is located, for example, demo.c, and enter {toolchain name} -E -dM demo.c in the command line.
The toolchain name is the toolchain for which you need to view the built-in macros, which can be csky-elf-gcc / csky-elfabiv2-gcc / riscv64-unknown-elf-gcc
Q34: How can Jianchi CDK ensure that the specified section will not be deleted by the linker?
A34: The usage is in the linker script: KEEP(*(.section_name))
for example
SECTIONS
.text : {
. = ALIGN(0x4) ;
KEEP(*startup.o(.vectors))
__stext = . ;
*(.text)
*(.text*)
*(.text.*)
In this case, the section named .vectors in the o file matching *.startup.o will be retained by the linker unconditionally.
Q35: How does Jianchi CDK display deleted sections?
A35: Output other flags in the project configuration Linker Tab: -Wl,--print-gc-sections
In this way, the deleted section information will be printed in the compilation output window.
Q36: What do -ffunction-sections, -fdata-sections mean?
A36: When linking programs and generating executable images, CDK uses section as the smallest processing unit. As long as a symbol in a section (usually a global variable, static local variable, function, etc.) is used, the entire section where the symbol is located will be linked into the final executable image.
-ffunction-sctions means that in the currently compiled file, each function is linked as an independent section, and -fdata-sections means that in the currently compiled file, each data symbol (global variables, local static variables) is linked as an independent section.
In this way, in conjunction with the Enable garbage collection of unused input sections option in the Project Configuration->Linker Tab (check this option), during the linking process, symbols such as functions and variables that are not used by the program will not appear in the final image file, thereby achieving the purpose of reducing the program size.
Q37: How to add peripheral registers in Jianchi CDK?
A37: Right-click a directory under project -> add a new file -> Chip File (.svc) -> enter the file name
Add will add the peripheral name, such as uart, and then you can add register and edit operations under the peripheral name
Q38: How to view the precompiled files of the project in Jianchi CDK?
A38: Right-click the project, open the project configuration window Output Tab, check the Preprocessor Listing option, and then compile the project. At this time, the i file corresponding to each c file is saved in the Lst directory under the project root directory; you can right-click the project and click Open Containing Folder to directly open the project root directory, and then open the Lst directory for detailed viewing.
Q39: How to view the disassembly file of Jianchi CDK?
A39: Right-click the project Options for "xxx" to open the project configuration window. In the Output Tab, check the Compiler Asm Listing: ./Lst/*.asm option, and then compile the project. At this time, the asm files corresponding to each c file are saved in the Lst directory under the project root directory. You can right-click the project and click Open Containing Folder to directly open the project root directory, and then open the Lst directory for detailed viewing. Finally, after the compilation is completed, you can right-click the project and select Open Disassemble File to open the asm file corresponding to the executable image.
Q40: How does Jianchi CDK link the bin file to elf?
A40: In CDK, click Windows->Open Shell in the menu bar to open the command line tool, cd to the directory containing the binary file, and execute the command:
linker name -r -bbinary xxx.jpeg -o xxx.o
The linker name varies depending on the CPU. The 500 and 600 series CPUs use csky-elf-ld, the 800 series CPUs use csky-elfabiv2-ld, and the 900 series CPUs use riscv64-unknown-elf-ld.
Get the .o file corresponding to this bin file
Then use the corresponding readelf tool to enter the following command to view:
readelf tool name -s xxx.o
The tool names vary depending on the CPU. 500 and 600 series CPUs use csky-elf-readelf, 800 series CPUs use csky-elfabiv2-readelf, and 900 series CPUs use riscv64-unknown-elf-readelf.
The command output is similar to the following:
It is usually like this: where 006a6cf3 represents the size of this bin.
2: 00000000 0 NOTYPE GLOBAL DEFAULT 1 _binary_xxx_start
3: 006a6cf3 0 NOTYPE GLOBAL DEFAULT ABS _binary_xxx_size
4: 006a6cf3 0 NOTYPE GLOBAL DEFAULT 1 _binary_xxx_end
In this way, in engineering programming, the binary data can be accessed as an array, where char _binary_xxx_start is the array name, that is, it can be declared as unsigned char _binary_xxx_start[] in the program, where the size of the array is _binary_xxx_size
Q41: How to open the command line of Jianchi CDK?
A41: The following methods can open the CDK command line:
- CDK menu bar Windows -> Open Shell
- Right-click the project node and select Open Shell from the menu bar.
- In the code editing window, right-click each open source code tab and select Open Shell
Q42: The Jianchi CDK toolchain version and the C library version used are inconsistent. Can they be mixed?
A42: The C library is a built-in library of the toolchain. Each version of the toolchain will come with a C library that matches the toolchain version.
Q43: Does Jianchi CDK support Linux version?
A43: Linux development environment is not supported yet
Q44: How does Jianchi CDK write existing files into memory in debugging mode?
A44: In debugging mode, open the Command view in the Debugger Pane and use the restore command. For specific command usage, click the Help button in the command view.
Q45: What should I do if Jianchi CDK debugging cannot find the corresponding view?
A45: In the Debug menu or toolbar view button list, find the view you want to use and click it. The view will be automatically displayed. If this method does not work, you can click the menu bar [windows] -> [Reset Views to Default] to reset all views to their initial positions.
If it still does not display normally, you can click [Help]->[Open Log Containing Folder] in the menu bar, then close CDK, clear the files in the opened directory, and reopen CDK.
Q46: How to modify the CPU model of the project in Jianchi CDK?
A46: Right-click the chip type component -> [Options for xxx] -> select the [Info] tab to configure the CPU model of the project;
Q47: Jianchi CDK compilation error: undefined reference to xxx?
A47: If "undefined reference to xxx" is displayed during compilation, please analyze it as follows:
1. Is the function defined?
- If it is not defined and implemented, you need to define the function first and add it to the project;
* The implementation of some library functions (such as fputc) depends on the hardware, so the compiler does not implement it and you need to implement it yourself
2. Can the function be seen/searched in the project?
- If you just copy the file to the project directory, even if you reload all projects, the file may still be invisible to the project. You need to right-click [Add an Exsiting File] or [Add Source Folder] in the project view to ensure that the function definition can be seen in the project;
3. Check whether the relevant functions are wrapped by macro definitions. If so, the corresponding macros need to be defined.
4. If the function is defined in an external library:
- Please confirm whether the external library is included in the link parameters? Right-click the project -> select [Options for xxx] to enter the project configuration page -> click the [Linker] tab -> find [Library Configuration] and check whether the library is included;
- Please confirm whether the header file where the function declaration is located is included in the code?
5. Another possibility is that the function symbol is not linked in during linking.
* Right-click the project -> select [Options for xxx], open the project configuration page -> select the [Linker] tab -> select "whole-archive" or "start-group" in [Link Type]
Q48: How can I view the value of variables in real time without stopping debugging in Jianchi CDK?
A48: Jianchi CDK can only view/modify variables after stopping debugging, and does not support real-time viewing of variable values
Q49: Why is the source code not displayed during Jianchi CDK debugging?
A49: Please try the following steps:
- Check whether the [Debug Level] in the [Compiler] tab of the project configuration interface is set to [-g]? If not, change this option to -g (that is, turn on debug information output), then stop debugging and recompile the project;
- Check whether the program is running in the expected address space range, that is, whether the current PC is still in the running space of the executable program (whether it has "run away"); if the location of the PC is not a reasonable location, you need to check the specific reasons why the PC is running in an unreasonable way
Q50: How to prevent code from participating in compilation in Jianchi CDK?
A50: In the CDK project view, all visible files will be compiled by CDK; if you do not want a certain file to be compiled, you need to move the file out of the project folder first, and then click [Project]->[Reload All Projects] in the CDK menu bar to refresh the project view. Make sure that the file is not visible in the project view and recompile it.
Q51: How to specify the name of the compiled image file in Jianchi CDK?
A51: Right-click the project name -> select [Options for xxx], open the project configuration -> select the [Output] tab, and in the [Name of output] column you can modify the file name of the compiled output. $(ProjectName) represents the name of the current project. You can replace it with a custom file name as needed.
Q52: What are the differences between soft reset and hard reset in Jianchi CDK debugging configuration?
A52: 1. Soft Reset: software reset, that is, through the debugging path, write a characteristic value to a register in the CPU hardware debugging module to trigger the behavior of the hardware (the behavior is defined by the hardware). The characteristic value is filled in the input box after the Soft Reset drop-down menu;
2.Hard Reset Hardware reset, that is, NRESET signal in 5-wire JTAG connecting ICE and CPU;
Q53: What commands does Jianchi CDK support for debugging gdb.init script?
A53: The gdb.init script is executed after correctly connecting to the debugging target. The supported help information can be viewed as follows: right-click the project name -> select [Options for xxx], open the project configuration -> select the [Debug] tab -> click the [Help] button in the lower right corner to view the pop-up help document
Q54: How to view internal variables of Jianchi CDK?
A54: CDK provides users with some internal program variables to improve the flexibility of embedded programs;
View CDK internal variables by:
- Click the menu bar [Help] -> [CDK Help]
- Search for [Internal Variables] in the help page and open the Internal Variables topic to see all the internal variables supported by CDK. In addition to the documentation, the following variables are also supported:
$(SolutionName): Solution name
$(ChipName): The chip component name used
$(BoardName): the name of the development board component used;
$PATH_xxx: the actual disk path of the corresponding component, xxx is the corresponding component name
Q55: Jianchi CDK compilation error: No such file or directory?
A55: If you encounter a file not found error when using CDK to compile (the prompt message is: error: xxxxx: No such file or directory), please follow the following methods to troubleshoot:
1. Check the following path and make sure the path name does not contain spaces or Chinese characters.
- CDK Project Path
- In the Windows file browsing window, enter: %appdata%
2. In the project view, check whether the missing file exists and can be opened and edited:
- If the original SDK file is missing, there may be a download error. Please try to download it again.
- If it is a file you created yourself, please make sure that the file can be seen in the project list on the left and can be opened for editing. You can manually add it by right-clicking -> [Add Source Folder]
3. If the file is a header file (.h) and can be seen in the project view, check whether its path is included in the compilation options:
- Right-click the component name where the file is located -> Select [Options for xxx] -> Open the [Compiler] tab -> Check whether the [Include] configuration item in "Global Config" is configured with the file
Q56: Jianchi CDK compilation error: No rule to make target xxx?
A56: CDK encountered an error during compilation: No rule to make target xxx. This error is mostly caused by a reference to a non-existent file in package.yaml. Check whether the file is defined:
- Right click the project -> [Open Solution Config File]
- Check in the pop-up package.yaml file (mainly the include and source_file parts) whether a non-existent file is referenced and whether the file can be seen in the project view.
- Alternatively, you can clean the project first and try to recompile again.
Q57: Jianchi CDK burning error: Can't find output file xxx.elf?
A57: If you encounter an error when burning/debugging CDK and cannot find the elf file, please follow the following methods to troubleshoot:
- Right-click the project -> [Options fox ....] to enter the project configuration page
- Click the [Output] tab and check the [Create Executable...] option:
- After the candidate is re-burned, CDK will automatically generate an elf file
- If it still cannot be found, it means that the CDK compilation has failed. Please check the CDK compilation output window.
Q58: Jianchi CDK link error: link script not found?
A58: If you encounter the error "link script not found" when using CDK, please troubleshoot as follows:
- Right-click the project -> [Options fox ....] to enter the project configuration page
- Click the [Linker] tab and check whether the configured [Link File] exists in the project directory.
- If it does not exist, right-click the development board component -> [Options fox ....] -> enter the [Linker] tab and check whether there is a [Link File] configuration;
- If neither the project nor the development board is configured, you need to manually configure the link file to the development board or project configuration page.
Q59: Jianchi CDK burning failed, FlashProgrammer can be used normally
A59: If the CDK programming result is inconsistent with the Flash Programmer programming result (one can be programmed, the other cannot be programmed), check the following steps in sequence:
- First confirm that the CDK burning process and FlashProgrammer burning configuration are the same (Erase Type, Connect Type)
- Confirm that the scripts used by both, the Pre-Script script in FlashProgrammer and the Flash Init File file in the Project Configuration-Flash Tab in CDK are consistent;
- In FlashProgrammer, uncheck Advance-> LocalJTAG-> Use DDC; in CDK, uncheck Debug Tab-> ICE Settings-> Use DDC;
- Confirm that the Program Algorithm File used by FlashProgrammer is consistent with the algorithm file used in CDK;
- If the problem is still not resolved after completing the above checks, please transfer to manual service.
Q60: What should I do if git cannot be found when downloading Jianchi CDK?
A60: CDK can support the use of git tools for code version management. If you need to use git, please configure it as follows:
- Download the Windows version of git from the official website: [Download link](https://git-scm.com/download/win)
- After downloading, install git. It will be installed in the "C:\Program Files\Git\bin" directory by default.
- Click the CDK menu bar: [View] -> [Git Pane], open the window's [Setting Tab], and configure Git's command path, user name, and email information:
- If you cannot see the configuration information when you open [settings], click the upper right corner to maximize the window:
For details, please refer to the CDK help document: Menu bar [Help] -> [CDK Help], search [Git Pane], and view more usage information.
Q61: How to download application examples from Jianchi CDK?
A61: How to download application examples from CDK:
- Enter CDK and click the [Home] button on the menu bar (see the figure below):
- In the pop-up [Welcome] window, click [New Project], and all CDK online project examples will pop up.
- Find the project you are interested in and click [Create Project] to download the sample code. You can also search for project keywords in the search bar and download from the search results.
Q62: Jianchi CDK compilation error: Couldn't reserve space for cygwin's heap?
A62: If the following error occurs during CDK compilation: Couldn't reserve space for cygwin's heap, Win32 error 0:
Please solve it as follows:
- Click [Windows]->[Open Shell] in the CDK menu bar, and then enter the [CDK\CSKY\MinGW\bin] subdirectory under the CDK installation directory;
- Enter the command: rebase.exe -b 0x50000000 msys-1.0.dll
- If the problem persists, try changing the value after -b
- If the problem still cannot be solved, please try restarting the computer to fix the problem; if the problem still exists after restarting, refer to the online solution: link
Q63: Does Jianchi CDK support Apple Mac operating system?
A63: CDK currently does not support MAC operating systems.
Q64:enable garbage collection of unused input sections含义?
A64: Enable garbage collection of unused input sections Meaning: During the linking process, ignore the sections that are not used by the program and do not link them into the final executable program;
Q65: How to create a new component in Jianchi CDK?
A65: Please refer to the OCC blog post: YoC Component Development Series 5: How to Add a YoC Component to learn how to create a new component.
Q66: The old version of Jianchi CDK cannot be compiled?
A66: Most CDK projects are developed based on the latest version of CDK and will rely on the functions of the new version of CDK, so the old version of CDK may not be used. It is recommended that you always use the latest version of CDK for development. Thank you for your understanding and support. If you have special needs and need to use a fixed version of CDK for development, please submit a work order to let us know and our backend staff will help you handle it.
Q67: How to import project files into Jianchi CDK?
A67: You can import an existing CDK project as follows:
1. If there is no workspace, you must first import the workspace
Click the menu bar [Project] -> [Open Multi-Project Workspace] -> Import an existing workspace (with the suffix .cdkws)
2. After importing the workspace, right-click the workspace -> [Add an Existing Project] to import an existing project.
Q68: How to switch skins in Jianchi CDK?
A68: You can click [Windows] -> [Global Themes] in the CDK menu bar and select your favorite skin
Note: Except for the [Classical] skin, other skins will take up more system resources and may cause slow operation. If you find that the operation is stuck after switching, please use the [Classical] skin.
Q69: Why is Jianchi CDK so slow to use?
A69: The DK may be stuck when using it. This may be because you are using different CDK skins. Since different CDK skins have different rendering times, you may encounter some skins that are stuck when using them.
It is recommended that you change to [Classical] and try again. The change method is as follows:
Click the CDK menu bar [Windows] -> [Global Themes] -> Select [Classical]
In addition, it may be because your system has anti-virus software (such as 360) installed. Please turn off the anti-virus software before using it.
Q70:错误: file's abi is conflict with current gdb?
A70: If the error message "file's abi is conflict with current gdb" appears, it is probably because the Flash algorithm file configured in your project does not match the current CPU architecture. Please check and confirm that you are using the correct Flash algorithm file.
Q71:错误:core file path does not exist?
A71: If the error "core file path does not exist" appears, please refer to the following methods to solve it:
- Right click the project and select [Options for xxx]
- Open the project settings page and select the [Debug] tab
- In the last line, do not check [Start with CDK core file]
Q72: How to use the serial pane in Jianchi CDK?
A72: CDK supports two serial port printing tools:
1.Debug (print): virtual serial port printing, which depends on the support of the chip (some kernel chips do not support it, such as CK802), and does not need to occupy serial port resources. However, it can only output logs, not input; the usage is as follows:
- Right-click the project -> select [Options for xxx], open the project configuration page -> select the [Debug] tab -> click [Settings] next to ICE -> select [Enable debug print]
- After configuration is complete, select the CDK menu bar [View] -> [Serial Pane] -> Select Debug (print)
2.Uart #, CDK's own serial port window, its functions are similar to other serial port tools (minicom/SecureCRT). The usage is as follows:
- Select CDK menu bar [View] -> [Serial Pane] -> Select [Uart] serial port
- Right-click in the window -> select [Settings] to configure the serial port baud rate and other parameters
3. For more information, please refer to CDK Help and search for [Serial Port Pane]
Q73: How to configure the debug window of Jianchi CDK?
A73: For CDK debugging window configuration, please refer to the following:
1. Right-click the project -> select [Options for xxx], open the project configuration page -> select the [Debug] tab:
- Use ICE. Use the CDK built-in emulator; if you select [Remote ICE], use an external emulator (Debug Server)
- Stop at main. After entering debug mode, the code runs directly and stops at the main() function.
- Soft Reset. The soft reset content is determined by the CPU. The default soft reset content is 0xabcd1234.
- Perform Reset after Load. Perform a reset operation after entering debug mode.
2. Click [Settings] next to "ICE" to enter the ICE configuration page:
- ICE Clock. It is recommended that the ICE clock setting should not exceed 1/4 of the slowest clock running after the chip is powered on.
- Enable debug print. Refer to "CDK: How to use the serial pane".
- Reset After Connect. Perform a soft reset after connecting.
- Update. Check the connection between the debugger and the chip.
- Download to Flash. Before entering debug mode, download the code to the chip Flash.
Q74: Is dll file missing during Jianchi CDK installation?
A74: If the CDK installation prompts an error message "dll file not found" or it suddenly stops working, it may be because your computer uses anti-virus software such as 360. In addition to allowing CDK operations during the installation process, after installation, the entire CDK installation directory must be added to the anti-virus software's whitelist area.
Q75: How to set global conditional compilation in Jianchi CDK?
A75: In some projects, there are some conditional compilations (as shown below):
When multiple files require this conditional compilation at the same time, you can manage them uniformly by setting global conditional compilation:
Right-click the project -> select [Options for xxx], open the project configuration page -> select the [Compiler] tab -> add a global conditional compilation macro in the [Define] pane of "Global Config"
Q76: Connection error: Can't get target information
A76: If CDK fails to connect to the development board, there may be two reasons:
1. The following error message appears, indicating that your emulator (CKLink) is not connected to the PC:
2. If the following error message appears, it means that your emulator (CKLink) is not connected to the chip:
Q77: Connection Error: No connection could be made because the target computer actively refused it
A77: If the CDK displays the error "Unable to connect because the target computer actively refused", please try the following steps to resolve it:
- It is possible that your emulator (CKLink) is in an abnormal state. Usually this can be solved by resetting the emulator chip or powering on the emulator again.
- It may also be caused by the failure of your CDK or debugger driver installation. It is recommended to uninstall CDK, then close the anti-virus software, reinstall CDK in a non-Chinese directory, and click Install when prompted during the installation process.
- If you use the simulator for debugging, it means that the simulator fails to start. This is usually caused by the mismatch between the target program and the simulator configuration file;
If you still have questions, please submit a ticket: Ticket link
Q78: Download error: Verify failed
A78: If the CDK debugger prompts Verify Failed!, please check as follows:
- Try re-downloading multiple times
- Try Flash erase: Click the menu bar [Flash] -> select [Chip Erase]
- Check whether the correct flash algorithm file is loaded.
If the above attempts are unsuccessful, there may be a problem with the chip. Please replace the chip.
Q79: What is the reason for the red question mark to appear in the Jianchi CDK project view?
A79: If a red question mark appears in the CDK project view, it means that the component version that the project depends on does not match the local code version. You can solve it as follows:
1. If your project has multiple versions, please switch the SDK version first.
Right-click the project -> select [Switch SDK] and choose the latest SDK version
Click [Reload All Projects] to refresh the project view
. 2. You can also download the corresponding version of the component separately.
Q80: How to view chip register values in Jianchi CDK?
A80: Please refer to the following steps to view the register value:
1. If the project already contains a chip description file in svc format, you can view it through the [Peripherals Pane]:
- First enter the debug mode, then select the CDK menu bar [View]->[Peripherals Pane] to open the peripherals pane
- Select [Peripherals]->[System Viewer] in the CDK menu bar and select the external color you want to view.
- In the peripheral pane, you can see the contents of the corresponding peripheral registers.
2. If the project does not have an svc file, you can view it through [Frame Pane]:
- First enter the debug mode, then select the CDK menu bar [View] -> [Frame Pane] to open the Frame Pane page
- Refer to the chip manual to check the peripheral base address
- Click the [Memory] tab and locate the register contents according to the peripheral base address.
Q81: Why is the Analysis Pane blank?
A81: If the Analysis Pane is blank after opening, please refer to the following methods to solve the problem:
- When starting the simulator, you need to check the [Trace enable] option on the simulator configuration page;
- Right click in the Analysis Pane and select [Start Trace]
Q82: Jianchi CDK reports an error when opening a project: File path include Chinese character.?
A82: If the error "File path include Chinese character" appears, this is because your CDK project is placed in a directory containing Chinese characters. Change the directory name of the project to English or place it in an English directory.
Q83: How does Jianchi CDK generate burning files?
A83: After clicking compile on CDK, two files, .elf and .IHEX, will be generated in the "Obj" directory under the project folder. If not, check the CDK configuration:
- Click [Project] -> [Open Active Project Options...] in the CDK menu bar.
- In the Project Settings dialog box, click [Output], then check [Create Executable:.\Obj\*.elf], [CreateHexFile] and [CreateBinFile], then click [OK] to exit.
- Recompile to generate the burning file in the "Obj" directory.
Q84: How to open the assembly window of Jianchi CDK?
A84: By default, the CDK is set to display the corresponding assembly window during debugging. If it is closed by mistake and you want to open it, enter the Debug mode first, then click [Debug]->[Debug Views]->[Disassemble] in the menu bar, and drag it to the appropriate position after it is displayed.
Q85: How to restore the default graphical interface of Jianchi CDK?
A85: If some graphical interface are closed and you want to restore to the default settings, you can click [Windows]->[Reset View to Defaults] in the menu bar to restore to the default settings.
To be continued...
|