The source file must be clearly in which project directory

The source file must be clearly in which project directory

Remembering the title can save you a week of debugging time.

Cause

Normally developed to version 1.5, the compiled bit file can work normally;

Suddenly there is a new need, you need to use version 1.2 (old version) of the program, modify the relevant content (spi configuration), this branch is running normally;

Then switch back to version 1.5 (the latest version) of the program normally, the previous test was pass, and it was recompiled directly, and the generated bit file could not work normally;

Try to solve

Use 1.3, 1.4 version of the program, the same recompilation, the generated bit file can not work normally;

At this moment, the taste in my heart is sweet, bitter, spicy and salty;

Without knowing it, the modified version 1.2 source code will affect the subsequent versions 1.3, 1.4, and 1.5;

Suspect that something went wrong with the software;

Find the problem

A problem was found when copying the 1.3 version of the project to a colleague’s computer to execute the compilation;

The corresponding spi file cannot be found;

In the vivado interface, check the file properties to find:

Insert picture description here

This file is not in the current project directory, and this file is version 1.2, the modified branch;

In version 1.5, the related files are re-added after the removal, and the bit files can be used after normal compilation;

analysis

The reason why the bit file is abnormal is that the configuration of spi is modified to make the data in the 04 register a floating state, which affects the subsequent output;

Program version management is very important

Recently, I have been learning to use Git for program version management. After such a fork, I finally know what branch is useful for.

However, it is a bit difficult to manage Vivado programs with Git. I hope that through learning, there is a complete version management plan.

Guess you like

Origin blog.csdn.net/sinat_31206523/article/details/107700543