Kconfig 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094
  1. #
  2. # For a description of the syntax of this configuration file,
  3. # see the file kconfig-language.txt in the NuttX tools repository.
  4. #
  5. choice
  6. prompt "CPU Architecture"
  7. default ARCH_ARM
  8. config ARCH_ARM
  9. bool "ARM"
  10. select ARCH_HAVE_INTERRUPTSTACK
  11. select ARCH_HAVE_VFORK
  12. select ARCH_HAVE_STACKCHECK
  13. select ARCH_HAVE_CUSTOMOPT
  14. select ARCH_HAVE_STDARG_H
  15. select ARCH_HAVE_SYSCALL_HOOKS
  16. select ARCH_HAVE_RDWR_MEM_CPU_RUN
  17. ---help---
  18. The ARM architectures
  19. config ARCH_AVR
  20. bool "AVR"
  21. select ARCH_NOINTC
  22. select ARCH_HAVE_INTERRUPTSTACK
  23. select ARCH_HAVE_CUSTOMOPT
  24. ---help---
  25. Atmel 8-bit bit AVR and 32-bit AVR32 architectures
  26. config ARCH_HC
  27. bool "Freescale HC"
  28. select ARCH_NOINTC
  29. select ARCH_HAVE_INTERRUPTSTACK
  30. ---help---
  31. Freescale HC architectures (M9S12)
  32. config ARCH_MIPS
  33. bool "MIPS"
  34. select ARCH_HAVE_INTERRUPTSTACK
  35. select ARCH_HAVE_CUSTOMOPT
  36. ---help---
  37. MIPS architectures (PIC32)
  38. config ARCH_MISOC
  39. bool "MISOC"
  40. select ARCH_HAVE_INTERRUPTSTACK
  41. select ARCH_HAVE_CUSTOMOPT
  42. select ARCH_HAVE_STDARG_H
  43. ---help---
  44. MISOC
  45. config ARCH_RENESAS
  46. bool "Renesas"
  47. select ARCH_NOINTC
  48. select ARCH_HAVE_INTERRUPTSTACK
  49. ---help---
  50. Renesas architectures (SH and M16C).
  51. config ARCH_RISCV
  52. bool "RISC-V"
  53. select ARCH_HAVE_INTERRUPTSTACK
  54. select ARCH_HAVE_STACKCHECK
  55. select ARCH_HAVE_CUSTOMOPT
  56. select ARCH_HAVE_STDARG_H
  57. select ARCH_HAVE_SYSCALL_HOOKS
  58. select ARCH_HAVE_RDWR_MEM_CPU_RUN
  59. ---help---
  60. RISC-V 32 and 64-bit RV32 / RV64 architectures.
  61. config ARCH_SIM
  62. bool "Simulation"
  63. select ARCH_HAVE_MULTICPU
  64. select ARCH_HAVE_RTC_SUBSECONDS
  65. select ARCH_HAVE_SERIAL_TERMIOS
  66. select ARCH_HAVE_TICKLESS
  67. select ARCH_HAVE_POWEROFF
  68. select ARCH_HAVE_TESTSET
  69. select ARCH_HAVE_VFORK
  70. select ARCH_HAVE_SETJMP
  71. select ARCH_SETJMP_H
  72. select ALARM_ARCH
  73. select ONESHOT
  74. select SERIAL_CONSOLE
  75. select SERIAL_IFLOWCONTROL
  76. ---help---
  77. Linux/Cygwin user-mode simulation.
  78. config ARCH_X86
  79. bool "x86"
  80. ---help---
  81. Intel x86 architectures.
  82. config ARCH_X86_64
  83. bool "x86_64"
  84. select LIBC_ARCH_ELF_64BIT if LIBC_ARCH_ELF
  85. ---help---
  86. x86-64 architectures.
  87. config ARCH_XTENSA
  88. bool "Xtensa"
  89. select ARCH_HAVE_INTERRUPTSTACK
  90. select ARCH_HAVE_STACKCHECK
  91. select ARCH_HAVE_CUSTOMOPT
  92. select ARCH_HAVE_TESTSET
  93. ---help---
  94. Cadence® Tensilica® Xtensa® actictures.
  95. config ARCH_Z16
  96. bool "ZNEO"
  97. select ARCH_HAVE_HEAP2
  98. ---help---
  99. ZiLOG ZNEO 16-bit architectures (z16f).
  100. config ARCH_Z80
  101. bool "z80"
  102. select ARCH_HAVE_HEAP2
  103. ---help---
  104. ZiLOG 8-bit architectures (z80, ez80, z8).
  105. config ARCH_OR1K
  106. bool "OpenRISC"
  107. ---help---
  108. OpenRISC architectures.
  109. endchoice
  110. config ARCH
  111. string
  112. default "arm" if ARCH_ARM
  113. default "avr" if ARCH_AVR
  114. default "hc" if ARCH_HC
  115. default "mips" if ARCH_MIPS
  116. default "misoc" if ARCH_MISOC
  117. default "renesas" if ARCH_RENESAS
  118. default "risc-v" if ARCH_RISCV
  119. default "sim" if ARCH_SIM
  120. default "x86" if ARCH_X86
  121. default "xtensa" if ARCH_XTENSA
  122. default "z16" if ARCH_Z16
  123. default "z80" if ARCH_Z80
  124. default "or1k" if ARCH_OR1K
  125. source arch/arm/Kconfig
  126. source arch/avr/Kconfig
  127. source arch/hc/Kconfig
  128. source arch/mips/Kconfig
  129. source arch/misoc/Kconfig
  130. source arch/renesas/Kconfig
  131. source arch/risc-v/Kconfig
  132. source arch/sim/Kconfig
  133. source arch/x86/Kconfig
  134. source arch/x86_64/Kconfig
  135. source arch/xtensa/Kconfig
  136. source arch/z16/Kconfig
  137. source arch/z80/Kconfig
  138. source arch/or1k/Kconfig
  139. config ARCH_CHIP_CUSTOM
  140. bool
  141. default n
  142. if ARCH_CHIP_CUSTOM
  143. menu "Custom Chip Configuration"
  144. config ARCH_CHIP_CUSTOM_NAME
  145. string "Custom chip name"
  146. default ""
  147. ---help---
  148. This is a name for the chip. It is not used except to return the
  149. information via the NSH uname command.
  150. config ARCH_CHIP_CUSTOM_DIR
  151. string "Custom chip directory"
  152. default ""
  153. ---help---
  154. If the custom chip configuration is selected, then it is necessary
  155. to also tell the build system where it can find the chip directory
  156. for the custom chip.
  157. In this case, the chip directory is assumed to lie outside the
  158. NuttX directory. The provided path must then be a full, absolute
  159. path to some location outside of the NuttX source tree (like
  160. "~/projects/mychip").
  161. config ARCH_CHIP_CUSTOM_DIR_RELPATH
  162. bool "Relative custom chip directory"
  163. default y
  164. ---help---
  165. Specifies that the chip directory is relative to the NuttX directory.
  166. endmenu # Custom Chip Configuration
  167. endif #ARCH_CHIP_CUSTOM
  168. source arch/dummy/Kconfig
  169. config ARCH_TOOLCHAIN_IAR
  170. bool
  171. default n
  172. config ARCH_TOOLCHAIN_GNU
  173. bool
  174. default n
  175. config ARCH_GNU_NO_WEAKFUNCTIONS
  176. bool
  177. depends on ARCH_TOOLCHAIN_GNU
  178. default n
  179. ---help---
  180. Disable support for weak functions.
  181. config ARCH_SIZET_LONG
  182. bool "size_t is type long"
  183. default n
  184. ---help---
  185. size_t may be type long or type int. This matters for some
  186. C++ library routines because the NuttX size_t might not have
  187. the same underlying type as your toolchain's size_t.
  188. comment "Architecture Options"
  189. config ARCH_NOINTC
  190. bool
  191. default n
  192. config ARCH_VECNOTIRQ
  193. bool
  194. default n
  195. config ARCH_HAVE_IRQTRIGGER
  196. bool
  197. default n
  198. depends on !ARCH_NOINTC
  199. config ARCH_DMA
  200. bool
  201. default n
  202. config ARCH_HAVE_IRQPRIO
  203. bool
  204. default n
  205. config ARCH_ICACHE
  206. bool
  207. default n
  208. config ARCH_DCACHE
  209. bool
  210. default n
  211. config ARCH_L2CACHE
  212. bool
  213. default n
  214. config ARCH_HAVE_ADDRENV
  215. bool
  216. default n
  217. config ARCH_NEED_ADDRENV_MAPPING
  218. bool
  219. default n
  220. config ARCH_HAVE_MODULE_TEXT
  221. bool "Special memory region for dynamic code loading"
  222. default n
  223. config ARCH_HAVE_MULTICPU
  224. bool
  225. default n
  226. config ARCH_HAVE_VFORK
  227. bool
  228. default n
  229. config ARCH_HAVE_FPU
  230. bool
  231. default n
  232. config ARCH_HAVE_DPFPU
  233. bool
  234. default n
  235. config ARCH_HAVE_LAZYFPU
  236. bool
  237. config ARCH_HAVE_MMU
  238. bool
  239. default n
  240. config ARCH_HAVE_MPU
  241. bool
  242. default n
  243. config ARCH_NAND_HWECC
  244. bool
  245. default n
  246. config ARCH_HAVE_EXTCLK
  247. bool
  248. default n
  249. config ARCH_HAVE_POWEROFF
  250. bool
  251. default n
  252. config ARCH_HAVE_PROGMEM
  253. bool
  254. default n
  255. config ARCH_HAVE_PROGMEM_READ
  256. bool
  257. default n
  258. depends on ARCH_HAVE_PROGMEM
  259. config ARCH_HAVE_RESET
  260. bool
  261. default n
  262. config ARCH_HAVE_TESTSET
  263. bool
  264. default n
  265. config ARCH_HAVE_FETCHADD
  266. bool
  267. default n
  268. config ARCH_HAVE_RTC_SUBSECONDS
  269. bool
  270. default n
  271. config ARCH_HAVE_SYSCALL_HOOKS
  272. bool
  273. default n
  274. ---help---
  275. Indicates that the architecture supports the system call hooks as
  276. required if CONFIG_SCHED_INSTRUMENTATION_SYSCALL is enabled. Refer
  277. to sched/Kconfig for additional information.
  278. config ARCH_FPU
  279. bool "FPU support"
  280. default y
  281. depends on ARCH_HAVE_FPU
  282. ---help---
  283. Build in support for the Floating Point Unit (FPU).
  284. Check your chip specifications first; not all chips support the FPU.
  285. config ARCH_DPFPU
  286. bool "Double precision FPU support"
  287. default y
  288. depends on ARCH_FPU && ARCH_HAVE_DPFPU
  289. ---help---
  290. Enable toolchain support for double precision (64-bit) floating
  291. point if both the toolchain and the hardware support it.
  292. config ARCH_USE_MMU
  293. bool "Enable MMU"
  294. default n
  295. depends on ARCH_HAVE_MMU
  296. ---help---
  297. The architecture supports supports an MMU. Enable this option in
  298. order to enable use of the MMU. For most architectures, this is
  299. not really an option: It is required to use the MMU. In those
  300. cases, this selection will always be forced.
  301. config ARCH_USE_MPU
  302. bool "Enable MPU"
  303. default n
  304. depends on ARCH_HAVE_MPU
  305. ---help---
  306. The architecture supports supports an MPU. Enable this option in
  307. order to enable use of the MPU. For most architectures, this option
  308. is enabled by other, platform-specific logic. In those cases, this
  309. selection will always be forced.
  310. config ARCH_USE_MODULE_TEXT
  311. bool "Enable module text allocator"
  312. default n
  313. depends on ARCH_HAVE_MODULE_TEXT
  314. ---help---
  315. This option enable architecture-sepecific memory allocator
  316. for dynamic code loading. For example, ESP32 has a separate memory
  317. regions for instruction and data and the memory region used for
  318. usual malloc doesn't work for instruction.
  319. menuconfig ARCH_ADDRENV
  320. bool "Address environments"
  321. default n
  322. depends on ARCH_HAVE_ADDRENV
  323. ---help---
  324. Support per-task address environments using the MMU... i.e., support
  325. "processes"
  326. if ARCH_ADDRENV && ARCH_NEED_ADDRENV_MAPPING
  327. config ARCH_TEXT_VBASE
  328. hex "Virtual .text base"
  329. ---help---
  330. The virtual address of the beginning the .text region
  331. config ARCH_DATA_VBASE
  332. hex "Virtual .bss/.data base"
  333. ---help---
  334. The virtual address of the beginning of the .bss/.data region.
  335. config ARCH_HEAP_VBASE
  336. hex "Virtual heap base"
  337. ---help---
  338. The virtual address of the beginning of the heap region.
  339. config ARCH_SHM_VBASE
  340. hex "Shared memory base"
  341. depends on MM_SHM
  342. ---help---
  343. The virtual address of the beginning of the shared memory region.
  344. config ARCH_TEXT_NPAGES
  345. int "Max .text pages"
  346. default 1
  347. ---help---
  348. The maximum number of pages that can allocated for the .text region.
  349. This, along with knowledge of the page size, determines the size of
  350. the .text virtual address space. Default is 1.
  351. config ARCH_DATA_NPAGES
  352. int "Max .bss/.data pages"
  353. default 1
  354. ---help---
  355. The maximum number of pages that can allocated for the .bss/.data
  356. region. This, along with knowledge of the page size, determines the
  357. size of the .bss/.data virtual address space. Default is 1.
  358. config ARCH_HEAP_NPAGES
  359. int "Max heap pages"
  360. default 1
  361. ---help---
  362. The maximum number of pages that can allocated for the heap region.
  363. This, along with knowledge of the page size, determines the size of
  364. the heap virtual address space. Default is 1.
  365. if MM_SHM
  366. config ARCH_SHM_MAXREGIONS
  367. int "Max shared memory regions"
  368. default 1
  369. ---help---
  370. The maximum number of regions that can allocated for the shared
  371. memory space. This hard-coded value permits static allocation of
  372. the shared memory data structures and serves no other purpose.
  373. Default is 1.
  374. The size of the virtual shared memory address space is then
  375. determined by the product of the maximum number of regions, the
  376. maximum number of pages per region, and the configured size of
  377. each page.
  378. config ARCH_SHM_NPAGES
  379. int "Max shared memory pages"
  380. default 1
  381. ---help---
  382. The maximum number of pages that can allocated per region for the shared memory
  383. region. Default is 1.
  384. The size of the virtual shared memory address space is then
  385. determined by the product of the maximum number of regions, the
  386. maximum number of pages per region, and the configured size of
  387. each page.
  388. endif # MM_SHM
  389. config ARCH_STACK_DYNAMIC
  390. bool "Dynamic user stack"
  391. default n
  392. depends on BUILD_KERNEL && EXPERIMENTAL
  393. ---help---
  394. Select this option if the user process stack resides in its own
  395. address space. The naming of this selection implies that dynamic
  396. stack allocation is supported. Certainly this option must be set if
  397. dynamic stack allocation is supported by a platform. But the more
  398. general meaning of this configuration environment is simply that the
  399. stack has its own address space.
  400. NOTE: This option not yet fully implemented in the code base.
  401. Hence, it is marked EXPERIMENTAL: Do not enable it unless you plan
  402. finish the implementation.
  403. if ARCH_STACK_DYNAMIC
  404. config ARCH_STACK_VBASE
  405. hex "Virtual stack base"
  406. ---help---
  407. The virtual address of the beginning the stack region
  408. config ARCH_STACK_NPAGES
  409. int "Max. stack pages"
  410. default 1
  411. ---help---
  412. The maximum number of pages that can allocated for the stack region.
  413. This, along with knowledge of the page size, determines the size of
  414. the stack virtual address space. Default is 1.
  415. endif # ARCH_STACK_DYNAMIC
  416. config ARCH_KERNEL_STACK
  417. bool "Kernel process stack"
  418. default n if !LIBC_EXECFUNCS
  419. default y if LIBC_EXECFUNCS
  420. depends on BUILD_KERNEL
  421. ---help---
  422. It this option is selected, then every user process will have two
  423. stacks: A large, potentially dynamically sized user stack and small
  424. kernel stack that is used during system call process.
  425. If this option is not selected, then kernel system calls will simply
  426. use the caller's user stack. So, in most cases, this option is not
  427. required. However, this option is *required* if both BUILD_KERNEL
  428. and LIBC_EXECFUNCS are selected. Why? Because when we instantiate
  429. and initialize the address environment of the new user process, we
  430. will temporarily lose the address environment of the old user
  431. process, including its stack contents. The kernel C logic will
  432. crash immediately with no valid stack in place.
  433. When this option is selected, the smaller kernel stack stays in
  434. place during system call processing event though the original user
  435. stack may or may not be accessible.
  436. if ARCH_KERNEL_STACK
  437. config ARCH_KERNEL_STACKSIZE
  438. int "Kernel stack size"
  439. default 1568
  440. ---help---
  441. The common size of each process's kernel stack
  442. endif # ARCH_KERNEL_STACK
  443. config ARCH_PGPOOL_MAPPING
  444. bool "Have page pool mapping"
  445. default n
  446. ---help---
  447. If there is a MMU mapping in place for the page pool memory, then
  448. this mapping can be utilized to simplify some page table operations.
  449. Otherwise, a temporary mapping will have to be established each time
  450. it is necessary to modify the contents of a page.
  451. if ARCH_PGPOOL_MAPPING
  452. config ARCH_PGPOOL_PBASE
  453. hex "Page pool physical address"
  454. default 0x0
  455. ---help---
  456. The physical address of the start of the page pool memory. This
  457. setting is probably equivalent to other platform specific definitions
  458. but is required again in order to modularize the common address
  459. environment logic.
  460. config ARCH_PGPOOL_VBASE
  461. hex "Page pool virtual address"
  462. default 0x0
  463. ---help---
  464. The virtual address of the start of the page pool memory. This
  465. setting is probably equivalent to other platform specific definitions
  466. but is required again in order to modularize the common address
  467. environment logic.
  468. config ARCH_PGPOOL_SIZE
  469. int "Page pool size (bytes)"
  470. default 0
  471. ---help---
  472. The size of the page pool memory in bytes. This setting is probably
  473. equivalent to other platform specific definitions but is required again
  474. in order to modularize the common address environment logic.
  475. endif # ARCH_PGPOOL_MAPPING
  476. endif # ARCH_ADDRENV && ARCH_NEED_ADDRENV_MAPPING
  477. menuconfig PAGING
  478. bool "On-demand paging"
  479. default n
  480. depends on ARCH_USE_MMU && !ARCH_ROMPGTABLE
  481. ---help---
  482. If set =y in your configation file, this setting will enable the on-demand
  483. paging feature as described in
  484. https://nuttx.apache.org/docs/latest/components/paging.html.
  485. if PAGING
  486. config PAGING_PAGESIZE
  487. int "Page size (bytes)"
  488. default 4096
  489. ---help---
  490. The size of one managed page. This must be a value supported by the
  491. processor's memory management unit
  492. config PAGING_NLOCKED
  493. int "Number of locked pages"
  494. default 48
  495. ---help---
  496. This is the number of locked pages in the memory map.
  497. config PAGING_CUSTOM_BASE
  498. bool "Custom paging base address"
  499. default n
  500. ---help---
  501. By default, the page begins at RAM_START/VSTART. That base address
  502. can be changed if this value is selected.
  503. if PAGING_CUSTOM_BASE
  504. config PAGING_LOCKED_PBASE
  505. hex "Physical base address"
  506. config PAGING_LOCKED_VBASE
  507. hex "Virtual base address"
  508. endif # PAGING_CUSTOM_BASE
  509. config PAGING_NPPAGED
  510. int "Number of physical pages"
  511. default 256
  512. ---help---
  513. This is the number of physical pages available to support the paged
  514. text region.
  515. config PAGING_NVPAGED
  516. int "Number of virtual pages"
  517. default 1024
  518. ---help---
  519. This actual size of the virtual paged text region (in pages). This
  520. is also the number of virtual pages required to span the entire
  521. paged region. The on-demand paging feature is intended to support
  522. only the case where the virtual paged text area is much larger the
  523. available physical pages. Otherwise, why would you enable on-demand paging?
  524. config PAGING_NDATA
  525. int "Number of data pages"
  526. default 256
  527. ---help---
  528. This is the number of data pages in the memory map. The data region
  529. will extend to the end of RAM unless overridden by a setting in the
  530. configuration file.
  531. NOTE: In some architectures, it may be necessary to take some memory
  532. from the end of RAM for page tables or other system usage. The
  533. configuration settings and linker directives must be cognizant of
  534. that: PAGING_NDATA should be defined to prevent the data region from
  535. extending all the way to the end of memory.
  536. config PAGING_DEFPRIO
  537. int "Page fill worker thread priority"
  538. default 100
  539. ---help---
  540. The default, minimum priority of the page fill worker thread. The
  541. priority of the page fill work thread will be boosted boosted
  542. dynamically so that it matches the priority of the task on behalf
  543. of which it performs the fill. This defines the minimum priority
  544. that will be used. Default: 100.
  545. config PAGING_STACKSIZE
  546. int "Page fill worker thread stack size"
  547. default 1024
  548. ---help---
  549. Defines the size of the allocated stack for the page fill worker
  550. thread. Default: 1024.
  551. config PAGING_BLOCKINGFILL
  552. bool "Blocking fill"
  553. default n
  554. ---help---
  555. The architecture specific up_fillpage() function may be blocking
  556. or non-blocking. If defined, this setting indicates that the
  557. up_fillpage() implementation will block until the transfer is
  558. completed. Default: Undefined (non-blocking).
  559. config PAGING_WORKPERIOD
  560. int "Work period (usec)"
  561. default 500000
  562. ---help---
  563. The page fill worker thread will wake periodically even if there
  564. is no mapping to do. This selection controls that wake-up period
  565. (in microseconds). This wake-up a failsafe that will handle any
  566. cases where a single is lost (that would really be a bug and
  567. shouldn't happen!) and also supports timeouts for case of non-
  568. blocking, asynchronous fills (see CONFIG_PAGING_TIMEOUT_TICKS).
  569. config PAGING_TIMEOUT
  570. bool "Paging timeout"
  571. default n
  572. ---help---
  573. If defined, the implementation will monitor the (asynchronous) page
  574. fill logic. If the fill takes longer than than a timeout value,
  575. then a fatal error will be declared. Default: No timeouts monitored
  576. config PAGING_TIMEOUT_TICKS
  577. int "Paging timeout ticks"
  578. default 10
  579. depends on PAGING_TIMEOUT
  580. ---help---
  581. If PAGING_TIMEOUT is defined, then implementation will monitor the
  582. (asynchronous) page fill logic. If the fill takes longer than this
  583. number if microseconds, then a fatal error will be declared.
  584. Default: No timeouts monitored
  585. endif # PAGING
  586. config ARCH_IRQPRIO
  587. bool "Prioritized interrupt support"
  588. default n
  589. depends on ARCH_HAVE_IRQPRIO
  590. ---help---
  591. Enable support for prioritized interrupts.
  592. NOTE: The use of interrupt priorities implies that you also have
  593. support for nested interrupts. Most architectures do not support
  594. nesting of interrupts or, if they do, they only supported nested
  595. interrupts with certain configuration options. So this selection
  596. should be used with caution.
  597. config ARCH_STACKDUMP
  598. bool "Dump stack on assertions"
  599. default n
  600. select DEBUG_ALERT
  601. ---help---
  602. Enable to do stack dumps after assertions
  603. config ARCH_USBDUMP
  604. bool "Dump USB trace data"
  605. default n
  606. depends on USBDEV_TRACE
  607. ---help---
  608. Enable to do USB trace after assertions
  609. config ENDIAN_BIG
  610. bool "Big Endian Architecture"
  611. default n
  612. depends on !ARCH_RISCV
  613. ---help---
  614. Select if architecture operates using big-endian byte ordering.
  615. config ARCH_IDLE_CUSTOM
  616. bool "Custom IDLE loop"
  617. default n
  618. ---help---
  619. Each architecture provides a "default" IDLE loop that exits when the
  620. MCU has nothing else to do. This default IDLE loop can be replaced
  621. by a custom, board-specific IDLE loop by setting this option. Such
  622. a custom IDLE loop may do things like a continuous built-in test or
  623. perhaps or IDLE low power operations.
  624. NOTE: As of this writing, this capability is only supported by ARM
  625. and MIPS architectures. However, the implementation is trivial: If
  626. CONFIG_ARCH_IDLE_CUSTOM is defined, then the default IDLE loop file
  627. is not included in the MCU-specific Make.defs file.
  628. config ARCH_CUSTOM_PMINIT
  629. bool "Custom PM initialization"
  630. default n
  631. depends on PM
  632. ---help---
  633. Each architecture provides default power management (PM)
  634. initialization that is called automatically when the system is
  635. started. This default PM initialization can be replaced by custom,
  636. board-specific PM initialization by setting this option. Such a
  637. custom initialization may do additional PM-related initialization
  638. that is unique to the board power management requirements.
  639. NOTE: As of this writing, this capability is only supported by the
  640. STM32. However, the implementation is trivial: If CONFIG_ARCH_CUSTOM_PMINIT,
  641. then the default PM initialization is not included in the MCU-specific
  642. Make.defs file.
  643. config ARCH_HAVE_RAMFUNCS
  644. bool
  645. default n
  646. config ARCH_RAMFUNCS
  647. bool "Copy functions to RAM on startup"
  648. default y
  649. depends on ARCH_HAVE_RAMFUNCS
  650. ---help---
  651. Copy some functions to RAM at boot time. This is done in some
  652. architectures to improve performance. In other cases, it is done
  653. so that FLASH can be reconfigured while the MCU executes out of
  654. SRAM.
  655. config ARCH_HAVE_RAMVECTORS
  656. bool
  657. default n
  658. config ARCH_RAMVECTORS
  659. bool "Support RAM interrupt vectors"
  660. default n
  661. depends on ARCH_HAVE_RAMVECTORS
  662. ---help---
  663. If ARCH_RAMVECTORS is defined, then the architecture will support
  664. modifiable vectors in a RAM-based vector table.
  665. config ARCH_MINIMAL_VECTORTABLE
  666. bool "Minimal RAM usage for vector table"
  667. default n
  668. ---help---
  669. Use a minimum amount of RAM for the vector table.
  670. Instead of allowing irq_attach() to work for all interrupt vectors,
  671. restrict to only working for a select few (defined in your board
  672. configuration). This can dramatically reduce the amount of RAM used
  673. be your vector table.
  674. To use this setting, you must have a file in your board config that
  675. provides:
  676. #include <nuttx/arch.h>
  677. const irq_mapped_t g_irqmap[NR_IRQS] =
  678. {
  679. ... IRQ to index mapping values ...
  680. };
  681. This table is index by the hardware IRQ number and provides a value
  682. in the range of 0 to CONFIG_ARCH_NUSER_INTERRUPTS that is the new,
  683. mapped index into the vector table. Unused, unmapped interrupts
  684. should be set to IRQMAPPED_MAX. So, for example, if g_irqmap[37]
  685. == 24, then the hardware interrupt vector 37 will be mapped to the
  686. interrupt vector table at index 24. if g_irqmap[42] ==
  687. IRQMAPPED_MAX, then hardware interrupt vector 42 is not used and
  688. if it occurs will result in an unexpected interrupt crash.
  689. config ARCH_NUSER_INTERRUPTS
  690. int "Number of interrupts"
  691. default 0
  692. depends on ARCH_MINIMAL_VECTORTABLE
  693. ---help---
  694. If CONFIG_ARCH_MINIMAL_VECTORTABLE is defined, then this setting
  695. defines the actual number of valid, mapped interrupts in g_irqmap.
  696. This number will be the new size of the OS vector table
  697. # Bring-up debug configuration options. These are only intended for low level
  698. # bring-up and not part of normal platform configuration. They should never be
  699. # selected in a "normal" configuration and, hence, depend on both EXPERIMENTAL
  700. # and DEBUG_FEATURES.
  701. menu "Bring-Up Options"
  702. depends on EXPERIMENTAL && DEBUG_FEATURES
  703. config SUPPRESS_CLOCK_CONFIG
  704. bool "Suppress clock configuration"
  705. default n
  706. depends on ARCH_XTENSA
  707. ---help---
  708. Do not configure clocking. Instead relies on the reset clock
  709. configuration (or clock configuration provided by a bootloader).
  710. config SUPPRESS_INTERRUPTS
  711. bool "Suppress all interrupts"
  712. default n
  713. ---help---
  714. Do not enable interrupts
  715. config SUPPRESS_TIMER_INTS
  716. bool "No timer"
  717. default n
  718. ---help---
  719. Do not initialize or enable the system timer
  720. config SUPPRESS_SERIAL_INTS
  721. bool "Suppress serial interrupts"
  722. default n
  723. ---help---
  724. Console will poll
  725. config SUPPRESS_UART_CONFIG
  726. bool "Do no re-configure UART"
  727. default n
  728. ---help---
  729. Do not re-configure the serial console UART from its start-up state.
  730. This is useful when a boot loader has already initialized the serial
  731. port.
  732. config DUMP_ON_EXIT
  733. bool "Dump task state"
  734. default n
  735. depends on DEBUG_SCHED_INFO
  736. ---help---
  737. Dump task state on exit()
  738. endmenu # Bring-Up Options
  739. comment "Board Settings"
  740. config BOARD_LOOPSPERMSEC
  741. int "Delay loops per millisecond"
  742. default 5000
  743. ---help---
  744. Simple delay loops are used by some logic, especially during boot-up,
  745. driver initialization. These delay loops must be calibrated for each
  746. board in order to assure accurate timing by the delay loops.
  747. comment "Interrupt options"
  748. config ARCH_HAVE_INTERRUPTSTACK
  749. bool
  750. default n
  751. config ARCH_INTERRUPTSTACK
  752. int "Interrupt Stack Size"
  753. depends on ARCH_HAVE_INTERRUPTSTACK
  754. default 0
  755. ---help---
  756. This architecture supports an interrupt stack. If defined, this symbol
  757. will be the size of the interrupt stack in bytes. If not defined (or
  758. defined to be zero), the user task stacks will be used during interrupt
  759. handling.
  760. config ARCH_HAVE_HIPRI_INTERRUPT
  761. bool
  762. default n
  763. config ARCH_HIPRI_INTERRUPT
  764. bool "High priority interrupts"
  765. default n
  766. depends on ARCH_HAVE_HIPRI_INTERRUPT && ARCH_HAVE_IRQPRIO
  767. select ARCH_IRQPRIO
  768. ---help---
  769. NOTE: This description is currently unique to the Cortex-M family
  770. which is the only family that currently supports this feature. The
  771. general feature is not conceptually unique to the Cortex-M but if it
  772. is extended to any other family, then this discussion will have to
  773. be generalized.
  774. If ARMV7M_USEBASEPRI is selected, then interrupts will be disabled
  775. by setting the BASEPRI register to NVIC_SYSH_DISABLE_PRIORITY so
  776. that most interrupts will not have execution priority. SVCall must
  777. have execution priority in all cases.
  778. In the normal cases, interrupts are not nest-able and all interrupts
  779. run at an execution priority between NVIC_SYSH_PRIORITY_MIN and
  780. NVIC_SYSH_PRIORITY_MAX (with NVIC_SYSH_PRIORITY_MAX reserved for
  781. SVCall).
  782. If, in addition, ARCH_HIPRI_INTERRUPT is defined, then special high
  783. priority interrupts are supported. These are not "nested" in the
  784. normal sense of the word. These high priority interrupts can
  785. interrupt normal processing but execute outside of OS (although they
  786. can "get back into the game" via a PendSV interrupt).
  787. How do you specify a high priority interrupt? You need to do two
  788. things:
  789. 1) You need to change the address in the vector table so that
  790. the high priority interrupt vectors to your special C
  791. interrupt handler. There are two ways to do this:
  792. a) If you select CONFIG_ARCH_RAMVECTORS, then vectors will
  793. be kept in RAM and the system will support the interface:
  794. int up_ramvec_attach(int irq, up_vector_t vector)
  795. that can be used to attach your C interrupt handler to the
  796. vector at run time.
  797. b) Alternatively, you could keep your vectors in FLASH but in
  798. order to this, you would have to develop your own custom
  799. vector table.
  800. 2) Then set the priority of your interrupt to NVIC to
  801. NVIC_SYSH_HIGH_PRIORITY using the standard interface:
  802. int up_prioritize_irq(int irq, int priority)
  803. NOTE: ARCH_INTERRUPTSTACK must be set in kernel mode (BUILD_KERNEL).
  804. In kernel mode without an interrupt stack, the interrupt handler
  805. will set the MSP to the stack pointer of the interrupted thread. If
  806. the interrupted thread was a privileged thread, that will be the MSP
  807. otherwise it will be the PSP. If the PSP is used, then the value of
  808. the MSP will be invalid when the interrupt handler returns because
  809. it will be a pointer to an old position in the unprivileged stack.
  810. Then when the high priority interrupt occurs and uses this stale MSP,
  811. there will most likely be a system failure.
  812. If the interrupt stack is selected, on the other hand, then the
  813. interrupt handler will always set the MSP to the interrupt
  814. stack. So when the high priority interrupt occurs, it will either
  815. use the MSP of the last privileged thread to run or, in the case of
  816. the nested interrupt, the interrupt stack if no privileged task has
  817. run
  818. comment "Boot options"
  819. choice
  820. prompt "Boot Mode"
  821. default BOOT_RUNFROMFLASH
  822. config BOOT_RUNFROMEXTSRAM
  823. bool "Run from external SRAM"
  824. ---help---
  825. Some configuration support booting and running from external SRAM.
  826. config BOOT_RUNFROMFLASH
  827. bool "Boot and run from flash"
  828. ---help---
  829. Most configurations support XIP operation from FLASH but must copy
  830. initialized .data sections to RAM. (This is the default).
  831. config BOOT_RUNFROMISRAM
  832. bool "Boot and run from internal SRAM"
  833. ---help---
  834. Some configuration support booting and running from internal SRAM.
  835. config BOOT_RUNFROMSDRAM
  836. bool "Boot and run from external SDRAM"
  837. ---help---
  838. Some configuration support booting and running from external SDRAM.
  839. config BOOT_COPYTORAM
  840. bool "Boot from FLASH but copy to ram"
  841. ---help---
  842. Some configurations boot in FLASH but copy themselves entirely into
  843. RAM for better performance.
  844. endchoice
  845. menu "Boot Memory Configuration"
  846. config RAM_START
  847. hex "Primary RAM start address (physical)"
  848. default 0x0
  849. ---help---
  850. The physical start address of primary installed RAM. "Primary" RAM
  851. refers to the RAM that you link program code into. If program code
  852. does not execute out of RAM but from FLASH, then you may designate
  853. any block of RAM as "primary."
  854. config RAM_VSTART
  855. hex "Primary RAM start address (virtual)"
  856. default 0x0
  857. depends on ARCH_USE_MMU
  858. ---help---
  859. The virtual start address of installed primary RAM. "Primary" RAM
  860. refers to the RAM that you link program code into. If program code
  861. does not execute out of RAM but from FLASH, then you may designate
  862. any block of RAM as "primary."
  863. config RAM_SIZE
  864. int "Primary RAM size"
  865. default 0
  866. ---help---
  867. The size in bytes of the installed primary RAM. "Primary" RAM
  868. refers to the RAM that you link program code into. If program code
  869. does not execute out of RAM but from FLASH, then you may designate
  870. any block of RAM as "primary."
  871. if BOOT_RUNFROMFLASH && ARCH_USE_MMU
  872. config FLASH_START
  873. hex "Boot FLASH start address (physical)"
  874. default 0x0
  875. ---help---
  876. The physical start address of installed boot FLASH. "Boot" FLASH
  877. refers to the FLASH that you link program code into.
  878. config FLASH_VSTART
  879. hex "Boot FLASH start address (virtual)"
  880. default 0x0
  881. ---help---
  882. The virtual start address of installed boot FLASH. "Boot" FLASH
  883. refers to the FLASH that you link program code into.
  884. config FLASH_SIZE
  885. int "Boot FLASH size"
  886. default 0
  887. ---help---
  888. The size in bytes of the installed boot FLASH. "Boot" FLASH
  889. refers to the FLASH that you link program code into.
  890. endif # BOOT_RUNFROMFLASH && ARCH_USE_MMU
  891. config ARCH_HAVE_SDRAM
  892. bool
  893. default n
  894. config BOOT_SDRAM_DATA
  895. bool "Data in SDRAM"
  896. default n
  897. depends on ARCH_HAVE_SDRAM && !BOOT_RUNFROMSDRAM
  898. ---help---
  899. This selection should be set if data lies in SDRAM (vs. SRAM) and if
  900. SDRAM was not previously initialized by a loader. Obviously, this
  901. does not apply if we booting from SDRAM because SDRAM must have been
  902. initialized priority to loading NuttX into SDRAM.
  903. In the case where SDRAM must be initialized by NuttX, the
  904. initialization sequence is a little different: Normally, .data and
  905. .bss must be initialized before starting the system. But in this
  906. case SDRAM must be configured by board-specific logic before the
  907. .data and .bss sections can be initialized.
  908. endmenu # Boot Memory Configuration