Before Build: Add sources & Makefile imitation

Hi there,

is there a natural solution to the following:
I want to add source code to the project, which is located “away” from the project folder
I just don’t want to copy them to SRC folder every time
something like:

INI add_modules = 
    folder/ //// execute script for building

I basically did it the hard way (and it works great) … looking for the easy way

Deprecated since version 6.0…

It’s working for now…

Do you mean Build external sources?

but maybe it needs to be improved, if it’s not… i’ll test it soon

extra_scripts = 
    pre:ONLY_FOLDER/ ... looking there

I did something like that
custom_modules = list…

is there an “magic” PIO-API function that loads a python file that contains

( as external script “format” )
I want from a file to load one

env.SConscript ( path, exports=“env” ) ?

1 Like

:slight_smile: :slight_smile: :slight_smile:

I’m too lazy to write a description right now ( later )
Generally works like Make / Makefile … for ALL ARM Microcontrollers

as example - RPI Pico … minimal build :slight_smile:
( above there is also an example of STM32 )

Hi Max,

where it disappeared ( env key ) PLATFORM_MANIFEST ?

Why do you need PLATFORM_MANIFEST? Please use env.PioPlatform(). This is an instance of Platform class where you can get a platform folder via env.PioPlatform().get_dir().

1 Like

Ivan, Thanks
this is exactly what i need
i was getting platform folder from PLATFORM_MANIFEST
but the variable disappeared from Windows 7

and in Windows 10 it is there