EEVblog Electronics Community Forum
Electronics => Microcontrollers => Topic started by: whatsthegeek on February 10, 2018, 12:05:20 pm
-
Hi, I've been trying to get into ARM microcontrollers for a while and I just found out how great STM32s are !
They're cheap and full of usefull stuff compared to the SAM3x from Atmel/Microchip
The problem is I need an IDE. Do anyone of you know what is the best free IDE for the STM32s ?
Thanks in advance !
-
Hello,
Atollic TrueStudio for STM32 - one of the best IDE with cool debug capabilities. :)
-
I found mbed to be a good way to start, using either the online ide, or mbed-cli. If you want to then export your project to an external ide, I'd go with Visual Studio Code, as it seems easiest to set up the debugging with this rather than any of the Eclipse based solutions. (Unfortunately, export to Atollic is not supported).
-
Just to be fair, you are comparing a modern MCU from ST with an outdated part from Atmel. Atmel MCUs from the same generation have similar set of features and peripherals.
And ST just bought Atolic Studio, so it will be your best bet going forward with ST.
-
Hello,
Atollic TrueStudio for STM32 - one of the best IDE with cool debug capabilities. :)
Haven't look at that puppy yet, but what cool debug support does it have? If you can't poke single bits with correct bit names assigned in the peripheral register viewer, then I'd consider that debug support the same garbage as every free tool, like the AC6 Workbench is.
Also, GCC compiler is troublesome in some cases. Not say that it is not usable, but has it's quirks, that are well polished in those other ones.
I would suggest using the proper tool for ARM: Keil uVision.
-
Hi, I've been trying to get into ARM microcontrollers for a while and I just found out how great STM32s are !
If I where you I'd check NXP's LPC series ARM controllers as well. IMHO these are better than ST's where it comes silicon bugs and to low-level software compatibility across their entire range so if you know how to use one, then you also know how to use the rest. This makes it easier to choose a microcontroller which fits a particular project.
-
If I where you I'd check NXP's LPC series ARM controllers as well. IMHO these are better than ST's where it comes silicon bugs and to low-level software compatibility across their entire range so if you know how to use one, then you also know how to use the rest. This makes it easier to choose a microcontroller which fits a particular project.
Didn't kow about thoe ones ^^ Though, I already chose the STM32F769BIT6 for my project and it seems more apropriate than the LCP series :D
Thanks for all the IDE sugestions, I'll try them all and see which one is better :)
-
I would suggest using the proper tool for ARM: Keil uVision.
+1 for Keil uVision. Free for up to 32KB code size
-
Also, GCC compiler is troublesome in some cases.
How so?
-
Smallest exported mbed project is nearer 64k, so the 32k version of Keil is too limiting, in my experience. Also, export from mbed to uvision fails to produce compilable code, which is inexcusable as they are both ARM products. It does not seem to me that ARM take development tools very seriously. They put terrific effort into their cores, but downstream I'm not so sure.
-
Also, GCC compiler is troublesome in some cases.
How so?
I'd like to know that too. I have not run into problems for the past >10 years of using GCC for ARM.
-
How so?
I'd like to know that too. I have not run into problems for the past >10 years of using GCC for ARM.
Don't worry. This is something IAR and Keil users say because they got ripped off and paid for inferior product :)
-
Don't worry. This is something IAR and Keil users say because they got ripped off and paid for inferior product :)
Well, Reinhard Keil works for ARM itself on the CMSIS 5 project, and they use GCC as part of the validation suite (http://arm-software.github.io/CMSIS_5/General/html/index.html#Validation). Seems like a pretty good endorsement.
-
Yes, and Arm Compiler Version 6 is using Clang as a compiler anyway. They pretty much gave up on trying to catch up with GCC/Clang.
Note, I'm only talking about the compiler, not the library ecosystem and IDE. People may have different preferences there. From proprietary stuff, I personally like IAR more, but again, it is a matter of personal preference.
-
Thanks for reminding me that Truestudio is the popular IDE now.
I had been using System Workbench last year, which based on Google trends has suddenly swapped popularity statistics with Truestudio about a month ago.
-
IMO for the maximum compatibility, I would prefer vanilla Eclipse CDT + GNU MCU Eclipse + GCC Arm embedded. This is a completely unbranded kit, takes a little bit of elbow grease to set up, but after it is done it offers the same high quality debugging experience for all brands of microcontrollers, across all major platforms.
-
Hi, I've been trying to get into ARM microcontrollers for a while and I just found out how great STM32s are !
If I where you I'd check NXP's LPC series ARM controllers as well. IMHO these are better than ST's where it comes silicon bugs and to low-level software compatibility across their entire range so if you know how to use one, then you also know how to use the rest. This makes it easier to choose a microcontroller which fits a particular project.
Both ST and NXP/Freescale are pretty good to start with. The one thing that ST was lacking years a go was a nice free non stripped down IDE. Freescale had them beat in that regard (and not too mention that the API was much better than ST's). The IDE from Freescale was bug not free, but it still was better than what ST had to offer. However, ST bought Atollic and now this is not an issue (previously, you could get Atollic, but you had no debugger).
One thing that ST is doing now is developing there own eco system instead of just relying on MBED, which is sort facing an identity crisis at the moment. Because of that, I have to give the edge to ST for beginners. Yes, I like the NXP/Freescale libraries better, but ST has kind of made everything generic, even down to the hardware. Different lines of different chips have the same or similar pin outs. They even tell you in their manuals how to design your board with upgrading or downgrading across chip lines. In fact, all the nucleo boards of the same line are the same exact board, just with the chip replaced and maybe one or two resistors. The cubemx software is not bad (last I tried, the Freescale version that was integrated in the IDE did not work well, but this was 3 years ago). The other added bonus is the cheap JTAG that you can buy from ST. Also, when it comes to me having to outsource work, it seems that more people come forward when it is the ST platform. With Freescale/NXP, I really had to go digging to find someone.
In therms of silicon bugs, not sure I agree with that, but I have only used these micros for 5 years, so I am still kind of immature with them. However, as I mentioned, the API Freescale was much more accessible. Without using the any code generation programs, it took me about 10 minutes to figure out how to blink an LED. It took me an hour to do the same task (without cubemx) with ST.
In the end, the best thing to do would be to acquire a board from each and see how long it takes you to do a simple task on each (like blink and LED). Which ever one you like better and find easier is what you should use. At the end of the day, you are gonna be forced to use what your job tells you to use (unless you are the one that gets to pick). The much more important thing is to learn how to read the tech sheet and APIs. The whole use the most generic IDE thing does not really matter because both of those IDEs are just eclipse anyways and most hardcore firmware jobs use IDEs that cost money.
-
How so?
I'd like to know that too. I have not run into problems for the past >10 years of using GCC for ARM.
Don't worry. This is something IAR and Keil users say because they got ripped off and paid for inferior product :)
Yeah, my previous job did everything in Linux. GCC with ARM worked fine. In fact, in't that what all the open source IDEs use anyways?
-
Hi, I've been trying to get into ARM microcontrollers for a while and I just found out how great STM32s are !
They're cheap and full of usefull stuff compared to the SAM3x from Atmel/Microchip
The problem is I need an IDE. Do anyone of you know what is the best free IDE for the STM32s ?
Thanks in advance !
STM32 are not great they are cumbersome and aggravating! Embits and Atollic for now, later dunno...
-
Given all the praise for Atollic I thought I would try it (Atollic 9.0.0 for STM32, that is).
Installed it, started off making a new C/C++ project, and BAM! before I could do anything, it crashed with an Internal Error.
Not impressed.
-
STM32 are not great they are cumbersome and aggravating!
Uh, maybe you're doing it wrong? :P :-//
-
STM32 are not great they are cumbersome and aggravating!
Uh, maybe you're doing it wrong? :P :-//
Like using HAL and trying to understand 4000 pages of Frenchofilated egglish? :horse:
Oh i forgot the programming manual from ARM to , so thats like 5000pages!
-
Like using HAL and trying to understand 4000 pages of Frenchofilated egglish? :horse:
Oh i forgot the programming manual from ARM to , so thats like 5000pages!
Do you have an example of MCU that is as powerful, but comes with shorter manuals?
-
Like using HAL and trying to understand 4000 pages of Frenchofilated egglish? :horse:
Oh i forgot the programming manual from ARM to , so thats like 5000pages!
Do you have an example of MCU that is as powerful, but comes with shorter manuals?
If you skip HAL/CubeMX you have 2k pages of manuals to read for one STM32. CubeMX/HAL/LL is another 2k pages and code bloat there is real.
-
MBED, which is sort facing an identity crisis at the moment.
What is the crisis you refer to? I noticed they are trying to position more towards IoT/cloud type stuff, but I haven't been following it too closely.
-
Hi, I use a custom portable environment based on Eclipse, ARM-GCC and OpenOCD. As it is portable, I can move it from one computer to other.
I also use MBED as it is very easy to use although the cloud compiler lacks debug capabilities.
For ST32 MCUs, a 32k code limit is nonsense. That's why I created my own environment instead of using Atollic some time ago.
Now, Atollic has no code limit so it will be much more interesting.
On a side note, a 32 bit application can strongly benefit from a RTOS. It is included in MBED, but you can also use one free RTOS. In my case I use chibiOS/RT (open source license):
http://www.chibios.org/dokuwiki/doku.php (http://www.chibios.org/dokuwiki/doku.php)
As a bonus they provide ChibiStudio: a complete toolchain for the supported MCUs that include most ST32 ones. I don't use it because I was not available, years ago, when I started with ST32.
-
Both ST and NXP/Freescale are pretty good to start with. The one thing that ST was lacking years a go was a nice free non stripped down IDE. Freescale had them beat in that regard (and not too mention that the API was much better than ST's). The IDE from Freescale was bug not free, but it still was better than what ST had to offer. However, ST bought Atollic and now this is not an issue (previously, you could get Atollic, but you had no debugger).
I don't understand this. I used Atollic a long time ago before they crippled it with code size limit, (Now it is no code limit again although too late for me) and it always had debugging capabilities. At least, using ST MCUs with STLink.
In fact, when I set-up my own ARM toolchain I used the Atollic debugger to communicate to GDB. Some time later they locked their debugger and I switched to OpenOCD.
-
Both ST and NXP/Freescale are pretty good to start with. The one thing that ST was lacking years a go was a nice free non stripped down IDE. Freescale had them beat in that regard (and not too mention that the API was much better than ST's). The IDE from Freescale was bug not free, but it still was better than what ST had to offer. However, ST bought Atollic and now this is not an issue (previously, you could get Atollic, but you had no debugger).
I don't understand this. I used Atollic a long time ago before they crippled it with code size limit, (Now it is no code limit again although too late for me) and it always had debugging capabilities. At least, using ST MCUs with STLink.
In fact, when I set-up my own ARM toolchain I used the Atollic debugger to communicate to GDB. Some time later they locked their debugger and I switched to OpenOCD.
Hmmmm...There was some limitation on Atollic that prompted us to switch entirely to just do it on Linux. That was a few years ago, so details are a little lost.
-
The free version of Atollic has always had standard debug features (program stepping, breakpoints, memory inspection, etc), but more advanced features, mainly aimed at applications using an RTOS, had only been available in the premium version prior to the ST acquisition.
-
Have not worked with it yet (intend to) but have you seen platform io?
https://platformio.org/
May not be suitable for the pro's, but looks very interesting for the hobbyists...
-
Have not worked with it yet (intend to) but have you seen platform io?
https://platformio.org/
May not be suitable for the pro's, but looks very interesting for the hobbyists...
I just stopped here: https://platformio.org/pricing
Paid debugger? No thanks.
Subscription based pricing? No, and GTFO.
I know, I usually suggest a paid product (hence not relevant in this thread), but once I paid, I'm done!
-
Oops, I totally missed that... :o
-
I have a question. Can I program this: https://www.ebay.com/itm/STM32F103C8T6-ARM-STM32-Minimum-System-Development-Board-Module-For-Arduino/311156408508?epid=532038167&hash=item48725e00bc:g:onsAAOSwETJaNPe2 (https://www.ebay.com/itm/STM32F103C8T6-ARM-STM32-Minimum-System-Development-Board-Module-For-Arduino/311156408508?epid=532038167&hash=item48725e00bc:g:onsAAOSwETJaNPe2), with Atollic True Studio?
Has someone tried? Is debugging working?
Thanks. :)
-
Has someone tried? Is debugging working?
It will not work. This board does not have a debugger, it will only work with Arduino IDE and its bootlaoder.
-
Has someone tried? Is debugging working?
It will not work. This board does not have a debugger, it will only work with Arduino IDE and its bootlaoder.
As ataradov says, to program it you'll need an external debugger such as an ST-Link (e.g. the one in Nucleo boards) or a J-Link or a Blackmagic probe.
A small correction, though: the Blue Pill does not come with the Arduino (or stmduino) bootloader, but with the default ST one (http://www.st.com/content/ccc/resource/technical/document/application_note/b9/9b/16/3a/12/1e/40/0c/CD00167594.pdf/files/CD00167594.pdf/jcr:content/translations/en.CD00167594.pdf).
To flash the Arduino one, or any other of your choice, you'll need an USB to serial adapter, and this ST utility (http://www.st.com/en/development-tools/flasher-stm32.html), there are detailed instructions here (http://wiki.stm32duino.com/index.php?title=Burning_the_bootloader).
Personally, I prefer to use an external debugger, either ST-Link or BMP, given the additional debugging facilities.
-
Just search "ST-Link V2" on eB** and you will find what you need to program & debug the cheap STM32 boards.
Drivers are included in Atollic TrueStudio bundle.
Michel.
-
I had the same question as the OP.
Than I found out that Atollic was bought by ST just recently. I spoke to a guy from atollic about it on Embedded World. He was surprised about it as well when he suddenly became a ST empoyee. Anyway with this change TrueStudio V9 is now provided to you for free, without any limitations.
He also told me that in the future it will be merged with AC6, to give the best of these two worlds in one packet.
For me that makes TrueStudio the best free option, as it is maintained by ST themselves.
If you don't like eclipse, maybe embitz?
And it's even possible to use the Arduino IDE, but that certainly is not the best.
-
I have a question. Can I program this: https://www.ebay.com/itm/STM32F103C8T6-ARM-STM32-Minimum-System-Development-Board-Module-For-Arduino/311156408508?epid=532038167&hash=item48725e00bc:g:onsAAOSwETJaNPe2 (https://www.ebay.com/itm/STM32F103C8T6-ARM-STM32-Minimum-System-Development-Board-Module-For-Arduino/311156408508?epid=532038167&hash=item48725e00bc:g:onsAAOSwETJaNPe2), with Atollic True Studio?
Has someone tried? Is debugging working?
Thanks. :)
1) you can write and compile the code with Atollic
2) For debugging, you need st-link debugging adapter to connect the SWD pins of the uc to the computer. Official one is 21€ at digikey, chinese clones are available cheaper but at that price, there is no point of taking risks.
3) It is possible to program the f105 using the internal bootloader and usart (you need usb-ttl serial adapter), but this is for programming only and does not provide any debugging facilities (you can just print to the same usart in your code). For that, read the AN2606 and use any serial adapter to connect the required usart to your computer, set the boot0 and boot1 straps and use the st provided software or free stm32flash to program the compiled binary.
-
My 2 cents:
- AC6 (Eclipse) / CubeMx
- bought this book : https://www.carminenoviello.com/mastering-stm32/ (https://www.carminenoviello.com/mastering-stm32/) , 870 pages instead of 5k
- Nucleo board with display shield
-
My 2 cents:
- AC6 (Eclipse) / CubeMx
- bought this book : https://www.carminenoviello.com/mastering-stm32/ (https://www.carminenoviello.com/mastering-stm32/) , 870 pages instead of 5k
- Nucleo board with display shield
I bought the book too. It's a pretty good introduction to the stm32 family. And if you're intent on putting together an eclipse based IDE yourself, it'll get you there. However, I found a number of errors, some that will leave you dead in the water 'till you resolve them.
But, now that you can get the full up, no restrictions, Atollic IDE, why bother doing it yourself? There's no reason to pull your hair out trying to put together an Eclipse based IDE on your own, Atollic's IDE is Eclipse based, easy to install, and pretty seamlessly integrated with the debugger and various other tools. I particularly like the ability to output very low overhead printf based debug output to a window using something called instrumentation trace macro cell (ITM).
Way easier to set up and get going than putting it all together yourself.
-
There is a need to build one yourself. If you don't wan't to use the buggy gcc version 6.3
-
I bought the book too. It's a pretty good introduction to the stm32 family. And if you're intent on putting together an eclipse based IDE yourself, it'll get you there. However, I found a number of errors, some that will leave you dead in the water 'till you resolve them.
[/quote]
Hi,
Did you mention the errors you found somewhere on a forum? I'm interested. I've problem to make working a software interfacing a Nucleo board with a GPSDO using UART.
Thanks
Denis
-
I did some development with Blackmagic Probe, 1bitsy and libopencm3. VS Code was used as the ide. The 1bitsy is a nice GCC setup for STM32F415
Sent from my iPhone using Tapatalk Pro
-
Hi,
Did you mention the errors you found somewhere on a forum? I'm interested. I've problem to make working a software interfacing a Nucleo board with a GPSDO using UART.
Thanks
Denis
There were a number of issues. here's a post I made about them on the book's website/forum.:
Thank you, thank you, thank you! I've been pulling my hair out for a week now trying to get a Nucleo-F767ZI up and running on a Windows 7 machine. Almost every attempt at a compile resulted in a slew of errors. Primarily indicating that numerous variables, macros, or functions could not be resolved. This despite the fact that all the relevant .h files were where they needed to be. Confusingly, sometimes a program would actually compile successfully.
****************** Here was the problem, as you pointed out. *******************
On page 103 the toolchain path should end in
“/gcc-arm/bin” right now it ends just with “/gcc-arm” couldn’t figure out why my project wasn’t compiling for about a week.
****************************************************************************
Making this change, appending /bin, for both the compiler and the build paths fixed it! On the toolbar select, Window/Preferences/MCU then select and set, in turn, the following settings with /bin at the end:
Global ARM Toolchains Paths
Global Build Tools Path
Global OpenOCD Path
I don't know how I would have figured this out on my own. If the compiler needs to know the path down to the /bin level how does it funtion at all without this information? Attempts to compile a project should just fail completely, not partially compile. Either the compiler is found or it's not, how does it just sort of work? An incorrect path to the compiler is not something I would have guessed caused the problems outlined above.
Some observations. The latest edition of the book I have indicated that Liviu Ionescu had not implemented project templates for the STM32f7xx families. In fact, the current GNU ARM Eclipse release does have the templates. There are issues, though. Liviu Ionescu includes a file _initialize_hardware.c which runs at startup and does a lot of the required hardware initialization. Following, the instructions in the book (page 132) that has you delete 5 files and then replace them with CubeMX generated files. However, the CubeMX generated main.c file contains much of the hardware initialization that's already in the _initialize_hardware.c file. Since that file is not one of the deleted files the compiler will throw a lot of errorrs due to multiple definitions. Either delete the _initialize_hardware.c file or remove the offending initialization stuff from the CubeMX generated main.c file.
In the /openocd/scripts/target directory there are .cfg files for the processor family you're using. In my case, the required stm32f7.cfg file is there. However, the /openocd/scripts/board directory is missing the companion st_nucleo_f7.cfg file which references the stm32f7.cfg target file. You can fix it by renaming the st_nucleo_f4.cfg file to st_nucleo_f7.cfg after you edit it so that this line: source [find target/stm32f4x.cfg] reads source [find target/stm32f7x.cfg].
HAL: Before getting this all fixed, I spent a lot of time tracking down various declarations back to their origins, trying to find out why stuff was not being resolved. I came to realize HAL is a labyrinthian maze of indirection! Some of this stuff is five or more levels deep just to find out the value is 0 or 1. I can't imagine ever getting a gut level feel for the processor if I make extensive use of HAL. I can see using it for initialization of a lot of stuff, but I'd really like a lower level interface to the hardware.
-
I have a question. Can I program this: https://www.ebay.com/itm/STM32F103C8T6-ARM-STM32-Minimum-System-Development-Board-Module-For-Arduino/311156408508?epid=532038167&hash=item48725e00bc:g:onsAAOSwETJaNPe2 (https://www.ebay.com/itm/STM32F103C8T6-ARM-STM32-Minimum-System-Development-Board-Module-For-Arduino/311156408508?epid=532038167&hash=item48725e00bc:g:onsAAOSwETJaNPe2), with Atollic True Studio?
Has someone tried? Is debugging working?
Thanks. :)
NUCLEO-F411RE is ~$14 at digikey and that is an st-link and an STM32F411 with arduino pinout
1) you can write and compile the code with Atollic
2) For debugging, you need st-link debugging adapter to connect the SWD pins of the uc to the computer. Official one is 21€ at digikey, chinese clones are available cheaper but at that price, there is no point of taking risks.
3) It is possible to program the f105 using the internal bootloader and usart (you need usb-ttl serial adapter), but this is for programming only and does not provide any debugging facilities (you can just print to the same usart in your code). For that, read the AN2606 and use any serial adapter to connect the required usart to your computer, set the boot0 and boot1 straps and use the st provided software or free stm32flash to program the compiled binary.
-
@ GDK_ATL
Fortunatelly I installed AC6 (SW4STM32) instead of following the book's toolchain installation. So far no such problems.
Nevertheless, it is very difficult to debug a program with IOs, as debugging introduce errors and bad timings you don't have in run mode.
I also noticed plenty of errors in step mode, where the debugger jumps incorrectly to portions of code.
-
@ GDK_ATL
Fortunatelly I installed AC6 (SW4STM32) instead of following the book's toolchain installation. So far no such problems.
Nevertheless, it is very difficult to debug a program with IOs, as debugging introduce errors and bad timings you don't have in run mode.
I also noticed plenty of errors in step mode, where the debugger jumps incorrectly to portions of code.
"errors" or the known side effect of trying to step through C code with optimization turned on?
-
Speaking of Nucleo boards, there is a firmware update tool available from Segger that turns the onboard ST-Link into a J-Link OB. AFAIK J-Link have better GDB support if you use open source tool chains.
-
Speaking of Nucleo boards, there is a firmware update tool available from Segger that turns the onboard ST-Link into a J-Link OB. AFAIK J-Link have better GDB support if you use open source tool chains.
Isn't it supposed to have some annoying nag window that pops up every time you use the debugger, though?
-
Speaking of Nucleo boards, there is a firmware update tool available from Segger that turns the onboard ST-Link into a J-Link OB. AFAIK J-Link have better GDB support if you use open source tool chains.
Isn't it supposed to have some annoying nag window that pops up every time you use the debugger, though?
I have never seen any nag windows so far. Maybe it is because I am using the UNIX version under macOS that lacked various windows.
-
I've been using the Eclipse package aimed at C/C++ Developers with minimal pain and suffering. If you are interested in a book to help you install and manage the toolchain I really liked Mastering STM32 on learnpub: https://leanpub.com/mastering-stm32 (https://leanpub.com/mastering-stm32). The author calls the version of the book 0.25 so it's a bit rough arouditing goes.
-
did you read previous posts? 8)
-
a bit rough arouditing goes.
'arouditing' :o
-
I was amazed to see how easy is to set up Visual Studio Code for Linux as an IDE for STM32, using also the Cortex Debugger extension. After proper setup, all you need is to generate Makefile projects with STM32CubeMX and Low Level driver. You can install also the Arduino extension from Microsoft (requires Arduino IDE 1.8.x to be already installed on your home folder) from which you can use the serial console or for rapid prototyping. I tried Atollic and it works well for me in Linux Fedora and that means also debugging but now I prefer the VScode solution.
https://community.st.com/thread/48130-visual-studio-code-with-cortex-debugger-package
BTW. no "platformio" infestation.
-
I was amazed to see how easy is to set up Visual Studio Code for Linux as an IDE for STM32, using also the Cortex Debugger extension. After proper setup, all you need is to generate Makefile projects with STM32CubeMX and Low Level driver. You can install also the Arduino extension from Microsoft (requires Arduino IDE 1.8.x to be already installed on your home folder) from which you can use the serial console or for rapid prototyping. I tried Atollic and it works well for me in Linux Fedora and that means also debugging but now I prefer the VScode solution.
https://community.st.com/thread/48130-visual-studio-code-with-cortex-debugger-package
BTW. no "platformio" infestation.
Can VSCode work without Cube involvement?
-
Can VSCode work without Cube involvement?
Yes, definitely, but you must rely on Makefile, no matter which code you have.
-
Can VSCode work without Cube involvement?
Yes, definitely, but you must rely on Makefile, no matter which code you have.
How does debugging work then? Can I step into the code, peek into peripheral registers, or even manipulate memory on the fly?
-
Step into the code, breakpoints, see the registers, don't know about manipulating memory on the fly, but the Cortex-Debug extension is on the github, https://github.com/Marus/cortex-debug , read the readme from there.
-
Have you heard about Sloeber?
http://eclipse.baeyens.it/ (http://eclipse.baeyens.it/)
This is an IDE eclipse based. I downloaded the stm32duino libraries package and it worked for my stm32f103c8 bluepill named board.
What I like about Sloeber Eclipse IDE is that it is arduino C++ oriented, meaning easy to implement codes and then you can use print() and read() arduino commands plus the serial monitor to communicate right out of the box!
(Do not need as well stlinkV2 since after downloading the arduino specific bootloader it allows to directly communicate via on board USB device..)
I'm not sure if Truestudio allow all that options or maybe it has changed but not for free!
The only drawback of sloeber is that the debbuger is not really already working.
What do you think of it vs atollic?
-
As an Arduino IDE, the Visual Studio Code is great. TrueStudio now is a dedicated IDE to STM32 development, with truly professional tools. It it will continue to be developed by ST.M. so it will be the one to recommend.
-
As an Arduino IDE, the Visual Studio Code is great. TrueStudio now is a dedicated IDE to STM32 development, with truly professional tools. It it will continue to be developed by ST.M. so it will be the one to recommend.
Yes VS is not totallt free to be able to use the full package. Neither Truestudio if you want to be able to use the serial monitor or it has changed now.
Envoyé de mon LG-H850 en utilisant Tapatalk
-
1. When I say Visual Studio Code (which can be used with Arduino extension and that include also a serial terminal), I don't say Visual Studio IDE. The first is free, cross platform and with no limits, the second is commercial and Windows only - do your research.
2. TrueStudio today is completely free, full featured (including all the professional features), no restrictions - again, do your research.
-
bump.
I'm in the same boat now. I have the Mastering STM32 Toolchain up and running, but I'm not super happy with the STM32CubeMX workflow since I'm going to have to regenerate the Cube code while I work out configuration issues and all that copying isn't very friendly.
This toolchain is essentially outlined here: https://www.eevblog.com/forum/microcontrollers/what-do-you-think-of-this-stm32-toolchain-10-software-installations/ (https://www.eevblog.com/forum/microcontrollers/what-do-you-think-of-this-stm32-toolchain-10-software-installations/)
Full Toolchain setup in sample pdf for the book: http://samples.leanpub.com/mastering-stm32-sample.pdf (http://samples.leanpub.com/mastering-stm32-sample.pdf)
Any disadvantages to the ST owned TrueStudio vs the pieced together MasteringSTM32 toolchain?
-
Just a quick update...
I've been running the now ST Owned Atollic TrueStudio since that last post. Very happy with this toolchain and it's integration to STM32CubeMX and debugging setup. This is WAY more straightforward than the thing in "Mastering STM32". The whole idea of needing a custom python script to translate between STM32CubeMX and Eclipse is a little insane.
While Mastering STM32 is still a really good reference for everything else, anyone picking it up now should just skip all that stuff about setting up your toolchain from scratch and just run TrueStudio.
-
While Mastering STM32 is still a really good reference for everything else, anyone picking it up now should just skip all that stuff about setting up your toolchain from scratch and just run TrueStudio.
Mastering STM32 is NOT good for mastering STM32. It's good for mastering the HAL.
I tried to set up Eclipse and the toolchain following the steps in the book and I was not able to get it working.
Then I downloaded and installed System Workbench and everything worked out of the box.
I used one of the Nucleo devkits to learn to master the STM32.
I use CubeMX to help me to setup the clocks and pinmux etc. but I never use the code produced by it.
I don't use and I don't link the HAL. It's a bit harder in the beginning but then you really learn how to program the STM32.
I wrote my own libs for serial port, I2C, SPI. I use interrupts, DMA and the ADC. I believe it's the only way to write lean and efficient code.
I never use the debugger. If something doesn't work as expected, I print messages/values to a serial port or I manipulate a gpio pin to track interrupt service routines.
-
Also, GCC compiler is troublesome in some cases.
How so?
I'd like to know that too. I have not run into problems for the past >10 years of using GCC for ARM.
Same here. GCC for ARM been working good for about 10 years for me as well. In the beginning, I used crosstool-ng to fetch/compile the environment, but these days the launchpad version, that appears to have been recently taken over by ARM works great (it has worked great for some years now). Just need that, a linker script, Makefile, and Vi. GCC served me well for Stellaris, NXP (back when they had downloadable peripheral libraries), and STM32.
Up until recently, I just used the "legacy" stm32 libraries for the stm32 M4 parts. Just started using CubeMX to get things configured/initialized since I am switching to M7 cores. I had troubles on my first try with the CubeMx/F7 series, but H7 seems to be going very smooth (and very fast!) other than some issues I'm having with HAL / spi drivers. (could only get the interrupt driven functions to work).
-
I'm surprised nobody mentioned Rowley Crossworks
https://www.rowley.co.uk/arm/index.htm (https://www.rowley.co.uk/arm/index.htm)
The license for non-comercial use is just 150$ and it has support for a lot of ARM processors and boards.
The compiler is GCC or LLVM based and the IDE is very fast and responsive (written in C++).
I particularly like the debugging interface and all the supported targets: St-Link/V2, Segger J-Link etc.
It also includes an ARM simulator.
-
Segger Embedded Studio
-
Choosing an IDE can be a pretty personal choice if you're picky.
I think CubeMx can spit out makefiles for projects, and then you're free to use any IDE you happen to fancy.
I have been using Qt Creator with a makefile as IDE for my AVR uC projects for some time as it seems to have the right balance between funcionality and complexity for me.
You can also have a look at Platformio.
In it's basic form it is a collection of python scripts based around scons, but you can also install it with a full IDE. A year or so ago they used Atom as IDE, and that seems to be a quite capable IDE, but it seems they have switched to another lately. I was still content with Qt Creator, so I only fiddled a bit with the command line scripts of Platformio.
Platformio does have an enourmous amount of options. You can configure projects from Arduino, to Mbed, CMSIS, and a bunch of other frameworks, and it makes the setup of an unfamiliar uC architecture pretty trivial. It can grab complete tool chains from the 'net and install them on your PC. It also has a search engine for browsing and installing thousands of software libraries and this makes it fast to find and try out support code for a lot of supported chips.
For example, a command like:
:~$ platformio lib search max7219
spits out a list of 13 different libraries.
-
I am not sure why anyone would use anything other than Attolic or Workbench for STM32 stuff when starting out. Even CubeMX is pleading a case to all the haters. Gone are the days of having to pay for a toolchain. It is all vendor provided now. Where I work, we have used cubeMX as our starter, and then you do whatever you'd like. The strict software team likes Linux and command line, the EE side likes the Attolic or Workbench. And, if planned correctly, it all works when it is eventually brought together (well...most of the time).
That mastering STM32 is alright, but it was made at a time when STM32 was just like every other vendor in that the tool chain situation was a mess unless you paid for it (remember coocox?). At that time, Freescale was on to something (that free IDE at the time was pretty good, but their code generation was pretty bad), but NXP bought them and ST just went forward. ST's LL library is actually pretty nice and you can mix and match with the HAL, even when you use cubeMX. The only thing ST needs to work on is their demo code. Their demo code is trash.
-
Also, GCC compiler is troublesome in some cases.
How so?
I'd like to know that too. I have not run into problems for the past >10 years of using GCC for ARM.
Same here. GCC for ARM been working good for about 10 years for me as well. In the beginning, I used crosstool-ng to fetch/compile the environment, but these days the launchpad version, that appears to have been recently taken over by ARM works great (it has worked great for some years now). Just need that, a linker script, Makefile, and Vi. GCC served me well for Stellaris, NXP (back when they had downloadable peripheral libraries), and STM32.
Up until recently, I just used the "legacy" stm32 libraries for the stm32 M4 parts. Just started using CubeMX to get things configured/initialized since I am switching to M7 cores. I had troubles on my first try with the CubeMx/F7 series, but H7 seems to be going very smooth (and very fast!) other than some issues I'm having with HAL / spi drivers. (could only get the interrupt driven functions to work).
FYI...I have the same issue with the SPI drivers.
-
FYI...I have the same issue with the SPI drivers.
I'm assembling a new board today. Would like to hear if you get it figured out. I'll post if I figure out something. It has been low priority for me so far, since the interrupt functions are working ok.
-
Has someone tried? Is debugging working?
It will not work. This board does not have a debugger, it will only work with Arduino IDE and its bootlaoder.
that's not true, I'm using it with STLINKv2 from aliexpress, both cost for about 1.5 USD.
You can debug program inside chip through SWD interface with no problem.
If your program printf a bunch of text, it will be very slow, because SWD speed is slow.
But for usual debugging purposes it is fast enough.
-
FYI...I have the same issue with the SPI drivers.
I'm assembling a new board today. Would like to hear if you get it figured out. I'll post if I figure out something. It has been low priority for me so far, since the interrupt functions are working ok.
Same here. Low priority.
Is the problem only when you are transferring more that 8 bits? I think someone found a work around. You have to just transfer the 8 bits one call at a time.
-
well, after a few weeks trying to work with Atollic TrueStudio, what can i say, other than "gosh, this is easily some of the worst,least intuitive, hardest to actually use, software i've ever had the misfortune to use"....!
Seriously, could they even manage to design in any more menus within menus, tiny buttons with hieroglyphic images, , more different views, and no obvious workflow at all!
How does anyone use this crap??
-
well, after a few weeks trying to work with Atollic TrueStudio, what can i say, other than "gosh, this is easily some of the worst,least intuitive, hardest to actually use, software i've ever had the misfortune to use"....!
Seriously, could they even manage to design in any more menus within menus, tiny buttons with hieroglyphic images, , more different views, and no obvious workflow at all!
How does anyone use this crap??
In other words, you do not like eclipse?
-
And they paid 9 million dollars for those Eclipse plug-ins that together makes TrueStudio...
Visual Studio Code is open source, under MIT license. There was already a Cortex-Debug extension, also under MIT license. Together are working better than TrueStudio. Also, there is an Arduino extension that would have made MBED completely unnecessary. There are also extensions that offer colored syntax (apart from regular C/C++ language) for XML, Makefile, .ld and .s files. With excellent auto completion tools and the entire IDE is theme-able, not like Eclipse that has problems even there (especially with dark themes). All in one IDE. All free and fork-able. Cross-platform. And generating projects for VSCode is extremely easy (because even I can do it),
Laughable and extremely expensive decisions! But keep going, ST, and be proud!