Setup of the clock before initializing static variables from flash makes sense in order to speed up. It may be a difference between 4 MHz and 160 MHz clock. Another possible cause of duplicate/redundant setup procedures. Above there was a comment about efficiency of that procedure.
Just started using it [STM32cube IDE] , I don't know if its a bug or a feature but it why does make a main.c file instead of a main.cpp for a C++ project Every time you click "generate code". Is this a bug? If you rename it it will rename it back when you regenerate.
Is there a setting somewhere to change this behaviour?
Making a Makefile is an out-of-the-world thing for me.
For 5 files it's ok, but when you have 20 folders, subfolders... it's a problem.
For sure, I might be missing something, doing it in the wrong, hardest way
A firmware project for something like STM32F4 series device shouldn't contain so many code modules requiring 20 folders each with subfolders... My largest projects that occupy some 100K of flash on H7 series parts have some 20 .c modules total
at least one per peripheral , one per protocol/service, one per type of utility, one per additional ics used, etc. Software design can also be seen as a craft with the last 30 years many good practices.
Yes, my modules sometimes end up slightly too long for comfort (1000 LoC is already too much) but refactoring by splitting on demand is easier than coming up with a massive cathedral of complexity just to see that eventually the abstractions are wrong and spend all time writing interfacing boilerplate. If I split the 20-file project into 40 files nothing fundamentally changes.
Oh a 1000 lines for a module I can still see as ok'ish, but 20x 1000 lines do not end up with 100k ROM code That is what triggered me.
"open Eclipse twice."
Do you mean have two instances of the executable open? That would certainly need two monitors (which I have).
Given that this is possible, what is the intention behind allowing it, and with some screen elements correctly swapping over?
"sometimes the path to the files or the working directory are hardlinked in some project file or helper files."
Yes; this is happening. There is a path "IDE" which appears all over the place and doesn't appear to be configurable. Or maybe it did appear in an early project and "stuck".
This reminds me of many weird "paradigms" from the "publishing software" world, where they try to force you into a particular path. For example under Windows some try to force you to My Pictures, and there is no way to change this as a default.
"The idea is to have related projects in one workspace. For example microcontroller firmware, a PC application and the VHDL code for an FPGA."
That's what I was after. Two 32F4 build projects, but different source files and one linked for 0x08000000 (base) and the other linked for base+32k so different linkfiles.
Not sure if this is the case with the new version of cube but sometimes the path to the files or the working directory are hardlinked in some project file or helper files.
...
Quote from: peter-h on Yesterday at 21:22:03
"open Eclipse twice."
Do you mean have two instances of the executable open? That would certainly need two monitors (which I have).
Yes. Eclipse allows to open it as many times as you want but you need different work spaces (each with their own .project and files / Eclipse specific directories). A workspace is nothing more than a directory where the projects will reside.
Note what Kjelt wrote: any path in the project configuration which points to a project specific file must be relative to the project root and not absolute.
...