Skip to main content
MSele.1
Associate II
August 11, 2021
Solved

Need help to make my programs start automatically on boot

  • August 11, 2021
  • 2 replies
  • 2039 views

I designed my robot control system using STM32MP157f-K2 board I use the M4 core to read an IMU through SPI, read encoders and generate PWM for controlling the motors by using timers. I use A7 to read USB vision cameras, read a radar by using CAN bus, and read a lidar using ethernet. After processing the data, it sends the results to M4 for fusing with encoder and gyrometer data to make better control decisions.

I have the M4 firmware created using STM32CubeMx, and a A7 application compiled in linux. I expect them to communicate one way from A7 to M4 through virtul_uart0. I haven't been able to test the codes since I don't know how to start the Me firmware, When I loaded it directly from STM32CubeMx, I got into problems I had to reflush the board. My questions are two, and I will appreciate any advice

(1) How can I open the Linux shell on the on-board LCD screen instead of mapping it to my computer using STLink

(2) How can I start both the A7 application and M4 firmware automatically and disable the demo. I have read How to start the coprocessor from the bootloader - stm32mpu and implemented Section 2 and Section 3.2.1, but not success at all

This topic has been closed for replies.
Best answer by OlivierK

Hi MSele.1 (Community Member)

For point 1) you can open a linux shell on the board LCD by typing the command from an existing console.

root@stm32mp1:~# weston-terminal

located in /usr/bin/weston-terminal

If you don't want STLINK then you can plug a keyboard on the board USB ports an access the board console directly though LCD.

2 replies

PatrickF
ST Employee
August 26, 2021

Hi,

for point 2), this post could help you : https://community.st.com/s/question/0D53W00000wxp8dSAA

Regards.

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
MSele.1
MSele.1Author
Associate II
September 3, 2021

That thread does not seem to be helpful, may be since I am a novice.

I put my .elf firmware at Board $> lib/firmware/ and my Linux userland application is at Board $>usr/local/

Then my Linux userland application starts with these commands (here my firmware is Board2_CM4.elf)

	strcpy(command,"echo -n /../../lib/firmware/Board2_CM4.elf >/../../sys/class/remoteproc/remoteproc0/firmware");
	system(command);
	strcpy(command,"echo start >/../../sys/class/remoteproc/remoteproc0/state");
	system(command);

Fortunately by running the userland application , the firmware also starts satisfactorily. So at this moment, all I need is to automatically start the Linux Userland application

OlivierK
OlivierKBest answer
ST Technical Moderator
August 26, 2021

Hi MSele.1 (Community Member)

For point 1) you can open a linux shell on the board LCD by typing the command from an existing console.

root@stm32mp1:~# weston-terminal

located in /usr/bin/weston-terminal

If you don't want STLINK then you can plug a keyboard on the board USB ports an access the board console directly though LCD.

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.