kvv213 wrote: Sat Jan 18, 2020 7:46 am
@mrburnette
Don't agree with your option, here are my thoughts:
...
At my current development I have to move from AVR platform (two different chips, not ATMEGA328) to STM32 (and here I had to switch to more advanced chip during development).
PS. Sorry for the flame
I expected flames, but that is OK, because I am right; not saying you are totally "wrong" but your viewpoints are myopic. I am retired from a Fortune 10 company. Our IT environment was massive, so our development environment was strict. Most of our software developers had Master Degrees and many had PhD's. In such a world, our hardware platforms were High Availability Virtual Machines with dynamic failover.
Many (if not most) lessons from a Fortune 10 should translate to small companies. First, developers are "told" the tools to be used for a project; which is to say developers are paid to write code, not select development tools. Development tools are selected through an alliance with software companies and (to a degree) with hardware vendors since h/w is selected for specific software workloads.
In your summary, you have mucked Arduino hardware and software and IDE ... actually
Arduino in pure form is Arduino designed hardware, the Arduino core files and the ArduinoIDE. Boards such as the Maple Mini or Blue Pill are
not Arduino hardware or even "clones" of Arduino designed boards ... they are as foreign as Paul Stoffregen's Teensy line of boards.
STM32duino (official) is a set of software that allows STM32 microcontrollers to perform in the Arduino ecosystem and allows many Arduino available 3rd party libraries to be used - some libraries require enhancement to function correctly.
There are no guarantees provided when one deviates from the pure Arduino environment. STM's Arduino cores support most STM manufactured evaluation boards and by kindness a small number of 3rd party boards commonly known as: Maple Mini, Blue Pill, Black Pill, etc. While STM attempts to support the STM32duino core files on the non-STM hardware, it is a best-effort only: no commitment, no guarantee.
1. You can use Arduino not only with Arduino IDE. For example, I use it with PlatfromIO IDE joined with Visual Studio Code.
Yes, but the core-files are unchanged... only the IDE and "build system" are altered.
2. Working with a great number of hardware it is better to use a single framework instead of 10 different. For example, I work with AVR, ESP8266, ESP32, and now STM32.
So you say. Once you depart from Arduino.cc manufactured hardware, are only playing with pseudo-Arduino hardware with software cores mimicking Arduino language commands and functions. Native hardware must be exposed in some manner; such as dropping into a non-Arduino lower level API. Bad practice as you are completely at the mercy of whomever wrote the "closer to the hardware code/driver/enabler."
But, I agree that most Arduino projects like blinking LEDs, temperature sensors, humidity sensors, and so-forth can be easily supported with the ArduinoIDE ...exactly what I stated, non-professional needs should start and stay in ArduinoIDE. Professionals or those aspiring to develop a commercial product should shy away from Arduino (completely.)
3. Arduino in terms of STM32 provides 10 times faster development than, again, for example CMSIS by ARM.
I expect such statements, but it simply is not true unless you are taking some Arduino example code and using that as a starter for your project. Many Arduino users are not programmers (professional sense), rather they are "makers" who can program sufficiently well to incorporate sample code, sensor libraries, and display libraries into a final working project. To all of you reading who take this approach, rejoice since this is why the Arduino ecosystem was created many years ago.
4. All frameworks has errors and limitations. And in such cases you need to dive deeper, for example, from Arduino to HAL, from HAL to CMSIS etc.
No, not all frameworks have errors. Most pseudo-frameworks (wrappers) impose limitations and "makers" may view this as an error; likely it matches the Arduino API and is just restrictive of what the native uC can accomplish.
5. The higher level framework is the better it can be moved to another hardware. Arduino in that case is the best comparing to other options for STM32 (except, MBED).
Arduino is an ecosystem. You talk about moving only the Arduino software functionality - the Arduino API.
6. Arduino code is lighter for development and further supporting. The code is much easy reading and after a year or two after development is finished I don't need to break my brain trying to understand what exactly a concrete piece of code is doing.
This statement is simply incorrect ... if true, we would all be using BASIC.
What should be said is that all IDE's provide mechanisms for including programmer comments and that capability will easily provide for documentation needed in code sections.
In my project folders, I always have a Notes.h page where additional thinking, links, ASCII diagrams can be added. Some environments like Cypress automatically builds the documentation.
My final, thoughts: STM32duino is not Arduino in that it will not provision Arduino.cc official hardware. It is a software wrapper service that hides STM code and creates an API to mimic Arduino sketch capability (syntax) on many evaluation boards that utilize a STM microcontroller. Not all of the uC hardware capabilities may be available to the programmer and some adjustment may be required to 3rd party libraries.
If you "need" to communicate with HAL from your Arduino-sketch, you are in the wrong programming environment.
Ray