Dear all, I'm kindly looking for your help to get this cute pixhawk working.
After loading the Simulink model to the pixhawk using the awsome 'Embedded Coder Support Package for PX4 Autopilots', I couldn't arm the motors and coudn't start the flight (I have no ability to control the pixhawk through the RC transmitter), I'm sure that there is something missing in the 'rc.txt' file in the SD card, but I do not know how to fix that.
Also I have the following errors;

I also tried manually to load the parameters but the problem persists:
param set COM_FLTMODE1 3
param set COM_FLTMODE2 1
....
here is my rc.txt:
usleep 1000
uorb start
usleep 1000
usleep 1000
tone_alarm start
usleep 3000
px4io start
gps start # #gps start -f Starts GPS driver and Fake a GPS signal (useful for testing)
usleep 1000
sh /etc/init.d/rc.sensors
usleep 1000
ekf2 start
usleep 1000
mtd start
usleep 1000
param load /fs/mtd_params
usleep 1000
rgbled start
usleep 1000
fmu mode_pwm # This is required for AUX PWM channels
usleep 1000
dev/ttyACM0 -m config 鈥搙
px4_simulink_app start
nshterm /dev/ttyS6 & #this will make ttyS6 the serial console
mavlink boot_complete
Thank you
Is it possible that you updated PX4 without adapting your startup script to the changes?
What version of PX4 are you using?
Dear julianoes : Hello
Thanks for your replay and your time, this is really kind of you.
I'm using this

Kindly, Where can I find the appropriate rc.txt file.
I'm using MATLAB R2019b. and the rc.txt file is provided in C:\ProgramData\MATLAB\SupportPackages\R2019b\toolbox\target\supportpackages\px4\lib\etc
Dear julianoes , I would like to inform you that another freind suggested the following
{{Hi,
try 'px4io safety_off' in the nsh or rc.txt. Maybe its just in save mode...
Best, Sebastian }}
But still not working
BESTS
Do you know with what PX4 version MATLAB has tested this? I really have not seen MATLAB connected to PX4 like this in years.
Hello @julianoes
Really don't know. I found this in matlab site: https://www.mathworks.com/help/supportpkg/px4/ug/px4-system-startup-sdcard.html searchHighlight=Customize%20PX4%20System%20Startup&s_tid=doc_srchtitle
Note
Before customizing the PX4 system startup, ensure that the Pixhawk Series flight controller is flashed with PX4 firmware. If you were using ArduPilot firmware before, or if you are not sure about the current firmware type and version of the flight controller (for example, if it is a new Pixhawk flight controller board), flash the latest stable release of the PX4 firmware, using QGroundControl. Refer to QGroundControl documentation for more details on uploading the PX4 firmware. This action needs to be done only once, for a specific board.
BEST
Interesting, it doesn't have any date references or PX4 version information. It's hard to know with what state this was last tested. Could you ask the people behind this MATLAB package?
You can also try to flash 1.8 or 1.9 to see if it works with that.
Thank you @julianoes
I see. I already asked them, still waiting for the answer, a week ago.

@julianoes , all that I know is that the Embedded coder support package uses the 1.8.0 firmware otherwise it doesn't work.
Hello @julianoes
Someone suggest this

Does it mean anything to you?
The problem is that I can't load parameters while using sd card.

need help
thanks
Could you connect a debug probe and log the whole startup output?
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.