This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

HalCoGen - corruption of USER CODE

Other Parts Discussed in Thread: HALCOGEN

Hi,

after updating HalCoGen from V3.5.0 to V3.5.1, USER CODE has been corrupted in
file "rti.c".

Due to the fact, that there are now only 75 instead of 78 "USER CODE sections",

USER CODE gets shifted to wrong places (functions)!

This is what happened:

V3.5.0:

void RTI_1ms_IRQ(void)
{
/* USER CODE BEGIN (74) */
/* USER CODE END */

    rtiREG1->INTFLAG = 1U;
    rtiNotification(rtiNOTIFICATION_COMPARE0);

/* USER CODE BEGIN (75) */
    timer_1ms_IRQ();
/* USER CODE END */
}

/* USER CODE BEGIN (76) */
/* USER CODE END */

#pragma CODE_STATE(RTI_SupportingPoint_IRQ, 32)
#pragma INTERRUPT(RTI_SupportingPoint_IRQ, IRQ)

void RTI_SupportingPoint_IRQ(void)
{
/* USER CODE BEGIN (77) */
/* USER CODE END */

    rtiREG1->INTFLAG = 2U;
    rtiNotification(rtiNOTIFICATION_COMPARE1);

/* USER CODE BEGIN (78) */
/* USER CODE END */
}

-------------------------------------------------------------------------------------------------------

V3.5.1

void RTI_1ms_IRQ(void)
{
/* USER CODE BEGIN (71) */
/* USER CODE END */

    rtiREG1->INTFLAG = 1U;
    rtiNotification(rtiNOTIFICATION_COMPARE0);

/* USER CODE BEGIN (72) */
--- My Irq Function has been moved to 'RTI_SupportingPoint_IRQ()' ---
/* USER CODE END */
}

/* USER CODE BEGIN (73) */
/* USER CODE END */

#pragma CODE_STATE(RTI_SupportingPoint_IRQ, 32)
#pragma INTERRUPT(RTI_SupportingPoint_IRQ, IRQ)

void RTI_SupportingPoint_IRQ(void)
{
/* USER CODE BEGIN (74) */
/* USER CODE END */

    rtiREG1->INTFLAG = 2U;
    rtiNotification(rtiNOTIFICATION_COMPARE1);

/* USER CODE BEGIN (75) */
    timer_1ms_IRQ();                     //WRONG!!!!!!!!!!!!
/* USER CODE END */
}

-------------------------------------------------------------------------------------------------------

Please pay attention to compatibility of  "USER CODE sections", when updating HalCoGen,
otherwise this may cause a lot of rework for the software engineers.

Best regards,

Andy