cc.scons 985 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. Import("ENV")
  2. ENV.AppendUnique(
  3. CFLAGS=[
  4. "-std=gnu17",
  5. ],
  6. CXXFLAGS=[
  7. "-std=c++17",
  8. "-fno-rtti",
  9. "-fno-use-cxa-atexit",
  10. "-fno-exceptions",
  11. "-fno-threadsafe-statics",
  12. ],
  13. CCFLAGS=[
  14. "-mcpu=cortex-m4",
  15. "-mfloat-abi=hard",
  16. "-mfpu=fpv4-sp-d16",
  17. "-mthumb",
  18. # "-MMD",
  19. # "-MP",
  20. "-Wall",
  21. "-Wextra",
  22. "-Werror",
  23. "-Wno-address-of-packed-member",
  24. "-Wredundant-decls",
  25. "-Wdouble-promotion",
  26. "-fdata-sections",
  27. "-ffunction-sections",
  28. "-fsingle-precision-constant",
  29. "-fno-math-errno",
  30. "-fstack-usage",
  31. "-g",
  32. # "-Wno-stringop-overread",
  33. # "-Wno-stringop-overflow",
  34. ],
  35. CPPDEFINES=[
  36. "_GNU_SOURCE",
  37. ],
  38. LINKFLAGS=[
  39. "-mcpu=cortex-m4",
  40. "-mfloat-abi=hard",
  41. "-mfpu=fpv4-sp-d16",
  42. "-mlittle-endian",
  43. "-mthumb",
  44. ],
  45. )