This paper proposes a multi-platform algorithm methodology in order to define firing angles of torque sharing functions (TSFs) for the indirect torque control of switched reluctance motors (SRM) through a hardware-in-the-loop (HIL) system. This proposal is used to achieve optimal levels of torque ripple and losses with accuracy and reliability, while taking advantage of real-time simulation. The analysis is performed assuming steady-state conditions of speed and torque reference for levels below the base speed, aiming to obtain firing angles ensuring optimal tracking performance. A novel methodology is proposed by using a grid search algorithm that handles the communication between Python, Code Composer, and the Typhoon HIL device. For that, an experimental data FPGA-based model with 500~ns of simulation time step is used to ensure highly accurate dynamic responses of current and electromagnetic torque. Moreover, controller-HIL (C-HIL) is used to have a safe and high fidelity testing environment, allowing rapid testing before transitioning to an experimental test bench. The simulation results are experimentally validated, demonstrating that the proposed strategy is effective and ensures optimal performance, taking into account peripheral systems of A/D, signal conditioning, PWM, and sensor emulation.