Azzera filtri
Azzera filtri

How to set DRS correctly via textfile (PS2014b)?

10 visualizzazioni (ultimi 30 giorni)
Thomas
Thomas il 13 Gen 2015
Hi all,
as a PS noob I want to set DRS manually by textfile (range.txt):
  • function1.minDelay 0x00 0xFFFF init
  • function1.maxDelay 0xFFFF 0xFFFFFFFF init
But PS told me (PS is stubbing the function):
d:\range.txt, line 1: Warning: data-range-specifications: expected a function called by main-generator
The optionsfile looks like (defines and includes removed):
  • -O3
  • -OS-target no-predefined-OS
  • -allow-language-extensions
  • -context-sensitivity-auto
  • -lang C
  • -dos
  • -enum-type-definition auto-unsigned-first
  • -includes-to-ignore all
  • -scalar-overflows-behavior truncate-on-error
  • -scalar-overflows-checks signed
  • -target mpc5xx
  • -to Software Safety Analysis level 4
  • -inline TS_MemCpy32,TS_MemSet32,TS_MemBZero32,TS_MemCmp32,TS_MemCpy16,TS_MemSet16,TS_MemBZero16,TS_MemCmp16,TS_MemCpy8,TS_MemSet8,TS_MemBZero8,TS_MemCmp8,TS_MemMove,TS_MemCpy32_NoCheck,TS_MemSet32_NoCheck,TS_MemBZero32_NoCheck,TS_MemCmp32_NoCheck,TS_MemCpy16_NoCheck,TS_MemSet16_NoCheck,TS_MemBZero16_NoCheck,TS_MemCmp16_NoCheck
  • -custom-rules d:\rules.txt
  • -sources-list-file d:\src.txt
  • -data-range-specifications d:\range.txt
  • -verif-version 1.1.1
  • -prog Test_2014_111
  • -author Test
  • -max-processes 8
Next: the stubbed function is declared as:
Retval_e function1(const StructType_t ** pAddress, timediff_ms_t minDelay, ENUMTYPE_e measurePoint, timediff_ms_t maxDelay);
2nd: how to set also the pointer and the enum via textfile?
Thanks a lot for your effort and help.
Best regards. Thomas

Risposte (1)

Alexandre De Barros
Alexandre De Barros il 14 Gen 2015
Hi Thomas,
Is the function function1 defined or undefined in your application ? If it is undefined (so stubbed), I don't see why you want to specify the range of the parameters.
Best regards,
Alexandre
  2 Commenti
Thomas
Thomas il 15 Gen 2015
Hi Alexandre,
the function is declared, because header is included (needed for call). But it's not defined, because cfile is missing due not tested. The function is from another SW-module (interface).
It seems that PS can't resolve pointerpointer to veryvery complex datastructures (5 level nested: struct-array-ptr_struct-struct...).
I hv no idea how to set the ptrptr.
Next problem is the enum type. Just specific values (0,2,5,9) are allowed. Also no idea how to set them as valuelist.
The to other params are fullrange - I tried to spent them logic (mindelay < maxdelay); but this is not necessary ;-). So full range by this way is correct.
Regards
Thomas
Alexandre De Barros
Alexandre De Barros il 15 Gen 2015
Hi Thomas!
Sorry to insist, but I don't see why you want to specify input values for a function which is stubbed, and so that is not part of the verification?
Best regards,
Alexandre

Accedi per commentare.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by