I'm not sure I would use GNU <anything> for a commercial project. The licensing would make my head explode. Instead, I would use the chip manufacturer's toolchain and let them deal with licensing.
The world of licensing is strange and complicated, both for FOSS and proprietary SW.
GNU software is used routinely to develop commercial, closed source, application, as you probably experience every day all around you (I think nowadays more than half of our SW is compiled by gcc).
One needs to tread carefully, though.
The GNU compiler tools ('gcc') bring a specific exception to the GPL V3, to allow for distribution of "System libraries" (e.g. libgcc) without the need to convey the source to the recipient of the SW.
This does not give a blanket permission for the linked libraries, which need to be evaluated, e.g., for a hosted application: libc is LGPL V2, so you are fine with dynamic linking, but not with static linking (this is a bit of a simplification).
In the embedded world, there's the fattish newlib and its slimmer sibling newlib-nano, distributed under permissive licenses (dynamic linking is not really a thing for embedded).
If you trust the chip vendor for licensing your SW and don't read the fine print, you might have some 'interesting' surprise.
Would you be able to quickly point out, as an example, if you have the right to distribute SW built with NXP Redlib?
This is an easy one - there's an explicit clause - yes.
Can you distribute, with an Open Source license, some SW that includes the ST HAL or code generated by CubeMx?
The answer is a clear 'maybe': for sure, I would not dare make it GPL, reading their "Ultimate Liberty license SLA0044" (though I see many examples of such on the web...).
Probably, using and distributing it with a non-viral, non copyleft license is fine (e.g. MIT/BSD - maybe Apache, but I would need to study).