public:flashing_olimex_stm32-h103_using_a_raspberry_pi
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
public:flashing_olimex_stm32-h103_using_a_raspberry_pi [2016/08/17 18:33] – Fufu Fang | public:flashing_olimex_stm32-h103_using_a_raspberry_pi [2018/03/31 00:38] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Flashing Olimex STM32-H103 using a Raspberry Pi ====== | ||
+ | If you want to flash an Olimex STM32-H103, you don't actually need an expensive JTAG cable. The expensive JTAG cable was suggested by GNUK's README [(gnuk_readme)]. Well, I decided to buy a STM32-H103 to store my OpenPGP master key, using GNUK. This is possibly the cheapest option to obtain a OpenPGP smartcard. STM32-H103 is available on Amazon for £14 [([[https:// | ||
+ | **It might be possible to read the STM32-H103' | ||
+ | |||
+ | ===== Pinouts ===== | ||
+ | You need to connect the two devices together following the two diagrams below: | ||
+ | <columns 100% - -> | ||
+ | |||
+ | ==== Raspberry Pi JTAG using GPIO pins==== | ||
+ | {{: | ||
+ | < | ||
+ | |||
+ | ==== STM32-H103 JTAG connector ==== | ||
+ | {{: | ||
+ | Note: nTRST connects to TRST on Raspberry Pi. [([[https:// | ||
+ | </ | ||
+ | |||
+ | ===== Starting OpenOCD ===== | ||
+ | <code bash> | ||
+ | sudo openocd -f interface/ | ||
+ | </ | ||
+ | |||
+ | ===== Flashing STM32-H103 ===== | ||
+ | < | ||
+ | telnet localhost 4444 | ||
+ | reset halt | ||
+ | stm32f1x unlock 0 | ||
+ | reset halt | ||
+ | flash erase_sector 0 0 127 | ||
+ | flash erase_check 0 | ||
+ | flash write_image erase gnuk.elf | ||
+ | verify_image gnuk.elf | ||
+ | stm32f1x lock 0 | ||
+ | reset | ||
+ | shutdown | ||
+ | </ | ||
+ | |||
+ | Note: You need to shutdown OpenOCD before using the GNUK device. | ||
+ | |||
+ | [(gnuk_readme> |
public/flashing_olimex_stm32-h103_using_a_raspberry_pi.txt · Last modified: 2018/03/31 00:38 by 127.0.0.1