cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Symbol SysTick_Handler multiply defined (by port_arm_cm4f.o and delay.o)

Azizz
Associate

Hello,
I'm using the STM32F407 board. I'm trying to implement FreeRTOS on a smart parking system but when using the RFID i need to define SysTick_Handler two times. How can i resolve this problem.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

When you add FreeRTOS manually, search for and delete the duplicate definitions for SysTick_Handler, etc. Use Search -> File... to search all files in the project.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

10 REPLIES 10
SofLit
ST Employee

Hello @Azizz and welcome to the community,

Need to clarify what do you mean by :


@Azizz wrote:

 i need to define SysTick_Handler two times. 


Please provide more details about your use case.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
SofLit
ST Employee

May be I understood your question.

I think you have a multiple duplication error when compiling the project. But for that you need to share your project so we could have a look at it. Sharing the main.c file is not sufficient.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

I am using an RC522 library for RFID functionality. When I manually add FreeRTOS to my project, the code reports that the SVC_Handler, SysTick_Handler, and PendSV_Handler functions are defined twice: once in the FreeRTOS port files and again in the stm32f4xx_it.c file. However, if I remove these functions from stm32f4xx_it.c, the RFID functionality stops working.

Azizz
Associate

can you please apply freertos task in the project because i can't due to the error .
its a simple project when rfid detect a card in generate a pwm signal to control a servo motor to open.

I'm not expert of RFID interface.

To me when you enable FreeRTOS you need to select another time base for HAL because FreeRTOs is using Systick.

In CubeMx, select another time base source instead of Systick. Example select TIM6:

SofLit_0-1735210776855.png

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Azizz
Associate

same problem  the code reports that the SVC_Handler, SysTick_Handler, and PendSV_Handler functions are defined twice(when i select TIM6 as time base for HAL).

Sorry I didn't understand how you did add FreeRTOS in your project? manually? or over CubeMx?

You need to add FreeRTOS in CubeMx:

SofLit_0-1735211874200.png

Don't add FreeRTOS manually.

You need to configure FreeRTOS, tasks, etc.. in this menu:

SofLit_1-1735211944515.png

And as stated previously, don't forget to set select another time base source instead of Systick.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Azizz
Associate
 
I am required to add FreeRTOS manually; it is a constraint given by my university professor. Is there another solution?
 

I recommend to add it from CubeMx. Otherwise it will be more difficult to adapt it with CubeMx for many reasons and I don't recommend adding it manually. Or tell your professor to help you on that.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.