Configuring the Real-Time Kernel

You can configure the Real-time Kernel by editing the RtKrnlConfig.ini file accessible from <InstallDrive>\MaxRT\eRTOS\.

The table below lists the configurable Kernel settings.

Setting Type Default value Description
StarvationBehavior DWORD 00000000

Sets the behavior after WatchDog time-out of a running thread.

  • 0 = Disabled
  • 1 = Freeze all active processes
StarvationTimeout DWORD 004c4b40

Sets the starvation timeout value (in microseconds).

  • 0 = No time-out
SystemExtMSpacePoolCommit DWORD 00000000

Determines whether to allocate the system process external MSpace at RTKernel start up.

  • 0 = No
  • 1 = Yes
SystemExtMSpacePoolMinThreshold DWORD 00100000 Sets the minimum size (in bytes) of the system process external MSpace.
SystemIntMSpacePoolMinThreshold DWORD 00400000 Sets the minimum size (in bytes) of the system process internal MSpace.
DisableSystemMSpacePoolExpand DWORD 00000000

Determines whether the system process MSpaces expand when depleted.

  • 0 = Expandable
  • 1 = Not expandable
SystemMSpacePoolExpandSize DWORD 00100000 Sets the minimum expand size (in bytes) for the system process MSpaces at each expansion.
DisableSystemMSpacePoolShrink DWORD 00000000

Determines whether the system process MSpaces are auto shrink when memory frees.

  • 0 = Auto shrink
  • 1 = Not auto shrink
IntMSpacePoolMinThreshold DWORD 00100000 Sets the minimum size (in bytes) of the user process internal MSpace.
ExtMSpacePoolMinThreshold DWORD 00100000 Sets the minimum size (in bytes) of the user process external MSpace.
DisableMSpacePoolExpand DWORD 00000000

Determines whether the user process MSpaces expand when depleted.

  • 0 = Expandable
  • 1 = Not expandable
MSpacePoolExpandSize DWORD 00100000 Sets the minimum expand size (in bytes) for user process MSpaces at each expansion.
DisableMSpacePoolShrink DWORD 00000000

Determines whether user process MSpaces auto shrink when memory frees.

  • 0 = Auto shrink
  • 1 = Not auto shrink
ZeroMemoryAtAllocation DWORD 00000001

Determines whether to initialize memory to zero at allocation.

  • 0 = memory is not initialized
  • 1 = memory is initialized to zero
MSpaceFootPrintLimit QWORD

0000000000000000

Sets a limit (in bytes) for the total amount of memory that can be allocated from an MSpace.

Note: This is a 64-bit value.

  • 0 = No limit
PoolCacheTrimThreshold DWORD 00200000

Sets the maximum amount (in bytes) of unused top-most memory to keep in Pool Cache.

  • ffffffff = Poll Cache trim is disabled
PoolCacheGranularity DWORD 00010000 Sets the granularity size (in bytes) of allocations from the Pool Cache to Local Pool.
PoolCacheMmapThreshold DWORD ffffffff

Sets the minimum size (in bytes) allowed for allocations directly from the Local Pool.

  • ffffffff = Disable direct allocation
FreezeProcessOnMSpaceExhaust DWORD 00000000

Determines whether to freeze the process when its non-expandable MSpace is exhausted.

  • 0 = Don't freeze
  • 1 = Freeze
DefaultTimeQuantum DWORD

0000000000000000

Sets the default thread time quantum value (in micro-seconds).

Note: This is a 64-bit value.

HardwareExceptionHandling DWORD 00000000

Determines how to handle hardware exceptions.

  • 0 = Structure Exception Handling
  • 1 = Freeze the process, and send an error message to the console
EnterDebuggerOnException DWORD 00000000

Determines the action following an unhandled exception.

  • 0 = Freeze the process, and send an error message to the console
  • 1 = Enter debugger
FreeStackOnTerminateThread DWORD 00000000

Determines whether to free the thread stack after a thread is terminated.

  • 0 = Save the thread stack
  • 1 = Free the thread stack
StopAtFirstException DWORD 00000000

Determines whether to stop at first exception to avoid extra exception during exception handling.

Note: This is a bitmap of exception indexes.

  • 0 = Don't stop at first exception
  • 1 = Stop at first exception.

BehaviourStopAtFirstException

DWORD 00000000

Determines the behavior when stopping at first exception.

  • 0 = Freeze process and send an error message to the console
  • 1 = In addition to freeze process and display error message, write extra exception analysis information into log file.
PriorityInversion DWORD 00000001

Enables or disables Mutex priority inversion.

  • 0 = Disable Mutex priority inversion
  • 1 = Enable Mutex priority inversion
SearchPath String

eRTOS bin directory

Sets the search path for loading process and RTDLL files.

The maximum length allowed for the search path is 266 characters.

Note: Quotation marks inside strings are not permitted.

LogOutputOnFile DWORD 00000001

Determines whether RtPrintf outputs to a log file (RtLogFile.txt).

  • 0 = Disable RtPrintf logging
  • 1 = Enable RtPrintf logging
NL2AutoStart DWORD 00000000 Determines whether the NL2 should start automatically.
TCPIPAutoStart DWORD 00000000

Determines whether the TCPIP Stack should start automatically.

  • 0 = Don’t start the TCPIP Stack
  • 1 = Start the TCPIP Stack

Note: NL2AutoStart needs to be enabled first if you want to start TCPIPAutoStart.

USBAutoStart DWORD 00000001

Determines whether the USB Stack should be enabled.

  • 0 = Don’t start the USB Stack
  • 1 = Start the USB Stack

Note: If the USB Stack is not enabled, the eRTOS Console will not be available.

EnableRtssJig DWORD 00000001

Determines whether to run the test jig at RTKernel startup.

  • 0 = Don't run test jig
  • 1 = Run test jig
TimeZone String EST5EDT Sets the TimeZone environment variable to establish the relationship between local time and UTC time.
DaylightState DWORD 00000000

Sets whether the system is operating in the STANDARD time zone or DAYLIGHT time zone.

  • 0 = STANDARD time zone
  • 1 = DAYLIGHT time zone