autogenerated code with error

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

cross mob
Not applicable
The autogenerated code puts this line:

WR_REG(PORT14->PDISC, PORT14_PDISC_PDIS0_Msk, PORT14_PDISC_PDIS0_Pos, PORT_PDISC_PDIS-1); /* P14.0 : PORT14_PDISC_PDIS0 */

in the function void DAVE_MUX_PreInit(void) of DAVE/Generated/src/DAVESupport/MULTIPLEXER.c file.

The compiler gives the error:
../Dave/Generated/src/DAVESupport/MULTIPLEXER.c: In function 'DAVE_MUX_PreInit':
../Dave/Generated/src/DAVESupport/MULTIPLEXER.c:278:3: error: 'PORT_PDISC_PDIS' undeclared (first use in this function)

Changing the line as follows:
WR_REG(PORT14->PDISC, PORT14_PDISC_PDIS0_Msk, PORT14_PDISC_PDIS0_Pos, PORT_PDISC_PDIS1); /* P14.0 : PORT14_PDISC_PDIS0 */

the compilation ends with no error.
Could you explain me if this is a bug of DAVE's code generation function and if my solution is correct?
0 Likes
7 Replies
Not applicable
Hi sitael,

Are you using IO001[1.0.10]? Is this pin (P14.0) used as analog input? Which function is this pin used for? Per helps you can give some more details on the project configuration eg. snapshot of "S/W App Connectivity View"?

Best regards,
Sophia
0 Likes
Not applicable
I'm not using IO0001 and P14.0 in my project. You will find attached the screenshots of the pin assigniments (part 1 and 2) with the components used.
0 Likes
Not applicable
Hi sitael,

I'm wondering how you can get those port configuration for P14.0 if you are not using P14.0 in your project? Perhaps it is used by other Apps? Could you pls provide a resource mapping report (click "Resource Mapping Information" button on DAVE CE tool bar) so that we are able to know all the Apps you used in the project? BTW, did you use the latest released apps library? If not, could you pls try with the latest version and update me if the problem till exists. Thanks.

Best regards,
Sophia
0 Likes
lock attach
Attachments are accessible only for community members.
Not applicable
Hi Sophia,
You will find attached resource mapping, pin assignment and signal assignment report.
0 Likes
Not applicable
Hi sitael,

From the Resource Mapping table and Pin Assignment table you provided, it is confirmed that P14.0 is not used in this project. So it is impossible to get port configurations for P14.0 by using DAVE 3 auto-code generation function. I've tested and confirmed this by creating a fresh project with all the Apps you used. Pls try to create a fresh project with latest version apps. If the problem still exists, send us the whole project. Thanks.

Best regards,
Sophia
0 Likes
Not applicable
Hi sophia,
Do you know how to generate a new project directly from the Resource Mapping files exported from the previous project (without manually adding all components and pins again)?
0 Likes
elegantk
Employee
Employee
Hi Sitael,

It is a good idea to extract the old project information/setup into a new DAVE version project.
Unfortunately, the present version of the DAVE3 does not support such functionality at the moment.
0 Likes