Command line arguments for a target

is it possible to append a custom argument to a target?

I would like to do following

pio -t inject 0x05 (here I would like to inject some unique id into firmware file, in this case 0x05)

and then doing following in a script

def injection_callback(*args, **kwargs):
    #do id injection

    name = "inject", 

how to do this?
I know that native mode has this feature because you would like to pass arguments to a RUNNING application. In my case the app is not running, but the firmware or whatever else being changed at target invocation time.

Thank you!

1 Like