SConscript 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. Import('RTT_ROOT')
  2. Import('rtconfig')
  3. from building import *
  4. cwd = GetCurrentDir()
  5. # add the general drivers.
  6. src = Split("""
  7. """)
  8. # add esp-hosted common source and header files
  9. src += Glob('esp-hosted/common/proto/*.c')
  10. src += Glob('esp-hosted/host/common/*.c')
  11. path = [cwd + '/esp-hosted/host']
  12. path += [cwd + '/esp-hosted/common/proto']
  13. path += [cwd + '/esp-hosted/common/include']
  14. # add protobuf source and header files
  15. src += Glob('esp-hosted/common/protobuf-c/protobuf-c/*.c')
  16. path += [cwd + '/esp-hosted/common/protobuf-c']
  17. # add host api source and header files
  18. src += Glob('esp-hosted/host/api/src/*.c')
  19. path += [cwd + '/esp-hosted/host/api/include']
  20. # add components source and header files
  21. src += Glob('porting/components/log/*.c')
  22. src += Glob('porting/components/utils/*.c')
  23. src += Glob('porting/components/esp_wifi/*.c')
  24. src += Glob('porting/components/esp_wifi_remote/*.c')
  25. path += [cwd + '/porting/components/log']
  26. path += [cwd + '/porting/components/utils']
  27. path += [cwd + '/porting/components/esp_wifi/include']
  28. path += [cwd + '/porting/components/esp_netif/include']
  29. # add host drivers source and header files
  30. src += Glob('esp-hosted/host/drivers/mempool/*.c')
  31. src += Glob('esp-hosted/host/drivers/rpc/core/*.c')
  32. src += Glob('esp-hosted/host/drivers/rpc/slaveif/*.c')
  33. src += Glob('esp-hosted/host/drivers/rpc/wrap/*.c')
  34. src += Glob('esp-hosted/host/drivers/serial/*.c')
  35. src += Glob('esp-hosted/host/drivers/transport/*.c')
  36. src += Glob('esp-hosted/host/drivers/transport/spi/*.c')
  37. src += Glob('esp-hosted/host/drivers/virtual_serial_if/*.c')
  38. path += [cwd + '/esp-hosted/host/drivers/mempool']
  39. path += [cwd + '/esp-hosted/host/drivers/rpc/core']
  40. path += [cwd + '/esp-hosted/host/drivers/rpc/slaveif']
  41. path += [cwd + '/esp-hosted/host/drivers/rpc/wrap']
  42. path += [cwd + '/esp-hosted/host/drivers/serial']
  43. path += [cwd + '/esp-hosted/host/drivers/transport']
  44. path += [cwd + '/esp-hosted/host/drivers//transport/spi']
  45. path += [cwd + '/esp-hosted/host/drivers/virtual_serial_if']
  46. # add host utils source and header files
  47. src += Glob('esp-hosted/host/utils/*.c')
  48. path += [cwd + '/esp-hosted/host/utils']
  49. # add host port source and header files
  50. src += Glob('porting/port/source/*.c')
  51. path += [cwd + '/porting/port/include']
  52. # add ota source and header files
  53. src += Glob('porting/ota/*.c')
  54. path += [cwd + '/porting/ota']
  55. # add bt source and header files
  56. if GetDepend(['ESP_HOSTED_BT_USING_VHCI_DEVICE_DRIVER']):
  57. # add vhci device driver source and header files
  58. src += Glob('porting/bt/vhci_dev.c')
  59. src += Glob('porting/bt/vhci/*.c')
  60. path += [cwd + '/porting/bt/vhci']
  61. if GetDepend(['ESP_HOSTED_BT_USING_NIMBLE_STACK']):
  62. # add nimble hci driver source and header files
  63. src += Glob('porting/bt/vhci_drv.c')
  64. path += [cwd + '/esp-hosted/host/drivers/bt']
  65. # add host wlan source files
  66. src += Glob('porting/wlan/*.c')
  67. CPPDEFINES = ['']
  68. group = DefineGroup('esp-hosted', src, depend = ['RT_USING_ESP_HOSTED'], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  69. Return('group')