analogdevicesinc / ai8x-synthesis

Quantization and Synthesis (Device Specific Code Generation) for ADI's MAX78000 and MAX78002 Edge AI Devices
Apache License 2.0
55 stars 49 forks source link

Fix deprecation warning, use MXC_NVIC_SetVector #260

Closed Jake-Carter closed 2 years ago

Jake-Carter commented 2 years ago

This PR updates the izer tool to generate code with MXC_NVIC_SetVector instead of NVIC_SetVector.

NVIC_SetVector was deprecated in the last release.

Code that uses this function will still compile and work as expected (see nvic_table.h), but with a deprecation warning:

cnn.c:1212:3: warning: 'NVIC_SetVector' is deprecated: Use MXC_NVIC_SetVector instead.  See nvic_table.h for more details. [-Wdeprecated-declarations]
 1212 |   NVIC_SetVector(CNN_IRQn, CNN_ISR); // Set CNN complete vector
      |   ^~~~~~~~~~~~~~
In file included from /home/jakecarter/repos/msdk/Libraries/PeriphDrivers/Include/MAX78000/mxc.h:51,
                 from cnn.c:66:
/home/jakecarter/repos/msdk/Libraries/PeriphDrivers/Include/MAX78000/nvic_table.h:74:5: note: declared here
   74 |     NVIC_SetVector(IRQn_Type irqn, void (*irq_callback)(void))
      |     ^~~~~~~~~~~~~~
rotx-eva commented 2 years ago

Depends on #259