krazykman1

kconfig/ devicetree contents

Jun 21st, 2024
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. I use `rev5`, `rev6`, etc. for the different revisions of the PCB containing an nrf52840.
  2. ```
  3.  boards
  4. └  arm
  5. │  rev5
  6. │ │ * Kconfig.board
  7. │ │ * Kconfig.defconfig
  8. │ │  board.cmake
  9. │ │  board.yml <-- not needed for VSCode, yet needed for standalone `west`, why??
  10. │ │ * rev5.dts
  11. │ │  rev5.yaml
  12. │ └ * rev5_defconfig
  13. │  rev6
  14. │  rev7
  15. └  rev8
  16. ```
  17.  
  18.  
  19. board.yml:
  20. - NOTE: `VSCode + west` does not require this file, but without this file I get the following error when compiling with standalone `west`: https://pastebin.com/gJSTZbpt
  21. ```
  22. board: # TODO: dont know if/why we need this for west from CLI
  23. name: rev5
  24. socs:
  25. - name: nrf52840
  26. ```
  27.  
  28.  
  29. KConfig.board:
  30. ```
  31. config BOARD_REV5
  32. bool "rev5 board"
  33. # am i supposed to depend on this or select it? I've seen both in examples!
  34. depends on SOC_NRF52840_QFAA
  35. # select SOC_NRF52840_QFAA
  36. ```
  37.  
  38.  
  39. Kconfig.defconfig:
  40. ```
  41. if BOARD_REV5
  42. config BOARD
  43. default "rev5"
  44.  
  45. config BT_CTLR
  46. default BT
  47.  
  48. endif
  49. ```
  50.  
  51. rev5.dts:
  52. ```
  53. /dts-v1/;
  54. #include <nordic/nrf52840_qfaa.dtsi>
  55. / {
  56. model = "rev5";
  57. compatible = "vendor,rev5";
  58.  
  59. chosen {
  60. zephyr,sram = &sram0;
  61. zephyr,flash = &flash0;
  62. zephyr,code-partition = &slot0_partition;
  63. };
  64.  
  65. ...
  66. various leds, buttons, ...
  67. };
  68. ...
  69. ```
  70.  
  71. rev5.yaml:
  72. ```
  73. identifier: rev5
  74. name: rev5
  75. type: mcu
  76. arch: arm
  77. ram: 256
  78. flash: 1024
  79. toolchain:
  80. - zephyr
  81. - gnuarmemb
  82. - xtools
  83. ```
Advertisement
Add Comment
Please, Sign In to add comment