Interrupt Handler - GPIO as interrupt in Cortex M4 for i.MX7

I am trying to use a GPIO as interrupt in Cortex M4 of i.MX7. For that I refer the example driver application “gpio_imx” provided in freeRtos code."I understood the entire code but one thing i am not able to track is the interrupt handler BOARD_GPIO_KEY_HANDLER that is defined as macro in board.h file as GPIO2_INT31_16_Handler. but where does this GPIO2_INT31_16_Handler defined.

Example code is building successfully.

Dear @bipin7301

GPIO2_INT31_16_Handler is part of the interrupt vector table, which is defined in assembly language.

You can find the definition in the startup_MCIMX7D_M4.s assembly file. Depending on the compiler you are using, this file is located either at

  • .\platform\devices\MCIMX7D\startup\arm\ startup_MCIMX7D_M4.s *
    or
  • .\platform\devices\MCIMX7D\startup\gcc\ startup_MCIMX7D_M4.S *

Regards, Andy