README.txt 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. boards/mips/pic32mx/ubw32 README
  2. ====================
  3. This README file discusses the port of NuttX to the Sparkfun UBW32 board.
  4. This port uses the original v2.5 board which is based on the MicroChip
  5. PIC32MX460F512L. See http://www.sparkfun.com/products/8971. This older
  6. version has been replaced with this board http://www.sparkfun.com/products/9713.
  7. See also http://www.schmalzhaus.com/UBW32/.
  8. Contents
  9. ========
  10. PIC32MX460F512L Pin Out
  11. MAX3232 Connection
  12. Toolchains
  13. Loading NuttX with PICkit2
  14. LEDs
  15. Buttons
  16. PIC32MX Configuration Options
  17. Configurations
  18. PIC32MX460F512L Pin Out
  19. =======================
  20. PIC32MX460F512L 100-Pin TQFP (USB) Pin Out. The mapping to the pins on
  21. the PCL Logic board are very simple, each pin is brought out to a connector
  22. label with the PIC32MX460F512L pin number.
  23. On board logic only manages power, crystal, and USB signals.
  24. LEFT SIDE, TOP-TO-BOTTOM (if pin 1 is in upper left)
  25. ---- ---------------------------- -------------------------------------------------------
  26. PIN NAME Board Connection (omitting pins brought to J3 and J4)
  27. ---- ---------------------------- -------------------------------------------------------
  28. 1 RG15
  29. 2 Vdd
  30. 3 PMD5/RE5
  31. 4 PMD6/RE6 RE6 User switch
  32. 5 PMD7/RE7 RE7 Program switch
  33. 6 T2CK/RC1
  34. 7 T3CK/RC2
  35. 8 T4CK/RC3
  36. 9 T5CK/SDI1/RC4
  37. 10 SCK2/PMA5/CN8/RG6
  38. 11 SDI2/PMA4/CN9/RG7
  39. 12 SDO2/PMA3/CN10/RG8
  40. 13 MCLR
  41. 14 SS2/PMA2/CN11/RG9
  42. 15 Vss
  43. 16 Vdd
  44. 17 TMS/RA0
  45. 18 INT1/RE8
  46. 19 INT2/RE9
  47. 20 AN5/C1IN+/VBUSON/CN7/RB5
  48. 21 AN4/C1IN-/CN6/RB4
  49. 22 AN3/C2IN+/CN5/RB3
  50. 23 AN2/C2IN-/CN4/RB2 RB1 ICSP/Debug/IO (J5) pin 6 (labeled B2)
  51. 24 PGEC1/AN1/CN3/RB1 RB1 ICSP/Debug/IO (J5) pin 7 (labeled B1)
  52. 25 PGED1/AN0/CN2/RB0 RB0 ICSP/Debug/IO (J5) pin 8 (labeled B0)
  53. BOTTOM SIDE, LEFT-TO-RIGHT (if pin 1 is in upper left)
  54. ---- ---------------------------- -------------------------------------------------------
  55. PIN NAME Board Connection (omitting pins brought to J3 and J4)
  56. ---- ---------------------------- -------------------------------------------------------
  57. 26 PGEC2/AN6/OCFA/RB6 PGC ICSP/Debug/IO (J5) pin 5 (labeled PGC)
  58. 27 PGED2/AN7/RB7 PGD ICSP/Debug/IO (J5) pin 4 (labeled PGD)
  59. 28 VREF-/CVREF-/PMA7/RA9
  60. 29 VREF+/CVREF+/PMA6/RA10
  61. 30 AVdd
  62. 31 AVss
  63. 32 AN8/C1OUT/RB8
  64. 33 AN9/C2OUT/RB9
  65. 34 AN10/CVREFOUT/PMA13/RB10
  66. 35 AN11/PMA12/RB11
  67. 36 Vss
  68. 37 Vdd
  69. 38 TCK/RA1
  70. 39 U2RTS/RF13
  71. 40 U2CTS/RF12
  72. 41 AN12/PMA11/RB12
  73. 42 AN13/PMA10/RB13
  74. 43 AN14/PMALH/PMA1/RB14
  75. 44 AN15/OCFB/PMALL/PMA0/CN12/RB15
  76. 45 Vss
  77. 46 Vdd
  78. 47 U1CTS/CN20/RD14
  79. 48 U1RTS/CN21/RD15
  80. 49 U2RX/PMA9/CN17/RF4
  81. 50 U2TX/PMA8/CN18/RF5
  82. RIGHT SIDE, TOP-TO-BOTTOM (if pin 1 is in upper left)
  83. ---- ---------------------------- -------------------------------------------------------
  84. PIN NAME Board Connection (omitting pins brought to J3 and J4)
  85. ---- ---------------------------- -------------------------------------------------------
  86. 75 Vss
  87. 74 SOSCO/T1CK/CN0/RC14
  88. 73 SOSCI/CN1/RC13
  89. 72 SDO1/OC1/INT0/RD0
  90. 71 IC4/PMCS1/PMA14/RD11
  91. 70 SCK1/IC3/PMCS2/PMA15/RD10
  92. 69 SS1/IC2/RD9
  93. 68 RTCC/IC1/RD8
  94. 67 SDA1/INT4/RA15
  95. 66 SCL1/INT3/RA14
  96. 65 Vss
  97. 64 OSC2/CLKO/RC15
  98. 63 OSC1/CLKI/RC12
  99. 62 Vdd
  100. 61 TDO/RA5
  101. 60 TDI/RA4
  102. 59 SDA2/RA3
  103. 58 SCL2/RA2
  104. 57 D+/RG2 D+ Alternate USB (J6) pin 3 (labeled D+)
  105. USB host (JP1) pin
  106. USB Function (Mini B)
  107. 56 D-/RG3 D- Alternate USB (J6) pin 2 (labeled D-)
  108. USB host (JP1) pin
  109. USB Function (Mini B)
  110. 55 VUSB
  111. 54 VBUS VBUS Alternate USB (J6) pin 1 (labeled VBUS)
  112. USB host (JP1) pin
  113. USB Function (Mini B)
  114. Jumper JP1 for USB host functionality
  115. 53 U1TX/RF8
  116. 52 U1RX/RF2
  117. 51 USBID/RF3 USBID Alternate USB (J6) pin 4 (labeled ID)
  118. USB Function (Mini B)
  119. Also USB LED
  120. TOP SIDE, LEFT-TO-RIGHT (if pin 1 is in upper left)
  121. ---- ---------------------------- -------------------------------------------------------
  122. PIN NAME Board Connection (omitting pins brought to J3 and J4)
  123. ---- ---------------------------- -------------------------------------------------------
  124. 100 PMD4/RE4
  125. 99 PMD3/RE3
  126. 98 PMD2/RE2 RE2 LED1
  127. 97 TRD0/RG13
  128. 96 TRD1/RG12
  129. 95 TRD2/RG14
  130. 94 PMD1/RE1 RE1 LED2
  131. 93 PMD0/RE0 RE0 LED3
  132. 92 TRD3/RA7
  133. 91 TRCLK/RA6
  134. 90 PMD8/RG0
  135. 89 PMD9/RG1
  136. 88 PMD10/RF1
  137. 87 PMD11/RF0
  138. 86 ENVREG
  139. 85 Vcap/Vddcore
  140. 84 PMD15/CN16/RD7
  141. 83 PMD14/CN15/RD6
  142. 82 PMRD/CN14/RD5
  143. 81 OC5/PMWR/CN13/RD4
  144. 80 PMD13/CN19/RD13
  145. 79 IC5/PMD12/RD12
  146. 78 OC4/RD3
  147. 77 OC3/RD2
  148. 76 OC2/RD1
  149. MAX3232 Connection
  150. ==================
  151. I use a tiny, MAX3232 board that I got from the eBay made by NKC
  152. Electronics (http://www.nkcelectronics.com/). As of this writing, it
  153. is also available here: http://www.nkcelectronics.com/rs232-to-ttl-3v--55v-convert232356.html
  154. CTS -- Not connected
  155. RTS -- Not connected
  156. TX -- J4 pin 31: U1TX/RF8
  157. RX -- J4 pin 30: U1RX/RF2
  158. GND -- J4 pin 40: GND
  159. Vcc -- J4 pin 39: 5V
  160. Toolchains
  161. ==========
  162. MPLAB/C32
  163. ---------
  164. I am using the free, "Lite" version of the PIC32MX toolchain available
  165. for download from the microchip.com web site. I am using the Windows
  166. version. The MicroChip toolchain is the only toolchain currently
  167. supported in these configurations, but it should be a simple matter to
  168. adapt to other toolchains by modifying the Make.defs file include in
  169. each configuration.
  170. C32 Toolchain Options:
  171. CONFIG_MIPS32_TOOLCHAIN_MICROCHIPW - MicroChip full toolchain for Windows
  172. CONFIG_MIPS32_TOOLCHAIN_MICROCHIPL - MicroChip full toolchain for Linux
  173. CONFIG_MIPS32_TOOLCHAIN_MICROCHIPW_LITE - MicroChip "Lite" toolchain for Windows
  174. CONFIG_MIPS32_TOOLCHAIN_MICROCHIPL_LITE - MicroChip "Lite" toolchain for Linux
  175. CONFIG_MIPS32_TOOLCHAIN_PINGUINOL - Pinquino toolchain for Linux
  176. CONFIG_MIPS32_TOOLCHAIN_PINGUINOW - Pinquino toolchain for Windows
  177. CONFIG_MIPS32_TOOLCHAIN_MICROCHIPOPENL - Microchip open toolchain for Linux
  178. CONFIG_MIPS32_TOOLCHAIN_GNU_ELF - General mips-elf toolchain for Linux
  179. NOTE: The "Lite" versions of the toolchain does not support C++. Also
  180. certain optimization levels are not supported by the "Lite" toolchain.
  181. MicrochipOpen
  182. -------------
  183. An alternative, build-it-yourself toolchain is available here:
  184. http://sourceforge.net/projects/microchipopen/ . These tools were
  185. last updated circa 2010. NOTE: C++ support still not available
  186. in this toolchain.
  187. Building MicrochipOpen (on Linux)
  188. 1) Get the build script from this location:
  189. http://microchipopen.svn.sourceforge.net/viewvc/microchipopen/ccompiler4pic32/buildscripts/trunk/
  190. 2) Build the code using the build script, for example:
  191. ./build.sh -b v105_freeze
  192. This will check out the selected branch and build the tools.
  193. 3) Binaries will then be available in a subdirectory with a name something like
  194. pic32-v105-freeze-20120622/install-image/bin (depending on the current data
  195. and the branch that you selected.
  196. Note that the tools will have the prefix, mypic32- so, for example, the
  197. compiler will be called mypic32-gcc.
  198. Pinguino mips-elf Toolchain
  199. ---------------------------
  200. Another option is the mips-elf toolchain used with the Pinguino project. This
  201. is a relatively current mips-elf GCC and should provide free C++ support as
  202. well. This toolchain can be downloaded from the Pinguino website:
  203. http://wiki.pinguino.cc/index.php/Main_Page#Download .
  204. See also boards/mirtoo/README.txt. There is an experimental (untested)
  205. configuration for the Mirtoo platform in that directory.
  206. MPLAB/C32 vs MPLABX/X32
  207. -----------------------
  208. It appears that Microchip is phasing out the MPLAB/C32 toolchain and replacing
  209. it with MPLABX and XC32. At present, the XC32 toolchain is *not* compatible
  210. with the NuttX build scripts. Here are some of the issues that I see when trying
  211. to build with XC32:
  212. 1) Make.def changes: You have to change the tool prefix:
  213. -CROSSDEV=pic32-
  214. +CROSSDEV=xc32-
  215. 2) debug.ld/release.ld: The like expect some things that are not present in
  216. the current linker scripts (or are expected with different names). Here
  217. are some partial fixes:
  218. Rename: kseg0_progmem to kseg0_program_mem
  219. Rename: kseg1_datamem to kseg1_data_mem
  220. Even then, there are more warnings from the linker and some undefined symbols
  221. for non-NuttX code that resides in the unused Microchip libraries. You will
  222. have to solve at least this undefined symbol problem if you want to used the
  223. XC32 toolchain.
  224. Windows Native Toolchains
  225. -------------------------
  226. NOTE: There are several limitations to using a Windows based toolchain in a
  227. Cygwin environment. The three biggest are:
  228. 1. The Windows toolchain cannot follow Cygwin paths. Path conversions are
  229. performed automatically in the Cygwin makefiles using the 'cygpath' utility
  230. but you might easily find some new path problems. If so, check out 'cygpath -w'
  231. 2. Windows toolchains cannot follow Cygwin symbolic links. Many symbolic links
  232. are used in NuttX (e.g., include/arch). The make system works around these
  233. problems for the Windows tools by copying directories instead of linking them.
  234. But this can also cause some confusion for you: For example, you may edit
  235. a file in a "linked" directory and find that your changes had no effect.
  236. That is because you are building the copy of the file in the "fake" symbolic
  237. directory. If you use a Windows toolchain, you should get in the habit of
  238. making like this:
  239. make clean_context all
  240. An alias in your .bashrc file might make that less painful.
  241. Loading NuttX with PICkit2
  242. ==========================
  243. NOTE: You need a PICKit3 if you plan to use the MPLAB debugger! The PICKit2
  244. can, however, still be used to load programs. Instructions for the PICKit3
  245. are similar.
  246. Intel Hex Forma Files:
  247. ----------------------
  248. When NuttX is built it will produce two files in the top-level NuttX
  249. directory:
  250. 1) nuttx - This is an ELF file, and
  251. 2) nuttx.hex - This is an Intel Hex format file. This is controlled by
  252. the setting CONFIG_INTELHEX_BINARY in the .config file.
  253. The PICkit tool wants an Intel Hex format file to burn into FLASH. However,
  254. there is a problem with the generated nutt.hex: The tool expects the nuttx.hex
  255. file to contain physical addresses. But the nuttx.hex file generated from the
  256. top-level make will have address in the KSEG0 and KSEG1 regions.
  257. tools/pic32/mkpichex:
  258. ----------------------
  259. There is a simple tool in the NuttX tools/pic32 directory that can be
  260. used to solve both issues with the nuttx.hex file. But, first, you must
  261. build the tool:
  262. cd tools/pic32
  263. make -f Makefile.host
  264. Now you will have an executable file call mkpichex (or mkpichex.exe on
  265. Cygwin). This program will take the nutt.hex file as an input, it will
  266. convert all of the KSEG0 and KSEG1 addresses to physical address, and
  267. it will write the modified file, replacing the original nuttx.hex.
  268. To use this file, you need to do the following things:
  269. export PATH =??? # Add the NuttX tools/pic32 directory to your
  270. # PATH variable
  271. make # Build nuttx and nuttx.hex
  272. mkpichex $PWD # Convert addresses in nuttx.hex. $PWD is the path
  273. # to the top-level build directory. It is the only
  274. # required input to mkpichex.
  275. This procedure is automatically performed at the end of a build.
  276. LEDs
  277. ====
  278. ----- ----- -------------------------------------------------------------
  279. LABEL COLOR CONTROL
  280. ----- ----- -------------------------------------------------------------
  281. USB Green RF3. This could be used by software if USB is not used.
  282. Otherwise, RF3 is used as the USBID signal.
  283. LED1 While RE2, Pulled up. Low value illuminates
  284. LED2 Red RE1, Pulled up. Low value illuminates
  285. LED3 Yellow RE0, Pulled up. Low value illuminates
  286. PWR Blue Illuminated when 5V is present, not controlled by software
  287. If CONFIG_ARCH_LEDS is defined, then NuttX will control these LEDs as follows:
  288. ON OFF
  289. ------------------------- ---- ---- ---- ---- ---- ----
  290. LED1 LED2 LED3 LED1 LED2 LED3
  291. ------------------------- ---- ---- ---- ---- ---- ----
  292. LED_STARTED 0 OFF OFF OFF --- --- ---
  293. LED_HEAPALLOCATE 1 ON OFF N/C --- --- ---
  294. LED_IRQSENABLED 2 OFF ON N/C --- --- ---
  295. LED_STACKCREATED 3 ON ON N/C --- --- ---
  296. LED_INIRQ 4 N/C N/C ON N/C N/C OFF
  297. LED_SIGNAL 4 N/C N/C ON N/C N/C OFF
  298. LED_ASSERTION 4 N/C N/C ON N/C N/C OFF
  299. LED_PANIC 5 ON N/C N/C OFF N/C N/C
  300. Buttons
  301. =======
  302. RE6 User switch
  303. RE7 Program switch
  304. PIC32MX Configuration Options
  305. =============================
  306. General Architecture Settings:
  307. CONFIG_ARCH - Identifies the arch/ subdirectory. This should
  308. be set to:
  309. CONFIG_ARCH=mips
  310. CONFIG_ARCH_family - For use in C code:
  311. CONFIG_ARCH_MIPS=y
  312. CONFIG_ARCH_architecture - For use in C code:
  313. CONFIG_ARCH_MIPS32=y
  314. CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory
  315. CONFIG_ARCH_CHIP=pic32mx
  316. CONFIG_ARCH_CHIP_name - For use in C code to identify the exact
  317. chip:
  318. CONFIG_ARCH_CHIP_PIC32MX460F512L=y
  319. CONFIG_ARCH_BOARD - Identifies the boards/ subdirectory and
  320. hence, the board that supports the particular chip or SoC.
  321. CONFIG_ARCH_BOARD=ubw32
  322. CONFIG_ARCH_BOARD_name - For use in C code
  323. CONFIG_ARCH_BOARD_UBW32=y
  324. CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation
  325. of delay loops
  326. CONFIG_ENDIAN_BIG - define if big endian (default is little
  327. endian)
  328. CONFIG_RAM_SIZE - Describes the installed DRAM (CPU SRAM in this case):
  329. CONFIG_RAM_SIZE=(32*1024) (32Kb)
  330. There is an additional 32Kb of SRAM in AHB SRAM banks 0 and 1.
  331. CONFIG_RAM_START - The start address of installed DRAM
  332. CONFIG_RAM_START=0xa0000000
  333. CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to boards that
  334. have LEDs
  335. CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
  336. stack. If defined, this symbol is the size of the interrupt
  337. stack in bytes. If not defined, the user task stacks will be
  338. used during interrupt handling.
  339. CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions
  340. CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to board architecture.
  341. PIC32MX Configuration
  342. CONFIG_PIC32MX_MVEC - Select muli- vs. single-vectored interrupts
  343. Individual subsystems can be enabled:
  344. CONFIG_PIC32MX_WDT - Watchdog timer
  345. CONFIG_PIC32MX_T2 - Timer 2 (Timer 1 is the system time and always enabled)
  346. CONFIG_PIC32MX_T3 - Timer 3
  347. CONFIG_PIC32MX_T4 - Timer 4
  348. CONFIG_PIC32MX_T5 - Timer 5
  349. CONFIG_PIC32MX_IC1 - Input Capture 1
  350. CONFIG_PIC32MX_IC2 - Input Capture 2
  351. CONFIG_PIC32MX_IC3 - Input Capture 3
  352. CONFIG_PIC32MX_IC4 - Input Capture 4
  353. CONFIG_PIC32MX_IC5 - Input Capture 5
  354. CONFIG_PIC32MX_OC1 - Output Compare 1
  355. CONFIG_PIC32MX_OC2 - Output Compare 2
  356. CONFIG_PIC32MX_OC3 - Output Compare 3
  357. CONFIG_PIC32MX_OC4 - Output Compare 4
  358. CONFIG_PIC32MX_OC5 - Output Compare 5
  359. CONFIG_PIC32MX_I2C1 - I2C 1
  360. CONFIG_PIC32MX_I2C2 - I2C 2
  361. CONFIG_PIC32MX_SPI1 - SPI 1
  362. CONFIG_PIC32MX_SPI2 - SPI 2
  363. CONFIG_PIC32MX_UART1 - UART 1
  364. CONFIG_PIC32MX_UART2 - UART 2
  365. CONFIG_PIC32MX_ADC - ADC 1
  366. CONFIG_PIC32MX_PMP - Parallel Master Port
  367. CONFIG_PIC32MX_CM1 - Comparator 1
  368. CONFIG_PIC32MX_CM2 - Comparator 2
  369. CONFIG_PIC32MX_RTCC - Real-Time Clock and Calendar
  370. CONFIG_PIC32MX_DMA - DMA
  371. CONFIG_PIC32MX_FLASH - FLASH
  372. CONFIG_PIC32MX_USBDEV - USB device
  373. CONFIG_PIC32MX_USBHOST - USB host
  374. PIC32MX Configuration Settings
  375. DEVCFG0:
  376. CONFIG_PIC32MX_DEBUGGER - Background Debugger Enable. Default 3 (disabled). The
  377. value 2 enables.
  378. CONFIG_PIC32MX_ICESEL - In-Circuit Emulator/Debugger Communication Channel Select
  379. Default 1 (PG2)
  380. CONFIG_PIC32MX_PROGFLASHWP - Program FLASH write protect. Default 0xff (disabled)
  381. CONFIG_PIC32MX_BOOTFLASHWP - Default 1 (disabled)
  382. CONFIG_PIC32MX_CODEWP - Default 1 (disabled)
  383. DEVCFG1: (All settings determined by selections in board.h)
  384. DEVCFG2: (All settings determined by selections in board.h)
  385. DEVCFG3:
  386. CONFIG_PIC32MX_USBIDO - USB USBID Selection. Default 1 if USB enabled
  387. (USBID pin is controlled by the USB module), but 0 (GPIO) otherwise.
  388. CONFIG_PIC32MX_VBUSIO - USB VBUSON Selection (Default 1 if USB enabled
  389. (VBUSON pin is controlled by the USB module, but 0 (GPIO) otherwise.
  390. CONFIG_PIC32MX_WDENABLE - Enabled watchdog on power up. Default 0 (watchdog
  391. can be enabled later by software).
  392. The priority of interrupts may be specified. The value ranage of
  393. priority is 4-31. The default (16) will be used if these any of these
  394. are undefined.
  395. CONFIG_PIC32MX_CTPRIO - Core Timer Interrupt
  396. CONFIG_PIC32MX_CS0PRIO - Core Software Interrupt 0
  397. CONFIG_PIC32MX_CS1PRIO - Core Software Interrupt 1
  398. CONFIG_PIC32MX_INT0PRIO - External Interrupt 0
  399. CONFIG_PIC32MX_INT1PRIO - External Interrupt 1
  400. CONFIG_PIC32MX_INT2PRIO - External Interrupt 2
  401. CONFIG_PIC32MX_INT3PRIO - External Interrupt 3
  402. CONFIG_PIC32MX_INT4PRIO - External Interrupt 4
  403. CONFIG_PIC32MX_FSCMPRIO - Fail-Safe Clock Monitor
  404. CONFIG_PIC32MX_T1PRIO - Timer 1 (System timer) priority
  405. CONFIG_PIC32MX_T2PRIO - Timer 2 priority
  406. CONFIG_PIC32MX_T3PRIO - Timer 3 priority
  407. CONFIG_PIC32MX_T4PRIO - Timer 4 priority
  408. CONFIG_PIC32MX_T5PRIO - Timer 5 priority
  409. CONFIG_PIC32MX_IC1PRIO - Input Capture 1
  410. CONFIG_PIC32MX_IC2PRIO - Input Capture 2
  411. CONFIG_PIC32MX_IC3PRIO - Input Capture 3
  412. CONFIG_PIC32MX_IC4PRIO - Input Capture 4
  413. CONFIG_PIC32MX_IC5PRIO - Input Capture 5
  414. CONFIG_PIC32MX_OC1PRIO - Output Compare 1
  415. CONFIG_PIC32MX_OC2PRIO - Output Compare 2
  416. CONFIG_PIC32MX_OC3PRIO - Output Compare 3
  417. CONFIG_PIC32MX_OC4PRIO - Output Compare 4
  418. CONFIG_PIC32MX_OC5PRIO - Output Compare 5
  419. CONFIG_PIC32MX_I2C1PRIO - I2C 1
  420. CONFIG_PIC32MX_I2C2PRIO - I2C 2
  421. CONFIG_PIC32MX_SPI1PRIO - SPI 1
  422. CONFIG_PIC32MX_SPI2PRIO - SPI 2
  423. CONFIG_PIC32MX_UART1PRIO - UART 1
  424. CONFIG_PIC32MX_UART2PRIO - UART 2
  425. CONFIG_PIC32MX_CN - Input Change Interrupt
  426. CONFIG_PIC32MX_ADCPRIO - ADC1 Convert Done
  427. CONFIG_PIC32MX_PMPPRIO - Parallel Master Port
  428. CONFIG_PIC32MX_CM1PRIO - Comparator 1
  429. CONFIG_PIC32MX_CM2PRIO - Comparator 2
  430. CONFIG_PIC32MX_FSCMPRIO - Fail-Safe Clock Monitor
  431. CONFIG_PIC32MX_RTCCPRIO - Real-Time Clock and Calendar
  432. CONFIG_PIC32MX_DMA0PRIO - DMA Channel 0
  433. CONFIG_PIC32MX_DMA1PRIO - DMA Channel 1
  434. CONFIG_PIC32MX_DMA2PRIO - DMA Channel 2
  435. CONFIG_PIC32MX_DMA3PRIO - DMA Channel 3
  436. CONFIG_PIC32MX_FCEPRIO - Flash Control Event
  437. CONFIG_PIC32MX_USBPRIO - USB
  438. PIC32MXx specific device driver settings
  439. CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the
  440. console and ttys0 (default is the UART0).
  441. CONFIG_UARTn_RXBUFSIZE - Characters are buffered as received.
  442. This specific the size of the receive buffer
  443. CONFIG_UARTn_TXBUFSIZE - Characters are buffered before
  444. being sent. This specific the size of the transmit buffer
  445. CONFIG_UARTn_BAUD - The configure BAUD of the UART. Must be
  446. CONFIG_UARTn_BITS - The number of bits. Must be either 7 or 8.
  447. CONFIG_UARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity
  448. CONFIG_UARTn_2STOP - Two stop bits
  449. PIC32MXx USB Device Configuration
  450. PIC32MXx USB Host Configuration (the PIC32MX does not support USB Host)
  451. Configurations
  452. ==============
  453. Each PIC32MX configuration is maintained in a sub-directory and can be
  454. selected as follow:
  455. tools/configure.sh ubw32:<subdir>
  456. Where <subdir> is one of the following:
  457. nsh:
  458. This is the NuttShell (NSH) using the NSH startup logic at
  459. apps/examples/nsh.
  460. NOTES:
  461. 1. This configuration uses the mconf-based configuration tool. To
  462. change this configurations using that tool, you should:
  463. a. Build and install the kconfig-mconf tool. See nuttx/README.txt
  464. see additional README.txt files in the NuttX tools repository.
  465. b. Execute 'make menuconfig' in nuttx/ in order to start the
  466. reconfiguration process.
  467. 2. Serial Output
  468. The OS test produces all of its test output on the serial console.
  469. This configuration has UART1 enabled as a serial console.
  470. TX -- J4 pin 31: U1TX/RF8
  471. RX -- J4 pin 30: U1RX/RF2
  472. GND -- J4 pin 40: GND
  473. Vcc -- J4 pin 39: 5V
  474. 3. USB Configurations
  475. Several USB device configurations can be enabled and included
  476. as NSH built-in built in functions.
  477. All USB device configurations require the following basic setup in
  478. your NuttX configuration file to enable USB device support:
  479. CONFIG_USBDEV=y : Enable basic USB device support
  480. CONFIG_PIC32MX_USBDEV=y : Enable PIC32 USB device support
  481. system/cdcacm - The system/cdcacm program can be included as an
  482. function by adding the following to the NuttX configuration file:
  483. CONFIG_SYSTEM_CDCACM=y
  484. and defining the following in your .config file:
  485. CONFIG_CDCACM=y : Enable the CDCACM device