fbt_debugopts.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. def generate(env, **kw):
  2. env.SetDefault(
  3. OPENOCD_GDB_PIPE=[
  4. "|openocd -c 'gdb_port pipe; log_output debug/openocd.log' ${[SINGLEQUOTEFUNC(OPENOCD_OPTS)]}"
  5. ],
  6. GDBOPTS_BASE=[
  7. "-ex",
  8. "target extended-remote ${GDBREMOTE}",
  9. "-ex",
  10. "set confirm off",
  11. "-ex",
  12. "set pagination off",
  13. ],
  14. GDBOPTS_BLACKMAGIC=[
  15. "-ex",
  16. "monitor swdp_scan",
  17. "-ex",
  18. "monitor debug_bmp enable",
  19. "-ex",
  20. "attach 1",
  21. "-ex",
  22. "set mem inaccessible-by-default off",
  23. ],
  24. GDBPYOPTS=[
  25. "-ex",
  26. "source debug/FreeRTOS/FreeRTOS.py",
  27. "-ex",
  28. "source debug/flipperapps.py",
  29. "-ex",
  30. "source debug/PyCortexMDebug/PyCortexMDebug.py",
  31. "-ex",
  32. "svd_load ${SVD_FILE}",
  33. "-ex",
  34. "compare-sections",
  35. ],
  36. JFLASHPROJECT="${ROOT_DIR.abspath}/debug/fw.jflash",
  37. )
  38. def exists(env):
  39. return True