vectorgrp / XCPlite

Simple implementation of the ASAM XCP on Ethernet protocol
MIT License
171 stars 93 forks source link

Segmentation Fault using local variables.. #23

Closed lkopi246 closed 2 years ago

lkopi246 commented 2 years ago

Hi,

I tried using local variables for creating parameter in a2l and while running it gave segmentation fault. So I want to ask, can we use local variables for creating parameters, or only global variables are valid for using in create parameter.

I am very new to this xcp stuff. Any help will be appreciated.

RainerZ commented 2 years ago

Hello,

Sorry, XCPlite does not support automatic local variables yet.

Automatic variables are located on the stackframe of the current block and do not have a constant memory address. XCPlite only supports dynamic memory addressing for class instances.

Static variables with local scope can be handled by newer CANape versions. But this is very unusual programing style.