cc.scons 1018 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. "-ftemplate-depth=4096",
  13. ],
  14. CCFLAGS=[
  15. "-mcpu=cortex-m4",
  16. "-mfloat-abi=hard",
  17. "-mfpu=fpv4-sp-d16",
  18. "-mthumb",
  19. # "-MMD",
  20. # "-MP",
  21. "-Wall",
  22. "-Wextra",
  23. "-Werror",
  24. "-Wno-address-of-packed-member",
  25. "-Wredundant-decls",
  26. "-Wdouble-promotion",
  27. "-fdata-sections",
  28. "-ffunction-sections",
  29. "-fsingle-precision-constant",
  30. "-fno-math-errno",
  31. "-fstack-usage",
  32. "-g",
  33. # "-Wno-stringop-overread",
  34. # "-Wno-stringop-overflow",
  35. ],
  36. CPPDEFINES=[
  37. "_GNU_SOURCE",
  38. ],
  39. LINKFLAGS=[
  40. "-mcpu=cortex-m4",
  41. "-mfloat-abi=hard",
  42. "-mfpu=fpv4-sp-d16",
  43. "-mlittle-endian",
  44. "-mthumb",
  45. ],
  46. )