Skip to content

Commit f9633b4

Browse files
committed
update wiki
1 parent 15aa0f7 commit f9633b4

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed

wiki/Setting-Up-Arduino-Development-for-PicoCalc-keyboard.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,87 @@ DIP switches are on the back of picocalc mainboard
7373
* STM32 MCU based boards 2.10.0
7474
* XPowersLib 0.2.3 (cuu mod)
7575

76+
77+
# Flash pre-compiled firmware
78+
79+
- Put DIP 1 ON
80+
- Connect PicoCalc with USB Type-C cable
81+
- sudo stm32flash -w Bin/PicoCalc_kbd_firmware_v1.1.bin -v -S 0x08000000 /dev/ttyUSB0
82+
- Put DIP 1 OFF
83+
84+
assume we got **/dev/ttyUSB0** as port of PicoCalc
85+
here is the sample correct writing firmware logs from linux:
86+
```
87+
$ sudo stm32flash -w PicoCalc_kbd_firmware_v1.1.bin -v -S 0x08000000 /dev/ttyUSB0
88+
stm32flash 0.7
89+
90+
http://stm32flash.sourceforge.net/
91+
92+
Using Parser : Raw BINARY
93+
Location : 0x8000000
94+
Size : 65536
95+
Interface serial_posix: 57600 8E1
96+
Version : 0x22
97+
Option 1 : 0x00
98+
Option 2 : 0x00
99+
Device ID : 0x0410 (STM32F10xxx Medium-density)
100+
- RAM : Up to 20KiB (512b reserved by bootloader)
101+
- Flash : Up to 128KiB (size first sector: 4x1024)
102+
- Option RAM : 16b
103+
- System RAM : 2KiB
104+
Write to memory
105+
Erasing memory
106+
Wrote and verified address 0x08010000 (100.00%) Done.
107+
108+
```
109+
## STM32CubeProgrammer
110+
On other platform,like windows or Mac
111+
112+
we can use the official tool [STM32CubeProgrammer](https://www.st.com/en/development-tools/stm32cubeprog.html) to do the flashing job
113+
114+
- Put DIP 1 ON
115+
- Connect PicoCalc with USB Type-C cable
116+
- Open STM32CubeProgrammer with right permissions,on linux maybe need sudo,on windows maybe need the Administrator rights
117+
- Press **Connect**
118+
- Open file ,load PicoCalc_kbd_firmware_v1.1.bin
119+
- Press **Download**
120+
- Press Disconnect
121+
- Put DIP 1 OFF
122+
- Power On PicoCalc
123+
124+
here is the sample screenshot:
125+
126+
![dips](https://github.com/clockworkpi/PicoCalc/blob/master/wiki/stm32cube_flash_kbd_firmware.png)
127+
128+
129+
## Extracting firmware
130+
131+
Also if We want extract firmware from keyboard,here is the steps:
132+
133+
- Put DIP 1 ON
134+
- Connect PicoCalc with USB Type-C cable
135+
- sudo stm32flash -r PicoCalc_kbd_firmware_v1.1.bin -S 0x08000000:65536 /dev/ttyUSB0
136+
- Put DIP 1 OFF
137+
138+
here is sample correct extracting logs from linux :
139+
```
140+
$ sudo stm32flash -r PicoCalc_firmware_v1.1.bin -S 0x08000000:65536 /dev/ttyUSB0
141+
stm32flash 0.7
142+
143+
http://stm32flash.sourceforge.net/
144+
145+
Interface serial_posix: 57600 8E1
146+
Version : 0x22
147+
Option 1 : 0x00
148+
Option 2 : 0x00
149+
Device ID : 0x0410 (STM32F10xxx Medium-density)
150+
- RAM : Up to 20KiB (512b reserved by bootloader)
151+
- Flash : Up to 128KiB (size first sector: 4x1024)
152+
- Option RAM : 16b
153+
- System RAM : 2KiB
154+
Memory read
155+
Read address 0x08010000 (100.00%) Done.
156+
```
157+
158+
159+

wiki/stm32cube_flash_kbd_firmware.png

175 KB
Loading

0 commit comments

Comments
 (0)