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 IAR C++ support.

Other Parts Discussed in Thread: HALCOGEN

Recently we started evaluating TI's Hercules line as it seems to be a good platform to start developing the next generation of our automotive application. We found that configuring the device peripherals can be challenging compared to our current ARM7 platform. That is where HalGoGen makes our lives easier. The problem we have is that our toolchain (IAR) requires certain functions and symbols to be encapsulated ( extern "C" { } ) when using C++. Once HalCoGen generated the initialization code we can look for all the symbols requiring this, and encapsulate them manually, it is not the ideal solution but it works. The problem comes when we need to change some peripheral's configuration, HalCoGen deletes all of our user added lines, or if our user added lines were enclosed within the user code blocks, HalCoGen generates new user code blocks and breaks everything irreparably and we have to start all over again.

Is there some workaround for this? Does HalCoGen has some kind of built-in support for IAR's C++?

  • Hello Tomas,

    The encapsulation is required when you have mixed C and C++ source files. HALCoGen generates source files only assuming C code. I will forward this request to the HALCoGen team so that they can add it to their "to do" list.

    However, it is not expected that HALCoGen will change in any manner anything that you write within the predefined "user code" blocks. I agree that this would be an issue, and will again ask the HALCoGen team to comment.

    Please confirm that you add the encapsulation within the predefined user code blocks.

    Regards, Sunil