Skip to content

Commit f98d2b6

Browse files
committed
[MP1] Append sketch name to run_arduino helper script
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 6427acc commit f98d2b6

File tree

2 files changed

+27
-17
lines changed

2 files changed

+27
-17
lines changed

platform.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,4 +209,4 @@ tools.remoteproc_gen.busybox.windows={path}/win/busybox.exe
209209
tools.remoteproc_gen.script=run_arduino_gen.sh
210210
tools.remoteproc_gen.upload.params.verbose=
211211
tools.remoteproc_gen.upload.params.quiet=
212-
tools.remoteproc_gen.upload.pattern="{busybox}" sh "{path}/{script}" generate "{build.path}/{build.project_name}.elf" "{build.path}/run_arduino.sh"
212+
tools.remoteproc_gen.upload.pattern="{busybox}" sh "{path}/{script}" generate "{build.path}/{build.project_name}.elf" "{build.path}/run_arduino_{build.project_name}.sh"

variants/STM32MP157_DK/README.md

+26-16
Original file line numberDiff line numberDiff line change
@@ -22,44 +22,54 @@ Because every OS may have different software configurations (especially Device T
2222

2323
After Verify and Upload, you will see a message similar to the following in Arduino IDE:
2424

25-
<Arduino build output path>/run_arduino.sh generated successfully.
25+
<Arduino build output path>/run_arduino_<sketch name>.sh generated successfully.
2626
This file should be uploaded manually by SCP, SFTP, Kermit, or etc.
27-
Then run "sh ./run_arduino.sh start" command in the board's console.
27+
Then run "sh ./run_arduino_<sketch name>.sh start" command in the board's console.
2828
For detailed instructions, please visit:
2929
https://github.com/stm32duino/Arduino_Core_STM32/tree/master/variants/STM32MP157_DK/README.md
3030

31-
In this example, the user **must** upload `<Arduino build output path>/run_arduino.sh` file manually. Uploading instruction is described later in the [Uploading](#Uploading) section.
31+
`<Arduino build output path>/run_arduino_<your project name>.sh` looks like this for *Blink* example:
3232

33-
After uploading the user can use `sh run_arduino.sh start` in the console of host Linux via either SSH or Serial Console, to run the Arduino firmware.
33+
* Windows:
34+
35+
`C:/Users/%USERNAME%/AppData/Local/Temp/arduino_build_668148/run_arduino.Blink.sh`
36+
37+
* Linux/macOS:
38+
39+
`/tmp/arduino_build_668148/run_arduino_Blink.sh`
40+
41+
In this example, the user **must** upload `<Arduino build output path>/run_arduino_<sketch name>.sh` file manually. Uploading instruction is described later in the [Uploading](#Uploading) section.
42+
43+
After uploading the user can use `sh run_arduino_<sketch name>.sh start` in the console of host Linux via either SSH or Serial Console, to run the Arduino firmware.
3444

3545
#### Note
36-
* `sh run_arduino.sh start` is a one-shot command, the Arduino firmware only runs for the current boot. If you want to make it run after reboot, you need to use `sh run_arduino.sh install` command.
46+
* `sh run_arduino_<sketch name>.sh start` is a one-shot command, the Arduino firmware only runs for the current boot. If you want to make it run after reboot, you need to use `sh run_arduino_<sketch name>.sh install` command.
3747

38-
`run_arduino.sh` help page summary:
48+
`run_arduino_<sketch name>.sh` help page summary:
3949

40-
Usage: sh run_arduino.sh [start|stop|restart|generate|install|uninstall]
50+
Usage: sh run_arduino_<sketch name>.sh [start|stop|restart|generate|install|uninstall]
4151

42-
run_arduino.sh is a helper script that helps managing an Arduino binary
52+
run_arduino_<sketch name>.sh is a helper script that helps managing an Arduino binary
4353
file for the coprocessor using remoteproc framework.
4454

45-
sh run_arduino.sh start
55+
sh run_arduino_<sketch name>.sh start
4656
Upload the binary to the coprocessor then start it.
4757
This command must be executed while the script contains the binary
4858
after generate command is run.
4959

50-
sh run_arduino.sh install
60+
sh run_arduino_<sketch name>.sh install
5161
Run the binary on boot automatically by installing a systemd service.
5262

53-
sh run_arduino.sh uninstall
63+
sh run_arduino_<sketch name>.sh uninstall
5464
Uninstall the autostart service.
5565

56-
sh run_arduino.sh stop
66+
sh run_arduino_<sketch name>.sh stop
5767
Stop the coprocessor.
5868

59-
sh run_arduino.sh restart
69+
sh run_arduino_<sketch name>.sh restart
6070
Restart the coprocessor.
6171

62-
See the source code for the full help page and the more details about [run_arduino.sh].
72+
See the source code for the full help page and the more details about [run_arduino_<sketch name>.sh].
6373

6474
## Pin mapping
6575

@@ -100,7 +110,7 @@ There are additional pins for LEDs and buttons.
100110

101111
## Uploading
102112

103-
As mentioned above `run_arduino.sh` file have to be uploaded manually from the PC to the board's Linux file system in order to be executed on the board directly through the board's Linux console. There are many ways to upload the file.
113+
As mentioned above `run_arduino_<sketch name>.sh` file have to be uploaded manually from the PC to the board's Linux file system in order to be executed on the board directly through the board's Linux console. There are many ways to upload the file.
104114

105115
### Over Network
106116

@@ -156,7 +166,7 @@ And then the Device Tree should enable TIM1 for the coprocessor, although this d
156166
[Balena OS]: https://github.com/kbumsik/balena-st-stm32mp
157167
[ST Wiki page on boot mode]: https://wiki.st.com/stm32mpu/wiki/STM32CubeMP1_Package#Getting_started_with_STM32CubeMP1_Package
158168

159-
[run_arduino.sh]: https://github.com/stm32duino/Arduino_Tools/blob/master/linux/run_arduino_gen.sh
169+
[run_arduino_<sketch name>.sh]: https://github.com/stm32duino/Arduino_Tools/blob/master/linux/run_arduino_gen.sh
160170

161171
[The ST Wiki page on C-Kermit]: https://wiki.st.com/stm32mpu/wiki/How_to_transfer_a_file_over_serial_console
162172
[a bug in OpenSTLinux]: https://community.st.com/s/question/0D50X0000B9vHa4/cannot-get-download-a-file-using-kermit

0 commit comments

Comments
 (0)