commandline.scons 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. AddOption(
  2. "--extra-define",
  3. action="append",
  4. dest="extra_defines",
  5. default=[],
  6. help="Extra global define that will be passed to C/C++ compiler, can be specified multiple times",
  7. )
  8. AddOption(
  9. "--proxy-env",
  10. action="store",
  11. dest="proxy_env",
  12. default="",
  13. help="Comma-separated list of additional environment variables to pass to "
  14. "child SCons processes",
  15. )
  16. vars = Variables("ufbt_options.py", ARGUMENTS)
  17. vars.AddVariables(
  18. BoolVariable(
  19. "VERBOSE",
  20. help="Print full commands",
  21. default=False,
  22. ),
  23. BoolVariable(
  24. "FORCE",
  25. help="Force target action (for supported targets)",
  26. default=False,
  27. ),
  28. # These 2 are inherited from SDK
  29. # BoolVariable(
  30. # "DEBUG",
  31. # help="Enable debug build",
  32. # default=True,
  33. # ),
  34. # BoolVariable(
  35. # "COMPACT",
  36. # help="Optimize for size",
  37. # default=False,
  38. # ),
  39. PathVariable(
  40. "OTHER_ELF",
  41. help="Path to prebuilt ELF file to debug",
  42. validator=PathVariable.PathAccept,
  43. default="",
  44. ),
  45. (
  46. "OPENOCD_OPTS",
  47. "Options to pass to OpenOCD",
  48. "",
  49. ),
  50. (
  51. "BLACKMAGIC",
  52. "Blackmagic probe location",
  53. "auto",
  54. ),
  55. (
  56. "OPENOCD_ADAPTER_SERIAL",
  57. "OpenOCD adapter serial number",
  58. "auto",
  59. ),
  60. (
  61. "APPID",
  62. "Application id",
  63. "",
  64. ),
  65. PathVariable(
  66. "UFBT_APP_DIR",
  67. help="Application dir to work with",
  68. validator=PathVariable.PathIsDir,
  69. default="",
  70. ),
  71. )
  72. Return("vars")