Differences in scheduling in POSIX Simulator

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
DontHesitateAutomate
Posts: 1
Joined: Thu Nov 23, 2023 11:38 am

Differences in scheduling in POSIX Simulator

Post by DontHesitateAutomate »

Hello all,

I'm currently writing my Masterthesis on test automation. The main goal was to develop tools for developers to create tests for a CANopen network, in a way that they dont have to use the hardware, but can directly execute tests on their developer computer.
This network consists of some STM32 microcontrollers which use ChibiOS RT (2.3.3.) and HAL. I ported the uC Software to Linux and developed the necessary tools to execute some tests revolving around the setup of CANopen in the uC. So the tests and tools work fine.

Now I have to document and evaluate my approach and compare the simulated uC with the real ones. In this post http://forum.chibios.org/viewtopic.php?t=5105 I read, that preemption is missing from the POSIX Simulator.
Are there any other differences in the general behaviour of RT?
Is there maybe any documentation for the Simulator I overlooked?
Or can someone point me into the right direction in the RT code for STM32F4 and Linux so I can work out the differences myself?

Thanks in advance
Arndt
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Differences in scheduling in POSIX Simulator

Post by Giovanni »

Hi,

The only difference regarding scheduling is preemption. You need to manually insert a call to the simulator port in points where you want to check for preemption (looking for pending interrupts basically).

Code: Select all

#if defined(SIMULATOR)
      _sim_check_for_interrupts();
#endif


Giovanni
Post Reply