Re: TMS470 with IAR C++ Compiler
- From: "Hagar" <mm283729@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 22 Jan 2009 19:29:57 -0600
Hi George! Thanks for the fast response!
I know C and C++ aren't interchangeable. Sorry for bad explanation. I was
at work trying to solve this problems and didn't explained well.
I have got simple code from TI website which configures CAN module (SCC)
to receive any CAN message. This code works well if I use IAR C Compiler
Version 5.1, but if I create another project using IAR C++ Compiler it
doesn't recognizes CAN interruption. In fact, when the message is received
the software stops working, like if there wasnÂ´t an IRQ routine!
In C project all the configurations and register's setups are made in only
one source file (main.c). In C++ project registers setup and configurations
are the same, the difference are, of course, the compiler and a "Can"
class. I'm sure the logic is the same (I've compared all the registers in
both projects and they are identical).
After many attempts to solve this (web researches, reference guide,
datasheets, help files...) I decided to test both codes in IAR Version 4,
which I have installed in an old machine, and both projects (C and C++)
Reading IAR documents about the two versions (IAR V4 and V5) I didn't find
any huge difference that could interfere in V5 C++ Compiler. I suspect of
different startup operation (cstartup.s file) between this versions but
didn't find more explanations about it! Does anyone have some material
about startup code?
- IAR Embedded Workbench V4: C and C++ projects working fine!
- IAR Embedded Workbench V5: Only C version works.
- The source codes used to test the different versions are the same!
- No errors or warnings are shown in either version.
- Code optimization is turned off.
- With IAR Version 5 and C++ project the Interruption Routine seems to be
"ignored" by the compiler (but it don't generate warning or errors).
- I'm using the same IAR Development Board to test both projects.
I'm at home now and don't have the code with me, but tomorrow I'll post
Any idea that could show a new way?
Sorry for huge email and thanks a lot for your attention and time!
On Thu, 22 Jan 2009 10:32:38 -0600, "Hagar"weird
I'm trying to use C++ and IAR for TMS470 uC's but I'm getting some
anything...troubles with C++.
For example: I have a simple test code to receive CAN frames using
interrupts. It compiles ok but when the frame arrives the application
If I use the same logic and configurations with C compiler everything
I did a research for C++ Projects with TMS470 but didn't find
.Do you have a link or a simple C++ IAR project using interrupts?
Any help will be appreciated!
Thanks a lot!
C and C++ aren't interchangeable. Can you post the code?