Keil Compile Error: ..\OBJ\USART.axf: error: L6002U: Could not open file ..\obj\sys.o: No such file or directory

This is not the first time that this problem has occurred. When I go to the Internet for help, it mostly refers to the problem of environment variables. After I change it, I find that keil flashes back. When I see someone saying that it is impossible to generate. O files, I add them manually, but my intuition tells me that this is the most correct choice. After consulting the data, I find that the following problems occur.

One reason for the error is that your computer user name is Chinese, which is the problem of environment variables, but I did not report an error when running the routine, indicating that there is no problem with my environment;

Another reason is that there was a low version of keil software installed before, and the registry was not deleted after uninstallation. At this time, just delete it.

My problem is that I didn’t pay attention when creating a new project. I copied the routine directly, and then added the file manually, resulting in an existing. O file. At this time, I compiled it again, resulting in a problem. Because preprocessing, compilation, assembly and linking are indispensable, the. O file is generated in the assembly stage. If it already exists, it will trigger the error report. I would like to remind you that the new project should not be as easy as me, but step by step

Read More: