IO001_Conf.c:78:6: error: 'iocr_pcrU' undeclared here (not in a function)

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

cross mob
Not applicable
I have added the ADC001 App to my project and I have configured it to have 3 groups containing 8, 6 and 2 channels respectively.

The Solver and Code Generator executed without problem but when I Build the project I get the error...

IO001_Conf.c:78:6: error: 'iocr_pcrU' undeclared here (not in a function)


In the DAVE generated "IO001_Conf.c" file is the following code...

const IO001_HandleType IO001_Handle11 = {
14U , /* Mapped Port */
15/iocr_pcrU, /* Mapped Pin */
(IO001_PORTS_TypeDef*)PORT14_BASE /* Port Base Address*/
};


The text "/iocr_pcr" has been inserted by DAVE in the Mapped Pin definition.

Here is a similar definition in the file that does not cause an error...

const IO001_HandleType IO001_Handle10 = {
15U , /* Mapped Port */
9U, /* Mapped Pin */
(IO001_PORTS_TypeDef*)PORT15_BASE /* Port Base Address*/
};


I manually edited the "IO001_Conf.c" file, removed the 'iocr_pcr' text and the error went away but I then get the following error...

DAVE3.c:100: undefined reference to `IO001_Init


On re-generating the code the ''iocr_pcr' error returns.


Any advice would be greatly appreciated.

Best regards
Aaron
0 Likes
18 Replies
Not applicable
Solved.

OK, I closed the 2 open instances of DAVE, re-generated the code and the build completed with no errors.

Strange but at least a simple fix in case you come across similar issues.

Best regards
Aaron
0 Likes
Not applicable
An almost identical problem occurred again today. The incorrectly generated piece of code in the "IO001_Conf.c" file can be seen in line 3...

const IO001_HandleType IO001_Handle12 = {
14U , /* Mapped Port */
8/iocr_pcrU, /* Mapped Pin */
(IO001_PORTS_TypeDef*)PORT14_BASE /* Port Base Address*/
};



Any advice on preventing this happening would be greatly appreciated.

Best regards
Aaron
0 Likes
Not applicable
Hi Aaron,

Are the 2 open instances DAVE 3.1.10 (different workspaces)? Is the project newly created in DAVE 3.1.10 or originally built in DAVE 3.1.8 then imported in DAVE 3.1.10?
Pls send us your project together with the .log files if the problem still exists.
BTW, are you using IE10? It seems there is a problem on attachments...

Best regards,
Sophia
0 Likes
Not applicable
Hi Sophia,

On the 2nd occurance of the problem I had just 1 instance of DAVE 3.1.10 open.

The project was originally created in 3.1.6 and migrated to 3.1.10.

I will email the project to you as it is confidential.

I am using Google Chrome, we have solved the problem with attachments which was caused by the Infineon site not being 'white listed' in our firewall program.

Best regards
Aaron
0 Likes
Not applicable
Hi Sophia,

I witnessed this problem again today. Re-generating the DAVE code fixed the problem.

Did you get a chance to investigate why this occurs ?

Thank you very much
Best regards
Aaron
0 Likes
Not applicable
Hi Aaron,

Your project has been forwarded. Pls give us some time. I will update you once get reply, thanks.

Best regards,
Sophia
0 Likes
Not applicable
Hi Aaron,

The analysis result shows that the project has been corrupted due to any of the reasons below:

1) DAVE CE project was created and used in SVN but it did not saved properly;
2) App instances (.app) files were deleted manually in the model folder;
3) “Remove” option deleted instances by only .app files, but not the ApplicationModel;
4) Tried to remove the previous version of Apps and add new version of the Apps.

Would you be able to confirm the possible scenarios for your case?

Best regards,
Sophia
0 Likes
Not applicable
Hi Sophia,

Thank you for your thoughts.

I can confirm none of the 4 options you listed occurred. It's possible that I had 2 instances of DAVE open at some point prior to the corruption. The file is always corrupted with "iocr_pcr" but not always the same location in the file.

Closing all instances of DAVE and re-generating the code fixes the problem so at least I have a work-around.

Best regards
Aaron
0 Likes
Not applicable
Hi Aaron,

It seems that there is a high chance to get the code corruption with 2 open DAVE instances. Is one of the instance DAVE 3.1.6 and the other DAVE 3.1.10? Are they with the same active project? You may provide both of the .log files when the problem occurs again.

Best regards,
Sophia
0 Likes
Not applicable
Hi Sophia,

I only have DAVE 3.1.10 installed on my laptop. The 2 DAVE 3.1.10 instances have different active projects open when the problem occurs.

Best regards
Aaron
0 Likes
Not applicable
Hi Sophia,

I have some more information for you after the problem occurred again today.

1) Only 1 instance of DAVE 3.1.10 was open
2) After changing the configuration of my ADC001/0 app, I generated the code and built the project. This is when the 'iocr_pcrU' error occurred again.
3) I could not re-cover from this by closing and re-launching DAVE.

4) I noticed the following changes had been made to the folder \Dave\Model\IO001\1.0.16...

Files io001_0.app to io001_8.app had been removed (io001_9.app to io001_26.app were still present)

5) io001_12.app had been changed (see attached zip file)

6) The was no svn interaction when the problem occured though I was able to use svn to return the files to their original state.

I hope this gives some clues

Best regards
Aaron

0 Likes
Not applicable
Hi Sophia,


The problem occurred again today. The linker error reported the problem in instance 11 of the IO001 app. I undid the changes made by DAVE to the io001_11.app using svn and all is well again.


I noticed there have been over 5000 views of this post on the forum so I suspect a lot of people are searching the internet for the same error message.


I hope you can find a solution soon.


Best regards
Aaron
0 Likes
Not applicable
Hi Aaron,

We found that the project was corrupted as we could observe .app files in the model, but the app instances are not available in the project. This results in wrong code-generation.
We suggest you to re-fetch the original version of the project from SVN according to the guideline provided and see whether it helps.
If the problem still exists, pls send us the original version of the project for our analysis.

Best regards,
Sophia
0 Likes
Not applicable
Hi Sophia,

Thank you for the update. The DAVE / SVN help document is very useful.

Just to let you know I currently version control everything under the DAVE folder. However the code corruption occurs in the project when there has been no transfer of files to / from svn so I believe the corruption is caused by DAVE rather than svn.

Best regards
Aaron
0 Likes
Not applicable


Hi Sophia,

I have noticed the attached file located in the Model folder is showing an error within DAVE on line 131. Maybe this is a clue ?

Best regards
Aaron
0 Likes
Not applicable
Hi Sophia,

I have been experiencing this problem again over the last couple of days. In this case the problem occurred in the IO001/11 pin configuration section of the IO001_config." file. The IO001/11 App was the first of 16 IO001 Apps connected to the ADC001/0 App.

This is what I did to get rid of the error...

1) I removed the IO001/11 App from the project, generated code and built the project. No errors occurred.

2) I added another IO001 App which became IO001/27, generated code and built the project. No errors occurred. IO001/27 was not linked to the ADC001/0 App.

3) I removed the ADC001/0 App, inserted it again and configured the 16 IO001 Apps again, generated code and built the project. No errors occurred.


It looks like DAVE is causing the corruption some how but recovers if the ADC001 and / or the IO001 Apps are removed and inserted again.

I also noticed the IO001 App Properties dialog doesn't list the XMC4500-F1x1024-AB, is this significant ?

Best regards
Aaron
0 Likes
Not applicable
Hi Aaron,

I have noticed the attached file located in the Model folder is showing an error within DAVE on line 131. Maybe this is a clue ?


Sorry, i couldn't find the error. The template you attached is the same as the one in a "Working" project. Could you pls provide a snapshot?

I also noticed the IO001 App Properties dialog doesn't list the XMC4500-F1x1024-AB, is this significant ?


Are you referring to "XMC4500-F100x1024-AB"? This has already been reported in eTicket 84825264. But it is not critical.

Best regards,
Sophia
0 Likes
Not applicable
Hi Sophia,

Yes the template file is the same as the working project. I just wanted to highlight that DAVE reports an error on line 131, maybe a developer can see what is wrong on line 131 ?

Yes I did mean the "XMC4500-F100x1024-AB", sorry for the typing mistake and thankyou for the eTicket information.

Best regards
Aaron
0 Likes