- Notifications
You must be signed in to change notification settings - Fork67
[MP1] Add upload tools for MP1: run_arduino_gen.sh and busybox-w32#47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
kbumsik commentedNov 8, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Some typos are fixed and squashed today. The commands remains untouched. |
fpistm commentedNov 10, 2019
I wonder if this should not be fine to avoid duplicate it and put it in a single place. |
kbumsik commentedNov 10, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@fpistm There should be no problem. I just couldn't find the appropriate place in this directory organization. I should've asked you about this. |
fpistm commentedNov 10, 2019
I guess at the root. This would be fine. |
kbumsik commentedNov 11, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
OK, I moved it to root :) Updated platform.txt as well. |
fpistm commentedNov 12, 2019
Thanks this will avoid misalignment across host OS if it is updated. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
fpistm commentedNov 14, 2019
@kbumsik Then it will be more easiest for end user. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
kbumsik commentedNov 14, 2019
|
fpistm commentedNov 14, 2019
Right. Missed that. Good catch 😉 |
kbumsik commentedNov 15, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@fpistm I just tested it but |
fpistm commentedNov 15, 2019
@kbumsik unfortunately no. Using sed it could be removed, if also available in the busybox. |
kbumsik commentedNov 15, 2019
@fpistm sed is included in busybox, but how run in-line script or something for sed in platform.txt? |
fpistm commentedNov 15, 2019
I think in the generate function |
Uh oh!
There was an error while loading.Please reload this page.
In order to make the Arduino firmware works with the coprocessor (Cortex M4) of STM32MP1, I create a new upload tool for the board. There are some motivations to create a new tool:
There is no good way to deal with Engineering mode, the flashing mode that you can use ST-Link, since the firmware disappears in the next boot. A new tool is needed to deal with Production mode. See Engineering mode vs Production mode here:https://wiki.st.com/stm32mpu/wiki/STM32CubeMP1_development_guidelines
There is no way to directly flash the M4 coprocessor using Arduino IDE. The M4 core does not have a flash memory, we can use Engineering Mode to flash through ST-Link but the firmware will disappear right after rebooting to the Distribution mode (aka normal mode). So we need to transfer compiled Arduino firmware binary file to the board and log in to the shell session (either SSH or ST-Link serial) to the MP1 board.
We need to input the IP address, username, and password of the MP1 board to transfer the binary via SSH (SCP or SFTP), however, Arduino IDE does not provide an interactive interface to input the SSH information. So users must upload the binary file manually.
A script file is needed to manage the binary file in the shell session of the MP1 board.
The new
run_arduino_gen.shis a shell script that produces a copy of the script calledrun_arduino.shbut with a Arduino binary self-contained. Sincerun_arduino.shcontains the binary, users doesn't need to transfer a script file and a binary file together but just onerun_arduino.shfile. After transferring the script, users can start/stop/install the Arduino firmware.You can take a look at the README.md below to see how to use it:
https://github.com/kbumsik/Arduino_Core_STM32/tree/stm32mp1/variants/STM32MP157_DK
Also,
run_arduino_gen.shis a script that uses Busybox commands. In order to work it on Windows, we need an executable of busybox compiled for Windows. I copied busybox-w32 fromhttps://frippery.org/busybox/.The scripts for Windows, Mac, and Linux are identical.
This change is