Skip to main content
Associate
August 31, 2023
Solved

STM32CUBEIDE Interrupt Vector Table does not correctly

  • August 31, 2023
  • 2 replies
  • 1289 views

Hi I am trying to implement my own drivers in order to learn C++ for embedded. I am working with a STM32F407G (discovery board). I was trying to implement a Handler for SysTick but for some reason when I look into the vector table in memory, SysTick vector is not set to correct function. Most probably my mistake obvious but I am a beginner and I would appreciate any help. My main.cpp looks like this:

#include <stdint.h>
#include <stdio.h>
#include "STM32F4xx_GPIO.hpp"
#include "STM32F4xx_IRQ.hpp"
void SysTick_Handler();


volatile uint8_t a;
int main(void)
{
	SysConfig();

	GPIO LED(GPIO::GPIOD, PD12, GPIO::OUTPUT, GPIO::PUSHPULL, GPIO::SPEED_VERYHIGH, GPIO::FLOAT);
	GPIO BUTTON(GPIO::GPIOA, PA0, GPIO::INPUT, GPIO::PUSHPULL, GPIO::SPEED_LOW, GPIO::FLOAT);
 /* Loop forever */
	while(1){
		LED.Write(BUTTON.Read());
	}
}

void SysTick_Handler(){

	System_Tick++;

}

Thank you.

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    CPP name mangles.

    Use extern "C" to insure C linkage

    extern "C" void SysTick_Handler(void)

    {

     

    2 replies

    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    August 31, 2023

    CPP name mangles.

    Use extern "C" to insure C linkage

    extern "C" void SysTick_Handler(void)

    {

     

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    erenimoAuthor
    Associate
    August 31, 2023

    That solved the problem thank you.