README.txt 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982
  1. boards/mips/pic32mx/mirtoo README
  2. =====================
  3. This README file discusses the port of NuttX to the DTX1-4000L "Mirtoo" module.
  4. This module uses MicroChip PIC32MX250F128D and the Dimitech DTX1-4000L EV-kit1
  5. V2. See http://www.dimitech.com/ for further information.
  6. Contents
  7. ========
  8. PIC32MX250F128D Pin Out
  9. Toolchains
  10. Loading NuttX with ICD3
  11. LED Usage
  12. UART Usage
  13. Analog Input
  14. PIC32MX Configuration Options
  15. Configurations
  16. PIC32MX250F128D Pin Out
  17. =======================
  18. PIC32MX250F128D 44 pin package.
  19. PIN PIC32 SIGNAL(s) BOARD SIGNAL/USAGE EV-Kit1 CONNECTION
  20. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  21. 1 RPB9/SDA1/CTED4/PMD3/RB9 FUNC3 FUNC3, to X3, pin3
  22. RPB9 Peripheral pin selection RB9
  23. SDA1 I2C1 data
  24. CTED4 CTMU External Edge Input 4
  25. PMD3 Parallel Master Port data bit 3
  26. RB9 PORTB, Pin 9
  27. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  28. 2 RPC6/PMA1/RC6 FUNC5 FUNC5, to X3, pin5
  29. RPC6 Peripheral pin selection RC6
  30. PMA1 Parallel Master Port Address bit 1
  31. RC6 PORTC, Pin 6
  32. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  33. 3 RPC7/PMA0/RC7 PEN, PGA117 ENA pin Not available off module
  34. RPC7 Peripheral pin selection RC7 Not available
  35. PMA0 Parallel Master Port Address bit 0 Not available
  36. RC7 PORTC, Pin 7 Used for PGA117 ENA output
  37. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  38. 4 RPC8/PMA5/RC8 LED0 Not available off module
  39. RPC8 Peripheral Selection, PORTC, Pin 8 Not available
  40. PMA5 Parallel Master Port Address bit 5 Not available
  41. RC8 PORTC, Pin 8 Used to drive LED0
  42. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  43. 5 RPC9/CTED7/PMA6/RC9 LED1 Not available off module
  44. RPC9 Peripheral Selection, PORTC, Pin 9 Not available
  45. CTED7 CTMU External Edge Input 7 Not available
  46. PMA6 Parallel Master Port Address bit 6 Not available
  47. RC9 PORTC, Pin 9 Used to drive LED1
  48. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  49. 6 VSS VSS Not available off module
  50. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  51. 7 VCAP VCAP Not available off module
  52. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  53. 8 PGED2/RPB10/D+/CTED11/RB10 FUNC0 FUNC0, to FT230XS RXD and debug port
  54. PGED2 Debug Channel 2 data Used at boot time for ICD3
  55. RPB10 Peripheral Selection, PORTB, Pin 10 Used for UART RXD
  56. D+ USB D+ Not available
  57. CTED11 CTMU External Edge Input 11 Not available
  58. RB10 PORTB, Pin 10 Not available
  59. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  60. 9 PGEC2/RPB11/D-/RB11 FUNC1 FUNC1, to FT230XS TXD
  61. PGEC2 Debug Channel 2 clock Used at boot time for ICD3
  62. RPB11 Peripheral Selection, PORTB, Pin 11 Used for UART TXD
  63. D- USB D- Not available
  64. RB11 PORTB, Pin 11 Not available
  65. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  66. 10 VUSB3V3 3.3V (via VBAT, Pin 1)
  67. VUSB3V3 USB internal transceiver supply 3.3V
  68. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  69. 11 AN11/RPB13/CTPLS/PMRD/RB13 ~CSM SST25VF3032B Chip Select Not available off-module
  70. AN11 Analog input channel 11 Not available
  71. RPB13 Peripheral Selection, PORTB, Pin 12 Not available
  72. CTPLS CTMU Pulse Output Not available
  73. PMRD Parallel Master Port read strobe Not available
  74. RB13 PORTB, Pin 12 Used for SST25VF3032B Chip Select
  75. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  76. 12 PGED/TMS/PMA10/RA10 DIN5 PORT5, to X7, pin 2
  77. PGED4 Debug Channel 4 data (?) (also X13, pin6)
  78. TMS JTAG Test mode select pin (?)
  79. PMA10 Parallel Master Port Address bit 10 Not available
  80. RA10 PORTA, Pin 10 May be used as GPIO input
  81. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  82. 13 PGEC/TCK/CTED8/PMA7/RA7 DIN2 PORT2, to X4, pin 2
  83. PGEC4 Debug Channel 4 clock Not available (also X13, pin5)
  84. TCK JTAG test clock input pin May be used as JTAG clock input
  85. CTED8 CTMU External Edge Input 8 May be used as CTMU input
  86. PMA7 Parallel Master Port Address bit 7 Not available
  87. RA7 PORTA, Pin 7 May be used as GPIO input
  88. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  89. 14 CVREF/AN10/C3INB/RPB14/VBUSON/SCK1/CTED5/RB14 FUNC5 (through resistor) FUNC5, to X3, pin5
  90. CVREFOUT Comparator Voltage Reference output
  91. AN10 Analog input channel 10
  92. C3INB Comparator 3 Input B
  93. RPB14 Peripheral Selection, PORTB, Pin 14
  94. VBUSON USB Host and OTG bus power control
  95. SCK1 SPI1 clock
  96. CTED5 CTMU External Edge Input 5
  97. RB14 PORTB, Pin 14
  98. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  99. 15 AN9/C3INA/RPB15/SCK2/CTED6/PMCS1/RB15 SCK Not available off module
  100. AN9 Analog input channel 9 Not available
  101. C3INA Comparator 3 Input A Not available
  102. RPB15 Peripheral Selection, PORTB, Pin 15 Not available
  103. SCK2 SPI2 clock Used for SPI2 clock
  104. CTED6 CTMU External Edge Input 6 Not available
  105. PMCS1 Parallel Master Port Chip Select 1 Not available
  106. RB15 PORTB, Pin 15 Not available
  107. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  108. 16 AVSS AVSS Not available off module
  109. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  110. 17 AVDD AVDD Not available off module
  111. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  112. 18 ~MCLR ~MCLR, TC2030-NL, pin 1 Not available off module
  113. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  114. 19 PGED3/VREF+/CVREF+/AN0/C3INC/RPA0/CTED1/PMD7/RA0 AIN PGA117 Vout
  115. AN0 Analog input channel 0 AIN
  116. RA0 PORTA, Pin 0 Not available
  117. CVREF+ Comparator Voltage Reference (high) (?)
  118. C3INC Comparator 3 Input C (?)
  119. PMD7 Parallel Master Port data bit 7 Not available
  120. CTED1 CTMU External Edge Input 1 Not available
  121. PGED3 Debug Channel 3 data Not available
  122. VREF+ Analog voltage reference (high) Not available
  123. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  124. 20 PGEC3/VREF-/CVREF-/AN1/RPA1/CTED2/PMD6/RA1 SI Not available off module
  125. PGEC3 Debug Channel 3 clock Not available
  126. VREF- Analog voltage reference (low) Not available
  127. CVREF- Comparator Voltage Reference (low) Not available
  128. AN1 Analog input channel 1 Not available
  129. RPA1 Peripheral Selection PORTA, Pin 1 Used for SI
  130. CTED2 CTMU External Edge Input 2 Not available
  131. PMD6 Parallel Master Port data bit 6 Not available
  132. RA1 PORTA, Pin 1 Not available
  133. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  134. 21 PGED1/AN2/C1IND/C2INB/C3IND/RPB0/PMD0/RB0 DIN6 PORT6, to X9, pin 2
  135. PGED1 Debug Channel 1 data Not available (also X13, pin4)
  136. AN2 Analog input channel 2 Not available (digital input only)
  137. C1IND Comparator 1 Input D Not available (digital input only)
  138. C2INB Comparator 2 Input B Not available (digital input only)
  139. C3IND Comparator 3 Input D Not available (digital input only)
  140. RPB0 Peripheral Selection PORTB, Pin 0 May be used for peripheral input
  141. PMD0 Parallel Master Port data bit 0 Not available
  142. RB0 PORTB, Pin 0 May be used for GPIO input
  143. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  144. 22 PGEC1/AN3/C1INC/C2INA/RPB1/CTED12/PMD1/RB1 DIN7 PORT7, to X10, pin 2
  145. PGEC1 Debug Channel 1 clock (?) (also X13, pin2)
  146. AN3 Analog input channel 3 Not available (digital input only)
  147. C1INC Comparator 1 Input C Not available (digital input only)
  148. C2INA Comparator 2 Input A Not available (digital input only)
  149. RPB1 Peripheral Selection, PORTB, Pin 1 May be used for peripheral input
  150. PMD1 Parallel Master Port data bit 1 Not available
  151. CTED12 CTMU External Edge Input 12 May be used as CTMU input
  152. RB1 PORTB, Pin 1 May be used as GPIO input
  153. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  154. 23 AN4/C1INB/C2IND/RPB2/SDA2/CTED13/PMD2/CNB2/RB2 DOUT0 PORT0, to X1, pin 2
  155. AN4 Analog input channel 4 Not available (digital output only) (also X13, pin1)
  156. C1INB Comparator 1 Input B Not available (digital output only)
  157. C2IND Comparator 2 Input D Not available (digital output only)
  158. RPB2 Peripheral Selection PORTB, Pin 2 May be used for peripheral output
  159. SDA2 I2C2 data Not available(?)
  160. CTED13 CTMU External Edge Input 13 Not available
  161. PMD2 Parallel Master Port data bit 2 Not available
  162. CNB2 PORTB, Pin 2 Change Notification Not available
  163. RB2 PORTB, Pin 2 May be for GPIO output
  164. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  165. 24 AN5/C1INA/C2INC/RTCC/RPB3/SCL2/PMWR/CNB3/RB3 DOUT1 PORT1, to X2, pin 2
  166. AN5 Analog input channel 5 Not available (digital output only) (also X13, pin3)
  167. C1INA Comparator 1 Input A Not available (digital output only)
  168. C2INC Comparator 2 Input C Not available (digital output only)
  169. RTCC Real-Time Clock alarm output May be used for RTCC output
  170. RPB3 Peripheral Selection, PORTB, Pin 3 May be used for peripheral output
  171. SCL2 I2C2 clock (?)
  172. PMWR Parallel Master Port write strobe Not available
  173. CNB3 PORTB, Pin 3 Change Notification Not available
  174. RB3 PORTB, Pin 3 May be used for GPIO output
  175. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  176. 25 AN6/RPC0/RC0 DOUT3 PORT3, to X5, pin 2
  177. AN6 Analog input channel 6 Not available (digital output only) (also X13, pin7)
  178. RPC0 Peripheral Selection, PORTC, Pin 0 May be used for peripheral output
  179. RC0 PORTC, Pin 0 May be used for GPIO output
  180. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  181. 26 AN7/RPC1/RC1 DOUT4 PORT4, to X6, pin 2
  182. AN7 Analog input channel 7 Not available (digital output only) (also X13, pin8)
  183. RPC1 Peripheral Selection, PORTC, Pin 1 May be used for peripheral output
  184. RC1 PORTC, Pin 1 May be used for GPIO output
  185. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  186. 27 AN8/RPC2/PMA2/RC2 DOUT5 PORT5, to X7, pin 2
  187. AN8 Analog input channel 8 Not available (digital output only) (also X13, pin6)
  188. RPC2 Peripheral Selection, PORTC, Pin 2 May be used for peripheral output
  189. PMA2 Parallel Master Port Address bit 2 Not available
  190. RC2 PORTC, Pin 2 May be used for GPIO output
  191. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  192. 28 VDD VDD Not available off module
  193. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  194. 29 VSS VSS Not available off module
  195. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  196. 30 OSC1/CLKI/RPA2/RA2 SO (R1) DIN0 (R2) Not available off module
  197. OSC1 Oscillator crystal input Not available
  198. CLKI External clock source input Not available
  199. RPRA2 Peripheral Selection PORTA, Pin 2 Used for SO
  200. RA2 PORTA, Pin 2 Not available
  201. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  202. 31 OSC2/CLKO/RPA3/RA3 DIN0 (R1) DIN3 (R2) PORT0, to X1, pin 2
  203. OSC2 Oscillator crystal output Not available (also X13, pin1)
  204. CLKO Oscillator crystal output Not available
  205. RPA3 Peripheral Selection for PORTA, Pin 3 May be used for peripheral input
  206. RA3 PORTA, Pin 3 May be used for GPIO input
  207. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  208. 32 TDO/RPA8/PMA8/RA8 DIN3 (R1) S0 (R2) PORT3, to X5, pin 2
  209. TDO JTAG test data output pin Not available (also X13, pin7)
  210. RPA8 PORTA, Pin 8 May be used for peripheral input
  211. PMA8 Parallel Master Port Address bit 8 Not available
  212. RA8 PORTA, Pin 8 May be used for GPIO input
  213. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  214. 33 SOSCI/RPB4/RB4 DOUT2 PORT2, to X4, pin 2
  215. SOSCI 32.768 kHz crystal input Not available (also X13, pin5)
  216. RPB4 Peripheral Seclection, PORTB, Pin 4 May be used for peripheral output
  217. RB4 PORTB, Pin 4 May be used for GPIO output
  218. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  219. 34 SOSCO/RPA4/T1CK/CTED9/RA4 DIN1 PORT1, to X2, pin 2
  220. SOSCO 32.768 kHz crystal output Not available (also X13, pin3)
  221. RPA4 Peripheral Selection PORTA, Pin 4 May be used for peripheral input
  222. T1CK Timer1 external clock input May be used for timer 1 input
  223. CTED9 CTMU External Edge Input 9 May be used for CTMU input
  224. RA4 PORTA, Pin 4 May be used as GPIO input
  225. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  226. 35 TDI/RPA9/PMA9/RA9 DIN4 PORT4, to X6, pin 2
  227. TDI JTAG test data input pin May be used for JTAG input (also X13, pin8)
  228. RPA9 Peripheral Selection for PORTA, Pin 9 May be used for peripheral input
  229. PMA9 Parallel Master Port Address bit 9 Not available
  230. RA9 PORTA, Pin 9 May be used for GPIO input
  231. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  232. 36 AN12/RPC3/RC3 DOUT6 PORT6, to X9, pin 2
  233. AN12 Analog input channel 12 Not available (digtial output only) (also X13, pin4)
  234. RPC3 Peripheral Selection, PORTC, Pin 3 May be used for peripheral output
  235. RC3 PORTC, Pin 3 May be used for GPIO output
  236. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  237. 37 RPC4/PMA4/RC4 DOUT7 PORT7, to X10, pin 2
  238. RPC4 Peripheral Selection, PORTC, Pin 4 May be used for peripheral output (also X13, pin2)
  239. PMA4 Parallel Master Port Address bit 4 Not available
  240. RC4 PORTC, Pin 4 May be used for GPIO output
  241. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  242. 38 RPC5/PMA3/RC5 FUNC4 FUNC4, to X3, pin4
  243. RPC5 Peripheral Selection, PORTC, Pin 5
  244. PMA3 Parallel Master Port Address bit 3
  245. RC5 PORTC, Pin 5
  246. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  247. 39 VSS VSS Not available off module
  248. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  249. 40 VDD VDD Not available off module
  250. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  251. 41 RPB5/USBID/RB5 FUNC3 FUNC3, to X3, pin3
  252. RPB5 Peripheral Selection, PORTB, Pin 5
  253. USBID 41 USB OTG ID detect
  254. RB5 41 PORTB, Pin 5
  255. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  256. 42 VBUS FUNC2 FUNC2, to X3, pin2
  257. VBUS Analog USB bus power monitor
  258. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  259. 43 RPB7/CTED3/PMD5/INT0/RB7 PGA117 ~CSAI Not available off module
  260. RPB7 Peripheral Selection, PORTB, Pin 7
  261. CTED3 CTMU External Edge Input 3
  262. PMD5 Parallel Master Port data bit 5
  263. INT0 External Interrupt 0
  264. RB7 PORTB, Pin 7
  265. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  266. 44 RPB8/SCL1/CTED10/PMD4/RB8 FUNC2 FUNC2
  267. RPB8 PORTB, Pin 8
  268. SCL1 I2C1 clock
  269. CTED10 CTMU External Edge Input 10
  270. PMD4 Parallel Master Port data bit 4
  271. RB8 PORTB, Pin 8
  272. --- ------------------------------------------------ ---------------------------------- ----------------------------------
  273. Additional signals available via Peripheral Pin Selections (PPS)
  274. ----------------------------------------------------------------
  275. REFCLKI Reference Input Clock
  276. REFCLKO Reference Output Clock
  277. IC1 Capture Inputs 1
  278. IC2 Capture Inputs 2
  279. IC3 Capture Inputs 3
  280. IC4 Capture Inputs 4
  281. IC5 Capture Inputs 5
  282. OC1 Output Compare Output 1
  283. OC2 Output Compare Output 2
  284. OC3 Output Compare Output 3
  285. OC4 Output Compare Output 4
  286. OC5 Output Compare Output 5
  287. OCFA Output Compare Fault A Input
  288. OCFB Output Compare Fault B Input
  289. INT1 External Interrupt 1
  290. INT2 External Interrupt 2
  291. INT3 External Interrupt 3
  292. INT4 External Interrupt 4
  293. T2CK Timer2 external clock input
  294. T3CK Timer3 external clock input
  295. T4CK Timer4 external clock input
  296. T5CK Timer5 external clock input
  297. U1CTS UART1 clear to send
  298. U1RTS UART1 ready to send
  299. U1RX UART1 receive
  300. U1TX UART1 transmit
  301. U2CTS UART2 clear to send
  302. U2RTS UART2 ready to send
  303. U2RX UART2 receive
  304. U2TX UART2 transmit
  305. SDI1 SPI1 data in
  306. SDO1 SPI1 data out
  307. SS1 SPI1 slave synchronization or frame pulse I/O
  308. SDI2 SPI2 data in
  309. SDO2 SPI2 data out
  310. SS2 SPI2 slave synchronization or frame pulse I/O
  311. C1OUT Comparator 1 Output
  312. C2OUT Comparator 2 Output
  313. C3OUT Comparator 3 Output
  314. Toolchains
  315. ==========
  316. Note that in addition to the configuration options listed below, the
  317. toolchain can be configured using the kconfig-mconf utility ('make menuconfig')
  318. or by passing CONFIG_MIPS32_TOOLCHAIN=<toolchain> to make, where
  319. <toolchain> is one of GNU_ELF, MICROCHIPL, MICROCHIPW, MICROCHIPL_LITE,
  320. MICROCHIPW_LITE, MICROCHIPOPENL or PINGUINOW as described below.
  321. MPLAB/C32
  322. ---------
  323. I am using the free, "Lite" version of the PIC32MX toolchain available
  324. for download from the microchip.com web site. I am using the Windows
  325. version. The MicroChip toolchain is the only toolchain currently
  326. supported in these configurations, but it should be a simple matter to
  327. adapt to other toolchains by modifying the Make.defs file include in
  328. each configuration.
  329. Toolchain Options:
  330. CONFIG_MIPS32_TOOLCHAIN_MICROCHIPW - MicroChip full toolchain for Windows (C32)
  331. CONFIG_MIPS32_TOOLCHAIN_MICROCHIPL - MicroChip full toolchain for Linux (C32)
  332. CONFIG_MIPS32_TOOLCHAIN_MICROCHIPW_LITE - MicroChip LITE toolchain for Windows (C32)
  333. CONFIG_MIPS32_TOOLCHAIN_MICROCHIPL_LITE - MicroChip LITE toolchain for Linux (C32)
  334. NOTE: The "Lite" versions of the toolchain does not support C++. Also
  335. certain optimization levels are not supported by the Lite toolchain.
  336. MicrochipOpen
  337. -------------
  338. An alternative, build-it-yourself toolchain is available here:
  339. http://sourceforge.net/projects/microchipopen/ . These tools were
  340. last updated circa 2010. NOTE: C++ support still not available
  341. in this toolchain. Use this configuration option to select the microchipopen
  342. toolchain:
  343. CONFIG_MIPS32_TOOLCHAIN_MICROCHIPOPENL - microchipOpen toolchain for Linux
  344. And set the path appropriately in the PATH environment variable.
  345. Building MicrochipOpen (on Linux)
  346. ---------------------------------
  347. 1) Get the build script from this location:
  348. http://microchipopen.svn.sourceforge.net/viewvc/microchipopen/ccompiler4pic32/buildscripts/trunk/
  349. 2) Build the code using the build script, for example:
  350. ./build.sh -b v105_freeze
  351. This will check out the selected branch and build the tools.
  352. 3) Binaries will then be available in a subdirectory with a name something like
  353. pic32-v105-freeze-20120622/install-image/bin (depending on the current data
  354. and the branch that you selected.
  355. Note that the tools will have the prefix, mypic32- so, for example, the
  356. compiler will be called mypic32-gcc.
  357. Pinguino mips-elf / Generic mips-elf Toolchain
  358. ---------------------------
  359. Another option is the mips-elf toolchain used with the Pinguino project. This
  360. is a relatively current mips-elf GCC and should provide free C++ support as
  361. well. This toolchain can be downloaded from the Pinguino website:
  362. http://wiki.pinguino.cc/index.php/Main_Page#Download .
  363. Support for the Pinguino mips-elf toolchain has been included in the Mirtoo
  364. configurations. Use one of these configuration options to select the Pinguino
  365. mips-elf toolchain:
  366. CONFIG_MIPS32_TOOLCHAIN_PINGUINOW - Pinguino mips-elf toolchain for Windows
  367. CONFIG_MIPS32_TOOLCHAIN_GNU_ELF - mips-elf toolchain for Linux or macOS
  368. And set the path appropriately in the PATH environment variable. These tool
  369. configurations are untested -- expect some additional integration issues.
  370. Good luck!
  371. This configuration will also work with any generic mips-elf GCC past version
  372. 4.6 or so.
  373. MPLAB/C32 vs MPLABX/X32
  374. -----------------------
  375. It appears that Microchip is phasing out the MPLAB/C32 toolchain and replacing
  376. it with MPLABX and XC32. At present, the XC32 toolchain is *not* compatible
  377. with the NuttX build scripts. Here are some of the issues that I see when trying
  378. to build with XC32:
  379. 1) Make.def changes: You have to change the tool prefix:
  380. CROSSDEV=xc32-
  381. 2) debug.ld/release.ld: The linker expects some things that are not present in
  382. the current linker scripts (or are expected with different names). Here
  383. are some partial fixes:
  384. Rename: kseg0_progmem to kseg0_program_mem
  385. Rename: kseg1_datamem to kseg1_data_mem
  386. Even then, there are more warnings from the linker and some undefined symbols
  387. for non-NuttX code that resides in the unused Microchip libraries. You will
  388. have to solve at least this undefined symbol problem if you want to used thei
  389. XC32 toolchain.
  390. Windows Native Toolchains
  391. -------------------------
  392. NOTE: There are several limitations to using a Windows based toolchain in a
  393. Cygwin environment. The three biggest are:
  394. 1. The Windows toolchain cannot follow Cygwin paths. Path conversions are
  395. performed automatically in the Cygwin makefiles using the 'cygpath' utility
  396. but you might easily find some new path problems. If so, check out 'cygpath -w'
  397. 2. Windows toolchains cannot follow Cygwin symbolic links. Many symbolic links
  398. are used in NuttX (e.g., include/arch). The make system works around these
  399. problems for the Windows tools by copying directories instead of linking them.
  400. But this can also cause some confusion for you: For example, you may edit
  401. a file in a "linked" directory and find that your changes had no effect.
  402. That is because you are building the copy of the file in the "fake" symbolic
  403. directory. If you use a Windows toolchain, you should get in the habit of
  404. making like this:
  405. make clean_context all
  406. An alias in your .bashrc file might make that less painful.
  407. Loading NuttX with ICD3
  408. ========================
  409. Intel Hex Format Files:
  410. -----------------------
  411. When NuttX is built it will produce two files in the top-level NuttX
  412. directory:
  413. 1) nuttx - This is an ELF file, and
  414. 2) nuttx.hex - This is an Intel Hex format file. This is controlled by
  415. the setting CONFIG_INTELHEX_BINARY in the .config file.
  416. The PICkit tool wants an Intel Hex format file to burn into FLASH. However,
  417. there is a problem with the generated nutt.hex: The tool expects the nuttx.hex
  418. file to contain physical addresses. But the nuttx.hex file generated from the
  419. top-level make will have address in the KSEG0 and KSEG1 regions.
  420. tools/pic32/mkpichex:
  421. ----------------------
  422. There is a simple tool in the NuttX tools/pic32 directory that can be
  423. used to solve both issues with the nuttx.hex file. But, first, you must
  424. build the tool:
  425. cd tools/pic32
  426. make -f Makefile.host
  427. Now you will have an executable file call mkpichex (or mkpichex.exe on
  428. Cygwin). This program will take the nutt.hex file as an input, it will
  429. convert all of the KSEG0 and KSEG1 addresses to physical address, and
  430. it will write the modified file, replacing the original nuttx.hex.
  431. To use this file, you need to do the following things:
  432. export PATH=??? # Add the NuttX tools/pic32 directory to your
  433. # PATH variable
  434. make # Build nuttx and nuttx.hex
  435. mkpichex $PWD # Convert addresses in nuttx.hex. $PWD is the path
  436. # to the top-level build directory. It is the only
  437. # required input to mkpichex.
  438. This procedure is automatically performed at the end of a build.
  439. LED Usage
  440. =========
  441. The Mirtoo module has 2 user LEDs labeled LED0 and LED1 in the schematics:
  442. --- ----- --------------------------------------------------------------
  443. PIN Board Notes
  444. --- ----- --------------------------------------------------------------
  445. RC8 LED0 Grounded, high value illuminates
  446. RC9 LED1 Grounded, high value illuminates
  447. The Dimitech DTX1-4000L EV-kit1 supports 3 more LEDs, but there are not
  448. controllable from software.
  449. If CONFIG_ARCH_LEDS is defined, then NuttX will control these LEDs as
  450. follows:
  451. ON OFF
  452. ------------------------- ---- ---- ---- ----
  453. LED0 LED1 LED0 LED1
  454. ------------------------- ---- ---- ---- ----
  455. LED_STARTED 0 OFF OFF --- ---
  456. LED_HEAPALLOCATE 1 ON OFF --- ---
  457. LED_IRQSENABLED 2 OFF ON --- ---
  458. LED_STACKCREATED 3 ON ON --- ---
  459. LED_INIRQ 4 ON N/C OFF N/C
  460. LED_SIGNAL 4 ON N/C OFF N/C
  461. LED_ASSERTION 4 ON N/C OFF N/C
  462. LED_PANIC 4 ON N/C OFF N/C
  463. UART Usage
  464. ==========
  465. When mounted on the DTX1-4000L EV-kit1 board, serial output is available through
  466. an FT230X device via the FUNC0 and FUNC1 module outputs. If CONFIG_PIC32MX_UART2
  467. is enabled, the src/pic32_boot will configure the UART2 pins as follows:
  468. ---------- ------ ----- ------ -------------------------
  469. BOARD MODULE PIN SIGNAL NOTES
  470. ---------- ------ ----- ------ -------------------------
  471. FT230X RXD FUNC0 RPB11 U2RX UART2 RX (Also PGEC2)
  472. FT230X TXD FUNC1 RPB10 U2TX UART2 TX (Also PGED2)
  473. However, since the FUNC0/1 pins are shared with the PGEC/D2, they cannot be used
  474. for UART2 if you are also debugging with the ICD3. In that case, you may need
  475. to switch to UART1.
  476. If CONFIG_PIC32MX_UART1 is enabled, the src/pic32_boot will configure the UART
  477. pins as follows. This will support communictions (via an external RS-232
  478. driver) through X3 pins 4 and 5:
  479. ---------- ------ ----- ------ -------------------------
  480. BOARD MODULE PIN SIGNAL NOTES
  481. ---------- ------ ----- ------ -------------------------
  482. X3, pin 4 FUNC4 RPBC5 U1TX UART1 TX
  483. X3, pin 5 FUNC5 RPBC6 U1RX UART1 RX
  484. If you are not using MPLAB to debug, you may also want to change Make.defs
  485. to use the release.ld linker script instead of the debug.ld link script. This
  486. change will give you a little more memory by re-using the boot FLASH and SRAM
  487. that would otherwise be reserved for MPLAB.
  488. Analog Input
  489. ============
  490. The Mirtoo features a PGA117 amplifier/multipexer that can be configured to
  491. bring any analog signal from PORT0,.. PORT7 to pin 19 of the PIC32MX:
  492. --- ------------------------------------------------ ----------------------------
  493. PIN PIC32 SIGNAL(s) BOARD SIGNAL/USAGE
  494. --- ------------------------------------------------ ----------------------------
  495. 19 PGED3/VREF+/CVREF+/AN0/C3INC/RPA0/CTED1/PMD7/RA0 AIN PGA117 Vout
  496. --- ------------------------------------------------ ----------------------------
  497. The PGA117 driver can be enabled by setting the following the nsh
  498. configuration:
  499. CONFIG_ADC=y : Enable support for analog input devices
  500. CONFIG_PIC32MX_ADC=y : Enable support the PIC32 ADC driver
  501. CONFIG_ADC_PGA11X=y : Enable support for the PGA117
  502. When CONFIG_PIC32MX_ADC=y is defined, the Mirtoo boot up logic will
  503. automatically configure pin 18 (AN0) as an analog input (see boards/mirtoo/src/up_adc.c).
  504. To initializee and use the PGA117, you to add logic something like the
  505. following in your application code:
  506. #include <nuttx/spi/spi.h>
  507. #include <nuttx/analog/pga11x.h>
  508. FAR struct spi_dev_s *spi;
  509. PGA11X_HANDLE handle;
  510. /* Get the SPI port */
  511. spi = pic32mx_spibus_initialize(2);
  512. if (!spi)
  513. {
  514. _err("ERROR: Failed to initialize SPI port 2\n");
  515. return -ENODEV;
  516. }
  517. /* Now bind the SPI interface to the PGA117 driver */
  518. handle = pga11x_initialize(spi);
  519. if (!handle)
  520. {
  521. _err("ERROR: Failed to bind SPI port 2 to the PGA117 driver\n");
  522. return -ENODEV;
  523. }
  524. After that initialization is set, then one of PORT0-7 can be select as
  525. an analog input to AN0 like:
  526. struct pga11x_settings_s settings;
  527. int ret;
  528. settings.channel = PGA11X_CHAN_CH2;
  529. settings.gain = PGA11X_GAIN_2;
  530. ret = pga11x_select(handle, &settings);
  531. if (ret < 0)
  532. {
  533. _err("ERROR: Failed to select channel 2, gain 2\n");
  534. return -EIO;
  535. }
  536. The above logic may belong in boards/mirtoo/src/up_adc.c?
  537. There is still one missing piece to complete the analog support on the
  538. Mirtoo. This is the ADC driver that collects analog data and provides
  539. and ADC driver that can be used with standard open, close, read, and write
  540. interfaces. To complete this driver, the following is needed:
  541. (1) arch/mips/src/pic32mx/pic32mx_adc.c. The ADC driver that implements
  542. the ADC interfaces defined in include/nuttx/analog/adc.h and must
  543. be built when CONFIG_PIC32MX_ADC is defined.
  544. (2) boards/mirtoo/up_adc.c. Add Mirtoo logic that initializes and
  545. registers the ADC driver.
  546. A complete ADC driver will be a considerable amount of work to support
  547. all of the ADC features (such as timer driven sampling). If all you want
  548. to do is a simple analog conversion, then in lieu of a real ADC driver,
  549. you can use simple in-line logic such as you can see in the PIC32MX7 MMB
  550. touchscreen driver at boards/pic32mx7mmb/src/up_touchscreen.c
  551. PIC32MX Configuration Options
  552. =============================
  553. General Architecture Settings:
  554. CONFIG_ARCH - Identifies the arch/ subdirectory. This should
  555. be set to:
  556. CONFIG_ARCH=mips
  557. CONFIG_ARCH_family - For use in C code:
  558. CONFIG_ARCH_MIPS=y
  559. CONFIG_ARCH_architecture - For use in C code:
  560. CONFIG_ARCH_MIPS32=y
  561. CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory
  562. CONFIG_ARCH_CHIP=pic32mx
  563. CONFIG_ARCH_CHIP_name - For use in C code to identify the exact
  564. chip:
  565. CONFIG_ARCH_CHIP_PIC32MX250F128D=y
  566. CONFIG_ARCH_BOARD - Identifies the boards/ subdirectory and
  567. hence, the board that supports the particular chip or SoC.
  568. CONFIG_ARCH_BOARD=mirtoo
  569. CONFIG_ARCH_BOARD_name - For use in C code
  570. CONFIG_ARCH_BOARD_MIRTOO=y
  571. CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation
  572. of delay loops
  573. CONFIG_ENDIAN_BIG - define if big endian (default is little
  574. endian)
  575. CONFIG_RAM_SIZE - Describes the installed DRAM (CPU SRAM in this case):
  576. CONFIG_RAM_SIZE=(32*1024) (32Kb)
  577. There is an additional 32Kb of SRAM in AHB SRAM banks 0 and 1.
  578. CONFIG_RAM_START - The start address of installed DRAM
  579. CONFIG_RAM_START=0xa0000000
  580. CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to boards that
  581. have LEDs
  582. CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
  583. stack. If defined, this symbol is the size of the interrupt
  584. stack in bytes. If not defined, the user task stacks will be
  585. used during interrupt handling.
  586. CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions
  587. CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to board architecture.
  588. PIC32MX Configuration
  589. CONFIG_PIC32MX_MVEC - Select muli- vs. single-vectored interrupts
  590. Individual subsystems can be enabled:
  591. CONFIG_PIC32MX_WDT - Watchdog timer
  592. CONFIG_PIC32MX_T2 - Timer 2 (Timer 1 is the system time and always enabled)
  593. CONFIG_PIC32MX_T3 - Timer 3
  594. CONFIG_PIC32MX_T4 - Timer 4
  595. CONFIG_PIC32MX_T5 - Timer 5
  596. CONFIG_PIC32MX_IC1 - Input Capture 1
  597. CONFIG_PIC32MX_IC2 - Input Capture 2
  598. CONFIG_PIC32MX_IC3 - Input Capture 3
  599. CONFIG_PIC32MX_IC4 - Input Capture 4
  600. CONFIG_PIC32MX_IC5 - Input Capture 5
  601. CONFIG_PIC32MX_OC1 - Output Compare 1
  602. CONFIG_PIC32MX_OC2 - Output Compare 2
  603. CONFIG_PIC32MX_OC3 - Output Compare 3
  604. CONFIG_PIC32MX_OC4 - Output Compare 4
  605. CONFIG_PIC32MX_OC5 - Output Compare 5
  606. CONFIG_PIC32MX_I2C1 - I2C 1
  607. CONFIG_PIC32MX_I2C2 - I2C 2
  608. CONFIG_PIC32MX_SPI1 - SPI 1
  609. CONFIG_PIC32MX_SPI2 - SPI 2
  610. CONFIG_PIC32MX_UART1 - UART 1
  611. CONFIG_PIC32MX_UART2 - UART 2
  612. CONFIG_PIC32MX_ADC - ADC 1
  613. CONFIG_PIC32MX_PMP - Parallel Master Port
  614. CONFIG_PIC32MX_CM1 - Comparator 1
  615. CONFIG_PIC32MX_CM2 - Comparator 2
  616. CONFIG_PIC32MX_CM3 - Comparator 3
  617. CONFIG_PIC32MX_RTCC - Real-Time Clock and Calendar
  618. CONFIG_PIC32MX_DMA - DMA
  619. CONFIG_PIC32MX_FLASH - FLASH
  620. CONFIG_PIC32MX_USBDEV - USB device
  621. CONFIG_PIC32MX_USBHOST - USB host
  622. CONFIG_PIC32MX_CTMU - CTMU
  623. PIC32MX Configuration Settings
  624. DEVCFG0:
  625. CONFIG_PIC32MX_DEBUGGER - Background Debugger Enable. Default 3 (disabled). The
  626. value 2 enables.
  627. CONFIG_PIC32MX_ICESEL - In-Circuit Emulator/Debugger Communication Channel Select
  628. Default 1 (PG2)
  629. CONFIG_PIC32MX_PROGFLASHWP - Program FLASH write protect. Default 0xff (disabled)
  630. CONFIG_PIC32MX_BOOTFLASHWP - Default 1 (disabled)
  631. CONFIG_PIC32MX_CODEWP - Default 1 (disabled)
  632. DEVCFG1: (All settings determined by selections in board.h)
  633. DEVCFG2: (All settings determined by selections in board.h)
  634. DEVCFG3:
  635. CONFIG_PIC32MX_USBIDO - USB USBID Selection. Default 1 if USB enabled
  636. (USBID pin is controlled by the USB module), but 0 (GPIO) otherwise.
  637. CONFIG_PIC32MX_VBUSIO - USB VBUSON Selection (Default 1 if USB enabled
  638. (VBUSON pin is controlled by the USB module, but 0 (GPIO) otherwise.
  639. CONFIG_PIC32MX_WDENABLE - Enabled watchdog on power up. Default 0 (watchdog
  640. can be enabled later by software).
  641. The priority of interrupts may be specified. The value ranage of
  642. priority is 4-31. The default (16) will be used if these any of these
  643. are undefined.
  644. CONFIG_PIC32MX_CTPRIO - Core Timer Interrupt
  645. CONFIG_PIC32MX_CS0PRIO - Core Software Interrupt 0
  646. CONFIG_PIC32MX_CS1PRIO - Core Software Interrupt 1
  647. CONFIG_PIC32MX_INT0PRIO - External Interrupt 0
  648. CONFIG_PIC32MX_INT1PRIO - External Interrupt 1
  649. CONFIG_PIC32MX_INT2PRIO - External Interrupt 2
  650. CONFIG_PIC32MX_INT3PRIO - External Interrupt 3
  651. CONFIG_PIC32MX_INT4PRIO - External Interrupt 4
  652. CONFIG_PIC32MX_FSCMPRIO - Fail-Safe Clock Monitor
  653. CONFIG_PIC32MX_T1PRIO - Timer 1 (System timer) priority
  654. CONFIG_PIC32MX_T2PRIO - Timer 2 priority
  655. CONFIG_PIC32MX_T3PRIO - Timer 3 priority
  656. CONFIG_PIC32MX_T4PRIO - Timer 4 priority
  657. CONFIG_PIC32MX_T5PRIO - Timer 5 priority
  658. CONFIG_PIC32MX_IC1PRIO - Input Capture 1
  659. CONFIG_PIC32MX_IC2PRIO - Input Capture 2
  660. CONFIG_PIC32MX_IC3PRIO - Input Capture 3
  661. CONFIG_PIC32MX_IC4PRIO - Input Capture 4
  662. CONFIG_PIC32MX_IC5PRIO - Input Capture 5
  663. CONFIG_PIC32MX_OC1PRIO - Output Compare 1
  664. CONFIG_PIC32MX_OC2PRIO - Output Compare 2
  665. CONFIG_PIC32MX_OC3PRIO - Output Compare 3
  666. CONFIG_PIC32MX_OC4PRIO - Output Compare 4
  667. CONFIG_PIC32MX_OC5PRIO - Output Compare 5
  668. CONFIG_PIC32MX_I2C1PRIO - I2C 1
  669. CONFIG_PIC32MX_I2C2PRIO - I2C 2
  670. CONFIG_PIC32MX_SPI1PRIO - SPI 1
  671. CONFIG_PIC32MX_SPI2PRIO - SPI 2
  672. CONFIG_PIC32MX_UART1PRIO - UART 1
  673. CONFIG_PIC32MX_UART2PRIO - UART 2
  674. CONFIG_PIC32MX_CN - Input Change Interrupt
  675. CONFIG_PIC32MX_ADCPRIO - ADC1 Convert Done
  676. CONFIG_PIC32MX_PMPPRIO - Parallel Master Port
  677. CONFIG_PIC32MX_CM1PRIO - Comparator 1
  678. CONFIG_PIC32MX_CM2PRIO - Comparator 2
  679. CONFIG_PIC32MX_FSCMPRIO - Fail-Safe Clock Monitor
  680. CONFIG_PIC32MX_RTCCPRIO - Real-Time Clock and Calendar
  681. CONFIG_PIC32MX_DMA0PRIO - DMA Channel 0
  682. CONFIG_PIC32MX_DMA1PRIO - DMA Channel 1
  683. CONFIG_PIC32MX_DMA2PRIO - DMA Channel 2
  684. CONFIG_PIC32MX_DMA3PRIO - DMA Channel 3
  685. CONFIG_PIC32MX_FCEPRIO - Flash Control Event
  686. CONFIG_PIC32MX_USBPRIO - USB
  687. PIC32MXx specific device driver settings
  688. CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the
  689. console and ttys0 (default is the UART0).
  690. CONFIG_UARTn_RXBUFSIZE - Characters are buffered as received.
  691. This specific the size of the receive buffer
  692. CONFIG_UARTn_TXBUFSIZE - Characters are buffered before
  693. being sent. This specific the size of the transmit buffer
  694. CONFIG_UARTn_BAUD - The configure BAUD of the UART. Must be
  695. CONFIG_UARTn_BITS - The number of bits. Must be either 7 or 8.
  696. CONFIG_UARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity
  697. CONFIG_UARTn_2STOP - Two stop bits
  698. PIC32MXx USB Device Configuration
  699. PIC32MXx USB Host Configuration (the PIC32MX does not support USB Host)
  700. Configurations
  701. ==============
  702. Each PIC32MX configuration is maintained in a sub-directory and can be
  703. selected as follow:
  704. tools/configure.sh mirtoo:<subdir>
  705. Where <subdir> is one of the following:
  706. nsh
  707. This configuration directory holds configuration files that can
  708. be used to support the NuttShell (NSH). This configuration use
  709. UART1 which is available on FUNC 4 and 5 on connector X3:
  710. CONFIG_PIC32MX_UART1=y : UART1 for serial console
  711. CONFIG_UART1_SERIAL_CONSOLE=n
  712. NOTES:
  713. 1. This configuration uses the mconf-based configuration tool. To
  714. change this configurations using that tool, you should:
  715. a. Build and install the kconfig-mconf tool. See nuttx/README.txt
  716. see additional README.txt files in the NuttX tools repository.
  717. b. Execute 'make menuconfig' in nuttx/ in order to start the
  718. reconfiguration process.
  719. 2. UART2
  720. If you are not using MPLAB to debug, you may switch to UART2
  721. by modifying the NuttX configuration to disable UART1 and to
  722. select UART2. You should also change Make.defs to use the
  723. release.ld linker script instead of the debug.ld link script.
  724. 3. This configuration also uses the Microchip C32 toolchain under
  725. windows by default:
  726. CONFIG_MIPS32_TOOLCHAIN_MICROCHIPW_LITE=y : Lite version of windows toolchain
  727. To switch to the Linux C32 toolchain you will have to change (1) the
  728. toolchain selection in .config (after configuration) and (2) the
  729. path to the toolchain in the PATH environment variable. See notes above
  730. with regard to the XC32 toolchain.
  731. 4. PGA117 Support
  732. The Mirtoo's PGA117 amplifier/multiplexer is not used by this configuration
  733. but can be enabled by setting:
  734. CONFIG_ADC=y : Enable support for analog input devices
  735. CONFIG_ADC_PGA11X=y : Enable support for the PGA117
  736. nxffs
  737. This is a configuration very similar to the nsh configuration. This
  738. configure also provides the NuttShell (NSH). And this configuration use
  739. UART1 which is available on FUNC 4 and 5 on connector X3 (as described
  740. for the nsh configuration). This configuration differs from the nsh
  741. configuration in the following ways:
  742. 1. This configuration uses the mconf-based configuration tool. To
  743. change this configurations using that tool, you should:
  744. a. Build and install the kconfig-mconf tool. See nuttx/README.txt
  745. see additional README.txt files in the NuttX tools repository.
  746. b. Execute 'make menuconfig' in nuttx/ in order to start the
  747. reconfiguration process.
  748. 2. It uses the Pinguino toolchain be default (this is easily changed,
  749. see above).
  750. CONFIG_MIPS32_TOOLCHAIN_PINGUINOW=y
  751. 3. SPI2 is enabled and support is included for the NXFFS file system
  752. on the 32Mbit SST25 device on the Mirtoo board. NXFFS is the NuttX
  753. wear-leveling file system.
  754. CONFIG_PIC32MX_SPI2=y
  755. CONFIG_MTD_SST25=y
  756. CONFIG_SST25_SECTOR512=y
  757. CONFIG_DISABLE_MOUNTPOINT=n
  758. CONFIG_FS_NXFFS=y
  759. CONFIG_NSH_ARCHINIT=y
  760. 4. Many operating system features are suppressed to produce a smaller
  761. footprint.
  762. CONFIG_SCHED_WAITPID=n
  763. CONFIG_DISABLE_POSIX_TIMERS=y
  764. CONFIG_DISABLE_PTHREAD=y
  765. CONFIG_DISABLE_MQUEUE=y
  766. CONFIG_DISABLE_MQUEUE=y
  767. 5. Many NSH commands are suppressed, also for a smaller FLASH footprint
  768. CONFIG_NSH_DISABLESCRIPT=y
  769. CONFIG_NSH_DISABLEBG=y
  770. CONFIG_NSH_DISABLE_DD=y
  771. CONFIG_NSH_DISABLE_EXEC=y
  772. CONFIG_NSH_DISABLE_EXIT=y
  773. CONFIG_NSH_DISABLE_GET=y
  774. CONFIG_NSH_DISABLE_IFCONFIG=y
  775. CONFIG_NSH_DISABLE_KILL=y
  776. CONFIG_NSH_DISABLE_MKFIFO=y
  777. CONFIG_NSH_DISABLE_MKRD=y
  778. CONFIG_NSH_DISABLE_PUT=y
  779. CONFIG_NSH_DISABLE_SOURCE=y
  780. CONFIG_NSH_DISABLE_TEST=y
  781. CONFIG_NSH_DISABLE_WGET=y
  782. When the system boots, you should have the NXFFS file system mounted
  783. at /mnt/sst25.
  784. NOTES:
  785. a) It takes many seconds to boot the system using the NXFFS
  786. file system because the entire FLASH must be verified on power up
  787. (and longer the first time that NXFFS comes up and has to format the
  788. entire FLASH).
  789. b) FAT does not have these delays and this configuration can be modified
  790. to use the (larger) FAT file system as described below. But you will,
  791. or course, lose the wear-leveling feature if FAT is used.
  792. 6. FAT
  793. There is no FAT configuration, but the nxffx configuration can be used
  794. to support the FAT FS if the following changes are made to the NuttX
  795. configuration file:
  796. CONFIG_FS_NXFFS=n
  797. CONFIG_FS_FAT=y
  798. CONFIG_NSH_DISABLE_MKFATFS=n
  799. In this configuration, the FAT file system will not be automatically
  800. mounted. When NuttX boots to the NSH prompt, you will find the
  801. SST5 block driver at /dev/mtdblock0. This can be formatted with a
  802. FAT file system and mounted with these commands:
  803. nsh> mkfatfs /dev/mtdblock0
  804. nsh> mount -t vfat /dev/mtdblock0 /mnt/sst25
  805. 7. PGA117 Support
  806. The Mirtoo's PGA117 amplifier/multipexer is not used by this
  807. configuration but can be enabled by setting:
  808. CONFIG_ADC=y : Enable support for anlog input devices
  809. CONFIG_ADC_PGA11X=y : Enable support for the PGA117