Hello everyone, im a new user of this board and i wanted to ask you some questions. As a beginner i can't find any tutorial or any basic explanation how to start programming this board. I'm wondering if i can do everything (starting from creating a programm and finishing on programming) in Keil uVision5 or Eclipse. Is this LeafLab IDE only way to upload a program ? Also im using the windows 7 x64, and as i realised it can be a problem. Im following some book that explains basics of programming the STM32103xx microcontrolers on Keil uVision. They also use some STM32 libs. Im a bit lost, can somebody explain how follow this book and program the Maple mini r2 ? Thanks for help
Maple Mini r2 , some beginner questions
(5 posts) (2 voices)-
Posted 2 years ago #
-
krab - "I'm wondering if i can do everything (starting from creating a programm and finishing on programming) in Keil uVision5 or Eclipse. Is this LeafLab IDE only way to upload a program ?"
That is a complex set of questions. Their are lots of ways to program an STM32F. I'll try to break them down.
The STM32F103 on Maple-mini has two types of JTAG interface, a 10pin, 5 signal+5 ground interface, and a two wire 'Serial Wire Debug' (SWD) interface.
If you have a suitable JTAG adapter, then you will be able to program from Keil uVision5, or other proprietary development systems.
Keil sell a JTAG adapter, but IIRC it is quite expensive.I don't use Keil but IIRC, Keil can use ST Micro's (the company who makes the Maples STM32F MCU) ST-Link/V2 JTAG adapter:
http://www.st.com/web/catalog/tools/FM146/CL1984/SC724/SS1677/PF251168#
They are relatively low-cost:
http://www.digikey.com/product-detail/en/ST-LINK%2FV2/497-10484-ND/2214535An even lower cost is one of the many STM32F Discovery boards, which include the SWD part of the ST-Link/V2 on-board, and can be used to load onto any STM32F. Discovery boards are typically under $15, e.g.:
http://www.st.com/web/en/catalog/tools/FM116/SC959/SS1532/PF254044
http://uk.futureelectronics.com/en/CSRichProduct.aspx?ItemNumber=5024426&IM=0&Currency=USD
If you want to choose a different STM32F Discovery board make sure you get one with ST-LINK/V2; it seems to work better than the older ST-LINK.Every STM32F has a manufactured-in bootloader. The STM32F103 on a Maple-mini can only upload over a serial connection. So you need a USB-to-serial adapter, running at 3.3volts. Then you can upload using these instructions:
http://leaflabs.com/docs/bootloader.html#flashing-a-custom-bootloader
While those instructions are for burning in a new bootloader, those instructions work for any correctly built program.
I do not know if keil support that approach to program loading, though it might be possible using a makefile.Lastly, the Maple and Maple-mini have a bootloader written by Leaflabs. This can upload programs over USB, and relies on a command line program, called dfu-util. I don't know if Keil support this (they might as some STM32F's have a manufactured-in DFU-like bootloader), but again, wrapping the upload program in a little makefile might help them connect.
However, if all of that sounded complex, then a reasonable approach might be to get an STM32F Discovery development board, and use that with Keil and the STM32 libs.
(Full disclosure: I am not a member of LeafLabs staff. Nor do I work for ST Micro or Keil :-)
Posted 2 years ago # -
Thanks a lot for your answer gbulmer. I see now where I'm going. I choised the Maple-mini r2 because it's microcontroller is suitable for my purposes. I'm about to build a micro quadcopter as a project. And I wanted to give it a STMF103CBT6 heart. My plan was to firstly create a program that will be able to work with some MPU and wireless connection etc. then finally build a board and finish it. Right now I'm at the beginning of my long way to approach the goal. For now I have working Maple-mini r2 board and a book that i thought will help me. The writer is using STM32F10xxx Standard Peripheral Library and DSP library. As a complete noob in this field I'm wondering if its possible to work with them on LeafLabs IDE. Is my goal even possible to approach with the way i chose? Thanks for your help, I'm so glad that you answered. Thanks
Posted 2 years ago # -
Ok. I have my last question about maple mini ... I'm about to start using ST-Link/V2 JTAG adapter. Can you tell me if the built-in bootloader on my STMF103CBT6 will be a problem?. Do i have to erase it or it will be overwritten ? Thanks for any advise. Thanks
Posted 2 years ago # -
krab - AFAICT you do not plan on using LeafLabs Maple IDE, and instead plan to upload all your programs using ST-LINK/V2 using Keil or Eclipse. Correct?
In that case, it will likely be simpler to link your programs as stand-alone binaries, and over write LeafLabs Maple bootloader.
(Full disclosure: I am not a member of LeafLabs staff.)
Posted 2 years ago #
Reply
You must log in to post.