cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP257F-EV1 load and start CM33 from cmd prompt

Hedley
Associate III

I am trying a simple CM33 ELF test. This one just has the STM32CubeMX boilerplate for the CM33 (non secure). I added a toggle on GPIOJ[6]. 

I stripped out a ton of the inits leaving just the GPIOJ[6] and pin toggle. after the seq below LED3 *does* toggle.
But... the system watchdogs after ~30secs. How to kick off a CM33 program and not have start hang?
Is there some way the CM33 can tell the CA35s to keep going and leave the CM33 running?

echo -n /home/hedley > /sys/module/firmware_class/parameters/path
echo start >/sys/class/remoteproc/remoteproc0/state   <<<<<<<< this will not return to the prompt... hang.

/home/hedley
lrwxrwxrwx 1 hedley hedley 27 Jan 20 16:50 rproc-m33-fw -> test_mp2_CM33_NonSecure.elf
-rwxr-xr-x 1 hedley hedley 3216664 Jan 20 16:51 test_mp2_CM33_NonSecure.elf

tnx
Hedley

 

2 REPLIES 2
Olivier GALLIEN
ST Employee

Hi @Hedley,

Such kind of error usually happen when the used OpenSTLinux image does not properly assign resource to M33. 

Are you using a custom image or the starter package ? 

For starter package you might use the FlashLayout_xxxx_stm32mp257f-ev1-ca35tdcid-ostl-m33-examples-optee

For reference you can refer to  Develop on Arm® Cortex®-M33 - stm32mpu

Hope it help

Olivier 

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Hedley
Associate III

Appreciate the input Olivier. The reason for the hang is as follows.

1) If you use the hal funcs to init and toggle GPIOJ[6]... the LED will toggle but you will crash for ~30secs till WD reset.

2) If you use the BSP funcs to init and toggle the GPIOJ[6], the CM33 can be started and the kernel doesn't crash.

Make sure the #if DEBUG while(debug) loop is not in or your code will go nowhere. (unless you want to wait for debug attach)

#if 0
#ifdef DEBUG
      while(debug);
#endif /* DEBUG */
#endif

Hedley