AnsweredAssumed Answered

code bugs in Serial_LDD

Question asked by Marc Lindahl on Jul 15, 2013
Latest reply on Jul 16, 2013 by Ladislav Vadkerti

in the generated file AS1.c, the header says it's:

**     Filename    : AS1.c

**     Project     : ProcessorExpert

**     Processor   : MK20FX512VLQ12

**     Component   : Serial_LDD

**     Version     : Component 01.168, Driver 01.10, CPU db: 3.00.000

**     Compiler    : GNU C Compiler

**     Date/Time   : 2013-07-15, 16:26, # CodeGen: 6

 

 

In line 283 and line 335 there's a missing cast, which causes compilation error in C++.

 

line 283:

  DeviceDataPrv->InpDataPtr = BufferPtr; /* Store a pointer to the input data. */

 

should cast the right side to (unsigned char*) at the very least (that gets rid of the error and is the correct data type).

 

same at line 335:

  DeviceDataPrv->OutDataPtr = BufferPtr; /* Set a pointer to the output data. */

 

the error without the cast is:

DescriptionResourcePathLocationType
invalid conversion from 'LDD_TData* {aka void*}' to 'std::uint8_t* {aka unsigned char*}' [-fpermissive]AS1.c/test/Generated_Codeline 283C/C++ Problem

Outcomes