rogerclarkmelbourne / Arduino_STM32

Arduino STM32. Hardware files to support STM32 boards, on Arduino IDE 1.8.x including LeafLabs Maple and other generic STM32F103 boards
Other
2.53k stars 1.26k forks source link

[SOLVED] How to program cz ministm32f103zx board with Arduino IDE ? #865

Closed eagl1 closed 2 years ago

eagl1 commented 2 years ago

Hi,

I have this board which is cz ministm32f103zx development board:

image

I have the same board. What should I do to run the board ?

When I connect the board to the 2nd usb port, the red led light up. And when I press the reset button, the two green leds blinks randomly.

It displayed on Arduino IDE but I can't upload a sketch.

It gives this error:

exec: "/bin/arm-none-eabi-g++": file does not exist Error compiling for board Generic STM32F103Z series.

What is the solution ?

It also displayed on the device manager like this:

image

eagl1 commented 2 years ago

I solved the usb port issue:

image

But in Arduino IDE, I get this error:

Arduino: 1.8.15 (Windows 10), Board: "Generic STM32F103Z series, STM32F103ZE, Serial, 72Mhz (Normal), Smallest (default)" exec: "/bin/arm-none-eabi-g++": file does not exist Error compiling for board Generic STM32F103Z series. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

eagl1 commented 2 years ago

OK, I was able to program it with Arduino IDE.

First solve the "pl2303hxa phased out since 2012 please contact your supplier" issue, with updating the driver with this file:

http://www.mediafire.com/file/982x6iyk89v95dp/Prolific_PL2303_driver_v3.3.2.102_%25282008-24-09%2529_Win8_x64_x86.7z/file

With the following setting.

During flashing the MCU with Flash Loader Demonstrator with the appropriate bin file:

  1. Set boot1 to GND.
  2. Power the board and select Next, then the next screen show the size of the flash memory.
  3. Select Next, this page has the flash mapping. Select Next.
  4. In the final page, select Download to device and check "Verify after download" and mount the bin file and select Next and wait until flashing process is done.

In Arduino IDE:

  1. Choose the board type as "Generic STM32F103Z series"
  2. In variant option select "STM32F103ZE"
  3. Upload method, select "Serial"
  4. CPU speed ""72MHz"
  5. Optimized "Smallest"
  6. Select the required COM port
  7. Keep boot1 set to GND
  8. Reset the board
  9. Then program blink example
rogerclarkmelbourne commented 2 years ago

Close as solved

eagl1 commented 2 years ago

I'm really happy I was able to communicate with the board.

I also bought the ST LINK V2, now I can program it with Arduino and the other programming platforms that support this programmer.

rogerclarkmelbourne commented 2 years ago

ST Link is definitely worth buying.

You can also use it with the STM32 Cube so that the ST Link allows in circuit debugging

eagl1 commented 2 years ago

Yep, thanks man for the support. I really like your work in the Arduino_STM32.

I have a question about programming STM32 boards on Arduino vs on the more professional platform; like, STM32 Cube. Is there a difference in performance ?