jaerentals.blogg.se

Stm32x device protected
Stm32x device protected















Make sure you have installed openocd and arm-none-eabi-gcc.

stm32x device protected stm32x device protected

Now, clone the repository: $ git clone $ cd wemos_motor_shield Note that, this is with the shiled *not* connected to the D1 Mini. Next, connect you ST-Link programmer as follows: Solder two wires to the first two legs of the microcontroller, counting from the top, like this:īe careful to not short them with the legs next to them. Here is how you can flash it to your shield: From what I can tell, the new firmware is compatible with the old one, minus the hanging and crashing, so it should be perfect for a drop-in replacement. Then disconnect all the wires (including the RTS pin), connect the shield to your WeMos D1 Mini, and it should work.ĥ Bugalski has recently re-written the firmware for this motor shield, and published it at. Now, you can unlock your shield: $ stm32flash /dev/ttyUSB0 -kstm32flash 0.5 serial_posix: 57600 8E1Version : 0x31Option 1 : 0x00Option 2 : 0x00Device ID : 0x0444 (STM32F03xx4/6)- RAM : 4KiB (2048b reserved by bootloader)- Flash : 32KiB (size first sector: 4x1024)- Option RAM : 16b- System RAM : 3KiBRead-UnProtecting flashDone.$ stm32flash /dev/ttyUSB0 -ustm32flash 0.5 serial_posix: 57600 8E1Version : 0x31Option 1 : 0x00Option 2 : 0x00Device ID : 0x0444 (STM32F03xx4/6)- RAM : 4KiB (2048b reserved by bootloader)- Flash : 32KiB (size first sector: 4x1024)- Option RAM : 16b- System RAM : 3KiBWrite-unprotecting flashDone.And now you can flash it: $ stm32flash /dev/ttyUSB0 -v -w motor_shield.binstm32flash 0.5 Parser : Raw BINARYInterface serial_posix: 57600 8E1Version : 0x31Option 1 : 0x00Option 2 : 0x00Device ID : 0x0444 (STM32F03xx4/6)- RAM : 4KiB (2048b reserved by bootloader)- Flash : 32KiB (size first sector: 4x1024)- Option RAM : 16b- System RAM : 3KiBWrite to memoryErasing memoryWrote and verified address 0x08000c2c (100.00%) Done. Now, see if you can communicate with the device: $ stm32flash /dev/ttyUSB0stm32flash 0.5 serial_posix: 57600 8E1Version : 0x31Option 1 : 0x00Option 2 : 0x00Device ID : 0x0444 (STM32F03xx4/6)- RAM : 4KiB (2048b reserved by bootloader)- Flash : 32KiB (size first sector: 4x1024)- Option RAM : 16b- System RAM : 3KiB Short the RTS and the 3V pins on the shield together, like this:Īnd the connect the main pins of the shield to your USB2TTL as follows:ģV3 ↔ 3V3 (or VCC or whatever it is called on your USB2TTL)Īnd connect it to your computer. Now, make sure you have stm32flash utility installed. Make sure you have arm-none-eabi-gcc installed, and compile it: $ makearm-none-eabi-gcc -Wall -g -std=c99 -Os -mlittle-endian -mcpu=cortex-m0 -march=armv6-m -mthumb -ffunction-sections -fdata-sections -Wl,-gc-sections -Wl,-Map=motor_shield.map -Iinc src/startup_stm32.s src/main.c src/user_i2c.c src/tb6612.c -o motor_shield.elf -Tstm32f030.ldarm-none-eabi-objcopy -O binary motor_shield.elf motor_shield.binarm-none-eabi-size motor_shield.elf text data bss dec hex filename 2032 1084 1056 4172 104c motor_shield.elf Here is how.įirst, clone the repository: $ git clone $ cd wemos_motor_shield

#Stm32x device protected serial#

Even if your shield is locked, you can unlock and program it with a simple serial adapter.

stm32x device protected

You don't need an ST-Link programmer, and you don't need to solder anything. Turns out that the procedure in the previous log can be greatly simplified.















Stm32x device protected