CAN001_Conf.c code generation with CAN APP

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

cross mob
Not applicable
Hello!
I created a CAN node like described here: http://www.mikrokontroler.pl/content/mikrokontrolery-infineon-xmc4500-w-praktyce-czesc-7-obsluga-mag...
But when I want to debug the code there's something strange written into CAN001_Conf.c:
/* Noded Handle structure */
const CAN001_HandleType CAN001_Handle0 =
{
.BaudRate = {0x17, /* Baud rate Prescaler value */
0x0, /* Synchronization Jump Width */
0x6, /* Time segment 1 */
0x1, /* Time segment 2 */
0, /* Divide prescaler by 8 */
},
.CanNodeRegs = CAN_NODEd, /* Node register offset value */
.NodeID = d, /* Current node number */
.LoopBackModeEn = 0, /* Loop back mode selection*/
.NodeMONo = 2, /* Total message object allocated to node list */
.FirstMOMapping = /
};


Is there something wrong with the CAN App or the code solver? Doesn't it has to be a uint8_t like NodeID = 0?
I have to edit both config-files (CAN001_Conf.c, CAN001_Conf.h) manually to get it working.

Any clues?
0 Likes
14 Replies
Not applicable
Hi CAN,

Are you using latest release of DAVE plug-ins? Could you pls provide some configuration details? For example, App version, signal connection & pin assignment etc? Thanks.

Best regards,
Sophia
0 Likes
Not applicable
Thanks for your quick response, here are some details:
Relax Kit F100K1024 (not listed in supported devices@CAN001 - is that a problem?), DAVE Version: 3.1.6, CAN001/0 1.0.0
Signal connection: CAN001 LMO1 Transmit Interrupt - NVIC002 - Interrupt Node
PIN assignment: CAN001 Rx-1.4/Tx-1.5, IO003LED P1.1, IO003Button P1.14
If there's anything else you need to know, just tell me.
0 Likes
User5581
Level 3
Level 3
We also are experiencing this same code generation bug in CAN001 ver 1.0.0 with an XMC4500F144K1024 target.
We also see some other places where CAN001 v1.0.0 sometimes produces invalid code in CAN001_Conf.h
Not all projects using CAN001 v.1.0.0 seem to exhibit the problem.

Interaction with the app engineers here in California suggest that it is a DAVE3 version upgrade issue, and that it
might be mitigated by doing a side-by side manual copy of the project with 2 instances of DAVE3 open as has been discussed elsewhere in the forum.

I look forward to a CAN001 version release that fixes this bug.
0 Likes
Not applicable
Hi CAN,

Unfortunately I am unable to reproduce your problem. I would appreciate that you could provide the detail steps of creating this fault. Will this problem still exist if you re-create a new project? Would you mind to share your project?

Hi zoompig,

Same for your case, I am unable to see the problem whatever using different workspaces and library stores or different workspaces but same library store during side-by-side manual copying. But, I would like to say thank you for the feedback. We will take a note. Do update us if any findings, thanks.

Best regards,
Sophia
0 Likes
lock attach
Attachments are accessible only for community members.
Not applicable
Hello sophia.
I attached the project as it is. After "Generate Code" the CAN-config-files (.c & .h) show the mentioned problems.


Hello zoompig.
Thanks for your hint. For me it worked. I deleted and re-added the CAN001-App. I had to reenter my configurations of course but now "Generate Code" sets NodeID=1 as it should be.
http://www.infineonforums.com/threads/646-Generated-App-code-fails?p=2056&viewfull=1#post2056
0 Likes
Not applicable
Hi CAN,

Thank for the project file. I saw the problems you mentioned. But, I am unable to replicate it here. Are you using version control for DAVE generated code? Are you using the "side-by-side manual copy" method to create this project? Did two instances of DAVE point to two different workspaces and local library stores? I'd like to get more details on the step to replicate the problem. Thanks.

Best regards,
Sophia
0 Likes
Not applicable
Hello sophia.
I've got the same problems again.
As far as I know I don't use version control (I even don't know where to find).
I also didn't make a side-by-side-copy. I just have one project folder of this CAN-App (beside 9 other projects) in my workspace and on my computer.
I have only one instance of DAVE running at a time, that means also that I have only one workspace (C:\Users\workstation\Documents\DAVE_Projects) to point to.
Is there any solver-log-file that could help you analyzing the problem?
Thanks again.
0 Likes
Not applicable
Hi CAN,

Yes, pls provide your solver/log files. They are under workspace folder: \.metadata\ (ex: C:\Temp\DAVE_CE_WS_v316\.metadata). Thanks.

Best regards,
Sophia
0 Likes
lock attach
Attachments are accessible only for community members.
Not applicable
Besides the NodeIDs also the LMOs get currupt inside the config-files by using the solver.
Hope it helps analyzing the problem.

Thanks.
0 Likes
Not applicable
Hi CAN,

Thanks for file. We will update you once have outcome.
In addition, pls be informed that there was a DAVE3 App update yesterday containing a new version of CAN001 (refer to DAVE3 Forum thread "Information about Updates"). Would you like to make a try and see whether the problem exists?

Best regards,
Sophia
0 Likes
Raj
Employee
Employee
Hi CAN,

Could you please get me the DAVE CE & IDE Plugins versions used?
From DAVE, Help --> About DAVE 3 --> Installation Details --> Installed Software , DAVE CE & IDE versions.

Best Regards
Raja
0 Likes
Not applicable
Hello Sophia: No problems so far with the new CAN-App Update.
Hello Raja:
DAVE3 CE 1.0.52.201305241711 com.ifx.davex.ms.feature.feature.group Infineon Technologies
DAVE3 IDE 1.0.42.201306211014 com.ifx.dave.platfrom.feature.feature.group Infineon Technologies
0 Likes
Raj
Employee
Employee
Hi CAN,

Thanks for the details.

The root-cause is the Multiple-reference created by the datamodel to a proxy register. This will be analysed in detail for corrective actions.

Here you see the quick fix for the issue. Instead of using proxy register to get the mapped resource group, Use the proxy resource group itself as below...

Line No. 71-73, in CAN001Confc.jet file at (//Dave/Model/CAN001/1.0.0/Templates/CAN001Confc.jet)

<% MappedUri = app.getMappedUri(AppBaseuri + appInst + "/node"); %>
<% if((MappedUri != null) && (MappedUri != "")) { %>
<% nodeInst = MappedUri.substring(MappedUri.lastIndexOf("/")+1).trim(); %>

Best Regards
Raja
0 Likes
Not applicable
Thanks Raja for troubleshooting. Hope it will be included in the next update.

What about the same issue with
#define CAN001_Handle0_NODE_LMO1 CAN_MO/
0 Likes