Hello John N6API,
This is my recent experience using the Arduino IDE to make a binary, then uploading that binary to a 'Blue Pill' with the stlink utilities from
I downloaded and installed the STM32CubeProgrammer software
I installed the STM32 .json URL in the Arduino Preferences
I used the Board Manager to install the STM32 boards
I tried to upload MorseTutor.ino
An error occurred while uploading the sketch
Sketch uses 52228 bytes (79%) of program storage space. Maximum is 65536 bytes.
Global variables use 6412 bytes (31%) of dynamic memory, leaving 14068 bytes for local variables.
An error occurred while uploading the sketch
STM32_Programmer.sh not found.
Please install it or add '<STM32CubeProgrammer path>/bin' to your PATH environment:
https://www.st.com.en.development-tools/stm32cubeprog.html
Aborting!
However, my PATH is updated.
$echo $PATH
/home/me/STM32CubeProgrammer/bin:/usr/local/bin:/usr/bin:/bin
Do not close the Arduino IDE !!!
A binary file was created and put in /tmp/arduino_build123456/MorseTutor.ino.bin
The arduino_build###### file numbers change.
I copied that file to my $HOME directory and renamed it mt.bin
If you close the Arduino IDE before you grab the binary file, it disappears.
I plugged a 'Blue Pill' into the USB port connected to an ST-LINK V2 dongle
I used the stlink utilities to flash the 'Blue Pill'
(the '$' is my command-line prompt)
$ st-info --probe
Found 1 stlink programmers
?serial: 553f6806503f49482649013f
openocd: "\x55\x3f\x68\x06\x50\x3f\x49\x48\x26\x49\x01\x3f"
? flash: 131072 (pagesize: 1024)
?? sram: 20480
?chipid: 0x0410
? descr: F1 Medium-density device
$ st-flash write mt.bin 0x8000000
st-flash 1.5.1-38-gc3577b5
2019-12-21T09:10:24 INFO common.c: Loading device parameters....
2019-12-21T09:10:24 INFO common.c: Device connected is: F1 Medium-density device, id 0x20036410
2019-12-21T09:10:24 INFO common.c: SRAM size: 0x5000 bytes (20 KiB), Flash: 0x10000 bytes (64 KiB) in pages of 1024 bytes
2019-12-21T09:10:24 INFO common.c: Attempting to write 52536 (0xcd38) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x0800cc00 erased
2019-12-21T09:10:27 INFO common.c: Finished erasing 52 pages of 1024 (0x400) bytes
2019-12-21T09:10:27 INFO common.c: Starting Flash write for VL/F0/F3/F1_XL core id
2019-12-21T09:10:27 INFO flash_loader.c: Successfully loaded flash loader in sram
?52/52 pages written
2019-12-21T09:10:31 INFO common.c: Starting verification of write complete
2019-12-21T09:10:32 INFO common.c: Flash written and verified! jolly good!
Jolly Good! I plug the newly programmed Blue Pill into the PCB and away we go.
The screens seem to load slower. Otherwise, it seems to work
So it seems to be possible to do it without having the STM32 tool chain installed?
However, I am not sure why the screens seem to refresh at a much slower rate?
When I use the Morse Tutor binary that Bruce created, the screens refresh properly (much faster).
--
Regards,
Ken, KM4NFQ "Not Fully Qualified"
/g/w8bhMorseTutor