Other Parts Discussed in Thread: TDA4VH
Hi TI Experts,
Customer is working on TDA4VH SDK9.0
The tool chain they applied is ti-cgt-armllvm_3.0.0.STS
Based on the below link, beginning with version 3.0.0.STS of the tiarmclang compiler tools, the -fexceptions compiler option can be specified when the compiler is invoked to enable support for C++ exceptions.
https://software-dl.ti.com/codegen/esd/cgt_public_sw/ARM_LLVM/3.0.0.STS/README.html
Customer is trying to validate the example shown in the above link.
Customer has followed the source code shown in the above link example, and uses the Makefile to link -fexceptions. The source code and makefile can be downloaded below.
678873F4BDEE00A7CE7811AED7D295A9.zip
Customer also provided an executable file below after compiling the above code. This could be directly run our EVM board.
E93AF3D3A49760B26981775C3C15A750.zip
After running the executable file, the output is shown below.
Based on the result, we could see that if the input age is equal or greater than 18, then the output is normal as expected.
However, when the input age is less than 18, then it will goto throw & catch, in this case when it reach to the code line of std::cout inside the catch, it will exit suddenly.
The output result of age less than 18 is not the same as example of the link above.
In summary, the compilation of C++ exceptions is okay on 3.0.0.STS, but when running the executable file, it will have problem described in the throw & catch branch.
May I know that if our ti-cgt-armllvm_3.0.0.STS still has some limitation to use C++ exceptions like -fexceptions?
Thanks a lot!
Kevin