knurling-rs / flip-link

Adds zero-cost stack overflow protection to your embedded programs
Apache License 2.0
271 stars 6 forks source link

Improve cli argument parsing #31

Open Urhengulas opened 3 years ago

Urhengulas commented 3 years ago

Currently we have various limitations of how to specify cli arguments. An out-of-the-box solution like clap¹ would be helpful. One limitation example is that it's only possible to pass the linker script as -Tmemory.x, but not as -T memory.x.


¹ - clap in particular isn't currently easily implementable (see https://github.com/knurling-rs/flip-link/pull/29 for one approach), but would be with one of https://github.com/clap-rs/clap/issues/1880, https://github.com/clap-rs/clap/issues/1404.

Urhengulas commented 3 years ago

Also this feature should help removing this hack: https://github.com/knurling-rs/flip-link/blob/3e43babd960777d7808747f89bc7c43604011742/src/main.rs#L108-L109