My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

common-cxxflags.py 1.2KB

12345678910111213141516171819202122232425262728293031323334
  1. #
  2. # common-cxxflags.py
  3. # Convenience script to apply customizations to CPP flags
  4. #
  5. Import("env")
  6. env.Append(CXXFLAGS=[
  7. "-Wno-register"
  8. #"-Wno-incompatible-pointer-types",
  9. #"-Wno-unused-const-variable",
  10. #"-Wno-maybe-uninitialized",
  11. #"-Wno-sign-compare"
  12. ])
  13. #
  14. # Add CPU frequency as a compile time constant instead of a runtime variable
  15. #
  16. def add_cpu_freq():
  17. if 'BOARD_F_CPU' in env:
  18. env['BUILD_FLAGS'].append('-DBOARD_F_CPU=' + env['BOARD_F_CPU'])
  19. # Useful for JTAG debugging
  20. #
  21. # It will separate release and debug build folders.
  22. # It useful to keep two live versions: a debug version for debugging and another for
  23. # release, for flashing when upload is not done automatically by jlink/stlink.
  24. # Without this, PIO needs to recompile everything twice for any small change.
  25. if env.GetBuildType() == "debug" and env.get('UPLOAD_PROTOCOL') not in ['jlink', 'stlink']:
  26. env['BUILD_DIR'] = '$PROJECT_BUILD_DIR/$PIOENV/debug'
  27. # On some platform, F_CPU is a runtime variable. Since it's used to convert from ns
  28. # to CPU cycles, this adds overhead preventing small delay (in the order of less than
  29. # 30 cycles) to be generated correctly. By using a compile time constant instead
  30. # the compiler will perform the computation and this overhead will be avoided
  31. add_cpu_freq()