Frequently Asked Questions
General Questions
How can I get a miniHIL?
Here you can contact PROTOS Software GmbH.
What type of target controllers are compatible with miniHIL?
-
ST-Microelectronics: STM32, STM8
-
Infineon: TLE, AURIX, XMC
-
NXP: S12
-
Microchip: dsPIC33
-
ARM Cortex-M
If the processor that you need is not on the list, please contact us.
Does Protos Software GmbH provide consulting services for testing embedded systems?
Yes, you can benefit from online consulting with our expert Thomas Schütz.
Technical Questions
How can I use a ROOM DataClass in CaGe?
DataClass DDoubleClickData {
Attribute First: int32
Attribute Pause: int32
Attribute Second: int32
}
ProtocolClass PSendClick {
outgoing {
Message SendClick(int32)
Message SendDouble(DDoubleClickData)
}
}
In CaGe this DataClass can be used as follows:
Step sendDataClass:
action
``
DDoubleClickData data = {
.First = 5,
.Pause = 12,
.Second = 2
};
``
sendClick.SendDouble(``&data``)
;
If needed test step parameters can be used within the C-Code. E.g.:
Step sendDataClass(int pause):
action
``
DDoubleClickData data = {
.First = 5,
.Pause = pause,
.Second = 2
};
``
sendClick.SendDouble(``&data``)
;
DataClasses in CaGe (and Room) are C-Structs when using the miniHil. Values can be set using different syntax:
DDoubleClickData data = {
.First = 5,
.Pause = pause,
.Second = 2
};
DDoubleClickData data2;
data2.First = 5;
data2.Pause = pause;
data2.Second = 2;
DDoubleClickData data3 = {5, pause, 2};
We prefer the first variant for its good readability.
How to validate a received DataClass in CaGe?
Have a look at the example here.
Why do I get a MESSAGE QUEUE OVERFLOW error when sending large data (e.g. an array) over a message?
The message queue has a maximum message size. The queue keeps each message in a message block. All message blocks have the same fixed size. You cannot increase this size. A larger size increases the memory that the queue uses.
The msgblocksize property of the physical thread sets the block size. This property is in the MiniHilProject.etphys model. The model is a part of the miniHIL library (miniHilLib/SimModelLib/model-platform). Do not change this model.
DefaultThread PhysicalThread1 {
...
msgblocksize = 92
msgpoolsize = 256
}
The block size is 92 bytes. The message header uses some of these bytes for the address data. This leaves more than 80 bytes for the payload. You must make sure that each message stays in this payload limit.
The queue drops each message that is larger than the available payload. Then the system shows the MESSAGE QUEUE OVERFLOW error. For example, the queue drops this DataClass, because it is too large:
DataClass DLargeData {
Attribute data [200]: uint8 // 200 bytes > ~80 bytes payload -> dropped
}
You can send an array in a message. But the array and all other attributes together must not be larger than 80 bytes.
Send large data with a pointer
To send more data than one message block can hold, send a pointer. The pointer must point to memory with static allocation.
Make one or more buffers as attributes of an actor. Then send a pointer to a buffer and the length of the data:
DataClass DLargeData {
Attribute dataPtr: uint8 ref
Attribute dataLen: uint32
}
This way the system does not copy the data into the queue. This can increase the performance. But you must obey these rules:
-
The buffer data must stay valid until the receiver fully processes the message.
-
Do not use stack memory for the buffer being send as it will be invalid once the action code block finishes. Using stack memory can cause errors that are difficult to find. Use memory with static allocation, for example an actor attribute.
-
Some use cases need a handshake protocol for synchronization. In this protocol, the receiver sends a "free" message when the buffer can be reused.
|
Send a pointer only to memory that stays valid longer than the message. |
The miniHIL UART adapters use this method.
How to send and receive LIN diagnostic frames?
Have a look at the example on the LIN adapter page.
How to commit a renamed file in git if only the capitalization changed?
If you use git on windows or mac the default setting is to handle file names case insensitive. This renaming a file form "A" to "a" is not recognized as a change by git. As eTrice handles namespaces and file names case sensitive it is crucial that capitalization changes are correctly committed.
You can enable case sensitivity in git using git bash:
cd your/git/repository
git config core.ignorecase false
|
It is important to change the local setting. Changing the global git config does not have any effect as the setting is automatically set in the local git config during git clone. |