Tag Archives: STM32

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

Keil compilation Error: Error: L6218E [How to Solve]

KEIL compiles and reports an error

…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_Cmd (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_DeInit (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_GetCalibrationStatus (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_GetConversionValue (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_GetFlagStatus (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_GetResetCalibrationStatus (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_Init (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_RegularChannelConfig (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_ResetCalibration (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_SoftwareStartConvCmd (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_StartCalibration (referred from adc.o).


Go to Manage Project Items and add adc.c under FWLib, see the picture below for the exact location, I used the project template of Positive Point Atomic, anyway, find the adc.c file and add it in.



After adding and recompiling, no error will be reported

Cmake error solution encountered in STM32 development with clion

Recently, if you want to use clion to replace keil for STM32 development, you need to install the following software and add the last two to the system path:

STM32CubeMX

Clion

MinGW

arm-none-eabi-gcc  

After configuring toolchain and cmake, it is found that the simplest project cannot cmake and displays

CMake Error: CMake was unable to find a build program corresponding to “MinGW Makefiles”.   CMAKE_ MAKE_ PROGRAM is not set.   You probably need to select a different build tool.

After debugging for a long time, the final solution: do not use mingw64, download the installation tool of mingw32 on the official website: mingw-get-setup.exe, and configure it again. It may be that 64 bit MinGW is incompatible.

[Solved] error:#20: identifier “HAL_StatusTypeDef“ is undefined.

There are 30 errors during editing. The errors are: error: #20: identifier “hal_statustypedef” is undefined. After checking, all required Hal_Statustypedef files contain #include “stm32f4xx_hal_def.H”, which is contained in the options for target C/C + + inclusion path.

Rivers/CMSIS/device/St/stm32f4xx/include, and find stm32f4xx in the folder_hal_Def.H, which can also be seen in the compiled project.

Solution:

This problem is quite common. Basically, such an alarm occurs only when you add your own C file. Just add #include “stm32f0xx_hal.H” at the beginning of your own C file. Note that it is the beginning.

Error: l6218e: undefined symbol appears when keil calls lib

1. Recently, when using MDK to generate lib, Keil failed to call lib, resulting in a lot of undefined problems

2. When generating lib with keil for testing, you can’t add the header file to the project.

        Delete all. H files, regenerate the Lib file, and call again. It is found that there will be no more problems such as error: l6218e: undefined symbol

stm32cubeAI “validation on target “ ERROR [How to Solve]

After clicking validation ontarget, the following error appears:

E200(ValidationError): stm32: Unable to bind the STM AI runtime with “network” c-model: []

connection to “serial:115200″/”115200” run-time fails

E801(HwIOError): Invalid firmware – COM5:115200

This is because the cube AI toolkit of STM32 currently only supports a single core. If you use the stm32h747 dual core board, you can switch to the M7 core.

RT-thread assertion failed at function:rt_application_init

Today, after I used message queue, mailbox, ADC and multiple serial port threads at the same time, the system produced a series of errors.

The error contents are as follows:


After continuous attempts, I found a solution, which is recorded here.

Reduce the thread stack size of main thread and fishsh shell thread to 1024 (the value is for reference only).


Integrated development environment: RT thread studio

MCU:STM32G030C8

Keil5 error: #29: expected an expression [Solved]

…/Core/Src/main.c(113): error: #29: expected an expression


preface

When defining a macro, you habitually align and type spaces, resulting in an error when calling

1. Wrong situation

#define SDA_High()   do{HAL_GPIO_WritePin(I2C_Port,I2C_SDA_Pin,GPIO_PIN_SET);}while(0)
#define SDA_Low ()   do{HAL_GPIO_WritePin(I2C_Port,I2C_SDA_Pin,GPIO_PIN_RESET);}while(0)  
//      SDA_Low ()  Spaces added for alignment

When calling the program

	SDA_Low();
	SDA_High();

Program error:
…/core/SRC/main. C (113): error: #29: expected an expression
…/core/SRC/main. C (113): error: #65: expected a “;”
solution: remove the space

Summary

Format #define identifier replacement list of macro definition
macro definition uses “identifier” to represent the content in the “replacement list”. The identifier is called the macro name. During preprocessing, the preprocessor will replace all macro names in the source program with the contents in the replacement list in the macro definition. When defining many parameters, it is recommended to use do {} while (0). For reasons, refer to the benefits of using do {} while (0) in macro definition

How to Solve Keil Error: error: #29: expected an expression

About the solution of error: #29: expected an expression

Recently, a keil project was created, and an error occurred during compilation: #29: expected an expression

This problem is because keil MDK uses C90 by default. You need to modify the configuration to support C99 to solve this problem.

The specific solutions are as follows:

Magic Wand --> C/C++ --> Check 'C99 Mode' on the right to confirm  

Finally, recompile:

- 0 Error(s), 0 Warning(s).

Solution to ch32f103c8 burning prompt internal command error

Material: ch32f103c8 minimum system board, keil5.27

Phenomenon: burning prompt internal command error

Solution: connect boot0 and boot1 to the jumper cap as shown in the figure below

Then click keil’s debug – & gt; Setting, select SWD in the connection port to see if the serial number similar to that in the figure below appears in the SWD service serial port (you can burn when it appears)

 

 

QGC Error: Fail: No CPU load information [How to Solve]

It is said that because the bootloader does not match the Px4 firmware version, it is necessary to modify the parameters in the QGC so that it can be updated to the matching version of bootloader when installing the firmware

Step 1: modify  SDLOG_PROFILE   Parameters from “default” to “default” and “high rate.”   As shown in the figure:

Step 2:   Modification SYS_BL_Update parameter to 1  As shown in the figure:

Step 3: format the SD card and download the firmware again

Problem solving!!!!!