Using newlib with libopencm3 on STM32F103 - linker settings?

@maxgerhardt i’ve posted examples about similar problem in this thread: Why `impure_data` appears on custom build and eats 1K memory? Need fix

  1. Succeeded to patch envs after _bare.py via post script, but lost 1K of RAM.
  2. Problem is that i passed ldscript path via -Wl,T build option. If i set it in post script, as in stm32cube.py, size is ok.

Could you take a look? I’d like to understand 2 things:

  1. Why result depends on method to pass ldsript path? I carefully compared linker command in verbose mode - this option is the only difference.
  2. I don’t like to hardcode path in post-script. Can it be transfered somehow from platform.ini (for example via shell env var)?