commandline.scons 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. AddOption(
  2. "--proxy-env",
  3. action="store",
  4. dest="proxy_env",
  5. default="",
  6. help="Comma-separated list of additional environment variables to pass to child SCons processes",
  7. )
  8. AddOption(
  9. "--channel",
  10. action="store",
  11. dest="sdk_channel",
  12. choices=["dev", "rc", "release"],
  13. default="",
  14. help="Release channel to use for SDK",
  15. )
  16. AddOption(
  17. "--branch",
  18. action="store",
  19. dest="sdk_branch",
  20. help="Custom main repo branch to use for SDK",
  21. )
  22. AddOption(
  23. "--hw-target",
  24. action="store",
  25. dest="sdk_target",
  26. help="SDK Hardware target",
  27. )
  28. vars = Variables("ufbt_options.py", ARGUMENTS)
  29. vars.AddVariables(
  30. BoolVariable(
  31. "VERBOSE",
  32. help="Print full commands",
  33. default=False,
  34. ),
  35. BoolVariable(
  36. "FORCE",
  37. help="Force target action (for supported targets)",
  38. default=False,
  39. ),
  40. # These 2 are inherited from SDK
  41. # BoolVariable(
  42. # "DEBUG",
  43. # help="Enable debug build",
  44. # default=True,
  45. # ),
  46. # BoolVariable(
  47. # "COMPACT",
  48. # help="Optimize for size",
  49. # default=False,
  50. # ),
  51. PathVariable(
  52. "OTHER_ELF",
  53. help="Path to prebuilt ELF file to debug",
  54. validator=PathVariable.PathAccept,
  55. default="",
  56. ),
  57. (
  58. "OPENOCD_OPTS",
  59. "Options to pass to OpenOCD",
  60. "",
  61. ),
  62. (
  63. "BLACKMAGIC",
  64. "Blackmagic probe location",
  65. "auto",
  66. ),
  67. (
  68. "OPENOCD_ADAPTER_SERIAL",
  69. "OpenOCD adapter serial number",
  70. "auto",
  71. ),
  72. (
  73. "APPID",
  74. "Application id",
  75. "",
  76. ),
  77. PathVariable(
  78. "UFBT_APP_DIR",
  79. help="Application dir to work with",
  80. validator=PathVariable.PathIsDir,
  81. default="",
  82. ),
  83. )
  84. Return("vars")