Removing VTOR_PRESENT warning once I added CMSIS library

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Roger
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

Hi,

Some time ago I could add CMSIS library with the help of @Rakshith (see the post here). His instructions were clear and since then I can run projects with the CMSIS library included. Now, what I want to do is to understand and remove the warning that I get every time I compile my projects with CMSIS.

The warning I receive says "__VTOR_PRESENT not defined in device header file; using default".

As far as I know, PSoC projects don't include a <device.h> header, but a <project.h>. And I am not sure if I have to modify something there or what exactly I have to do to get rid of this warning.

Thanks for comprehension and time.

0 Likes
1 Solution
AlenAn14
Moderator
Moderator
Moderator
500 replies posted 100 solutions authored 250 replies posted

Hi @Roger ,

The Vector Table Offset  Register (VTOR) is present in ARM cortex M3  processors (which is used in PSoC 5LP).

In order to remove this warning, you can either provide the '#define __VTOR_PRESENT  1' in the file 'core_cm3_psoc5.h'. above the '#include <core_cm3.h>' This file is present in the following path
<project path >\Generated_Source\PSoC5\core_cm3_psoc5.h

You can alternatively set this define in the project build settings as well in the following manner:
Build Settings > Compiler > PreProcessor Definitions

AlenAn14_0-1645000781546.png

I would recommend the 2nd method, as every time you clean and rebuild the project, the Generated_Source folder will be refreshed and you may lose any modifications you have done in the same.

Warm Regards
Alen

View solution in original post

3 Replies
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @Roger,

Have you tried to modify the define "__VTOR_PRESENT"?

Have you tried to re-generate the files and check if the warning occurs or not?

Regards,
Nikhil

0 Likes
AlenAn14
Moderator
Moderator
Moderator
500 replies posted 100 solutions authored 250 replies posted

Hi @Roger ,

The Vector Table Offset  Register (VTOR) is present in ARM cortex M3  processors (which is used in PSoC 5LP).

In order to remove this warning, you can either provide the '#define __VTOR_PRESENT  1' in the file 'core_cm3_psoc5.h'. above the '#include <core_cm3.h>' This file is present in the following path
<project path >\Generated_Source\PSoC5\core_cm3_psoc5.h

You can alternatively set this define in the project build settings as well in the following manner:
Build Settings > Compiler > PreProcessor Definitions

AlenAn14_0-1645000781546.png

I would recommend the 2nd method, as every time you clean and rebuild the project, the Generated_Source folder will be refreshed and you may lose any modifications you have done in the same.

Warm Regards
Alen

AlenAn14
Moderator
Moderator
Moderator
500 replies posted 100 solutions authored 250 replies posted


Hi @Roger 

Regarding your comment "Just to say I really appreciate your help. Also, I would like to say it might be a good idea to add the include you told me in this tutorial."

Glad to help and Thank you for your feedback on the same.
We will check on the mentioned KBA and update the same as necessary.
Thank you for pointing out the same.

Warm Regards
Alen

0 Likes