2015-01-03 09:57 PM
Hello all. I have designed an electronics board from scratch with an engineer and we have made our first prototype board. We have chosen the STM32F407VGT6 processor.
I have downloaded the STMCubeMX software and I have bought an ST-Link/V2 kit for loading(?) and debugging(?). For my product I will be using GPIO for buttons and LEDs, I2C, RS232 (ascii commands for my system bi-directional), USB (Loading firmware updates?), and Ethernet (TCP control instead of the RS232, loading firmware updates, web-based user configuration, and IOS/IPAD/IPHONE app control). I have done C++, Visual Basic, and some HTML/XML programming but it was a long while back, and currently I am using a visual studio for control-systems programming that is manufacturer specific - so while I am not a beginner to programming.....I am not familiar with ARM processor programming and the best IDE (Integrated Development Environment) that I should use. I prefer a mac....but I am running windows via parallels. What I hope to answer from posting this thread is: -What software besides the STM32CubeMX software do I need to get? -Will I be using the ST-Link/V2 to upload the compiled project? -Will I be able to use the ST-Link/V2 to easily test GPIO (''see'' button presses and light leds) or run instructions for debugging? -Will I be using C++ for my customized programming within the IDE? -Once I get some basic features programmed/installed/debugged, how should I develop my web-based user interface and IOS app? Is this capable within the IDE or will I be looking at another software package for that. -Where can I find some ''straight forward'' instructions or videos that will help me get up to speed with these things. Thank you. #stm32-youtube2015-01-04 07:58 AM
Also after doing more searching and youtube watching it seems that many prefer to use Keil (with STMCubeMX? or instead of STMCubeMX?) what part does this software play in the big picture?
2015-01-07 07:20 AM
Lot of players:
1) ARM core comes from ARM. As you shouldn't use assembler (nor C++: better use C for microcontrollers), C compiler deals with assembler and CPU registers, there is no too much things to do with core. 2) IDE (Intergrated Developing Environment software). There are more of it, but Keil is fine choice. (I actually use Raisonance Ride7 with RLink debugger). You need support sometimes when using the IDE (compiler options: search directories, stack sizing, variable placement, modifying linker scripts, optimization for debug or release etc.) 3) C compiler and linker: when you choose IDE, you got the compiler+linker with it, but it is from another source, so you need to look at e.g. GCC for support. 4) debugger/flash programmer software: it's the same: you got it together with IDE. 5) debugging/flash programming hardware: it depends on IDE. STLink V2 is okay to use with Keil uVision 6) periheral library: as silicon is designed by ST, peripheral support also comes from ST. It is the most time-consuming part of working with MCU programming: peripheral modules are very complex, have hundreds of registers with thousands of bits. You may use the peripherals ''manually'' through registers, but they are so complex, you better use library functions dealing with them. ST is jsut making a big change at peripheral library: you still may use StdPeripheralLib v1.3.0, but the preferred new Hardware Abstraction Layer approach is ''Cube F4 HAL library''. There is a configuration-generator tool called ''CubeMX''. THat helps you choose a MCU model, assign pins to peripherals, and generate C source for module initialization. This tool and HAL library seems to be very fair.. maybe they are a bit rough today. There is no help system for Cube F4 library (yet): you can use Example projects and comments in their source to learn.2015-01-07 07:41 AM
''with MX'': CubeMX generates C source, headers and Keil project file. *.uvproj file may also be opened/imported with other IDE (my Raisonance Ride7 can import/convert Keil project file to its own *.rprj file.)
You may choose any IDE, accessing peripheral module functions you will use ''Cube F4''. Best order of creating a new project from scratch: 1) start CubeMX, define modules needed, setup their parameters 2) generate s/w sources and project file. Also generate pinout list. 3) design schematic and PCB based on pinout list from CubeMX 4) customize CubeMX generated s/w project: add the ''real thing''2015-01-07 07:54 AM
Dear all,
please point some youtube videos for beginner like me, where to start from. i have read some motor control application from st. i think its easy to understand. i have make VFD with microchip dsPIC30F2010. please help me to take a chance. Regard's Masud2015-01-07 09:20 AM
Thank you for replying.
So I think you are suggesting that CubeMX is the way to go first....layout my processor and connection to peripherals then open up in another IDE to finish it. I am a small time guy right now - is there another IDE option that is out there for free? I just got Keil pricing and it might be too much if my product doesn't take off right away.2015-01-07 09:42 AM
More info for beginners - I just got off the phone with Keil tech support and it was helpful.
Step 1 - Use CubeMX to begin with peripherals and processor layout Step 2 - Save project and load into Keil (or another IDE I'm guessing) Step 3 - Use the Editor of the IDE to make programming changes and use the Project Manager of the IDE to organize your modules Step 4 - Compile your project using the IDE Step 5 - setup your IDE to communicate with your DEBUGGER (in my case ST-Link/V2), then LOAD your project to the processor and use the DEBUGGER to troubleshoot. Am I missing anything here? Can the CubeMX software be used as a complete IDE (editing, compiling, loading, debugging)? If not - what software is recommended to do this?2015-01-07 12:11 PM
I found this guy to be very helpful to beginners as well:
http://stm32projectconsulting.blogspot.com/ Good explanation of CMSIS, HAL, IDE, what to download first and a startup program.2015-01-07 04:12 PM
Can the CubeMX software be used as a complete IDE (editing, compiling, loading, debugging)?
Unless I'm mistaken it's none of those things, it's a code generator. It creates a shell and you fill in the blanks. For an IDE, Keil, Rowley, and IAR are all quite serviceable, the choice of often one of personal taste. The integration of debugging on the free solution might be a bit crude.2015-01-07 11:51 PM
The integration of debugging on the free solution might be a bit crude.
And the list of supported debug pods is usually rather short. When evaluating 4 MCUs from different vendors, you might easily end up with 4 different free IDEs/toolchains.