README.txt 87 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345
  1. README
  2. ^^^^^^
  3. o Environments
  4. - Installing Cygwin
  5. - Ubuntu Bash under Windows 10
  6. o Installation
  7. - Download and Unpack
  8. - Semi-Optional apps/ Package
  9. - Installation Directories with Spaces in the Path
  10. - Downloading from Repositories
  11. - Related Repositories
  12. - Notes about Header Files
  13. o Configuring NuttX
  14. - Instantiating "Canned" Configurations
  15. - Refreshing Configurations
  16. - NuttX Configuration Tool
  17. - Finding Selections in the Configuration Menus
  18. - Reveal Hidden Configuration Options
  19. - Make Sure that You are on the Right Platform
  20. - Comparing Two Configurations
  21. - Making defconfig Files
  22. - Incompatibilities with Older Configurations
  23. - NuttX Configuration Tool under DOS
  24. o Toolchains
  25. - Cross-Development Toolchains
  26. - NuttX Buildroot Toolchain
  27. o Shells
  28. o Building NuttX
  29. - Building
  30. - Re-building
  31. - Build Targets and Options
  32. - Native Windows Build
  33. - Installing GNUWin32
  34. o Cygwin Build Problems
  35. - Strange Path Problems
  36. - Window Native Toolchain Issues
  37. o Documentation
  38. ENVIRONMENTS
  39. ^^^^^^^^^^^^
  40. NuttX requires a POSIX development environment such as you would find under
  41. Linux or macOS. NuttX may also be installed and built on Windows system
  42. if you also provide such a POSIX development environment. Options for a
  43. POSIX development environment under Windows include:
  44. - An installation of Linux on a virtual machine (VM) in Windows. I have
  45. not been happy using a VM myself. I have had stability problems with
  46. open source VMs and commercial VMs cost more than I want to spend.
  47. Sharing files with Linux running in a VM is awkward; sharing devices
  48. connected to the Windows box with Linux in a VM is, at the very least,
  49. confusing; Using Windows tools (such as Segger J-Link) with files
  50. built under the Linux VM is not a possibility.
  51. - The Cygwin environment. Instructions for installation of Cygwin on a
  52. Windows system are provided in the following paragraph, "Installing
  53. Cygwin". Cygwin is a mature, well-tested, and very convenient
  54. environment. It is especially convenient if you need to
  55. integrate with Windows tools and files. Downsides are that the
  56. installation time is very long and the compile times are slow.
  57. - Ubuntu/Bash shell under Windows 10. This is a new option under
  58. Windows 10. See the section "Ubuntu Bash under Windows 10" below.
  59. This is an improvement over Cygwin if your concern is compile time;
  60. its build performance is comparable to native Linux, certainly better
  61. than the Cygwin build time. It also installs in a tiny fraction of
  62. the time as Cygwin, perhaps 20 minutes for the basic Ubuntu install
  63. (vs. more than a day for the complete Cygwin install).
  64. There have been even more recent ports of Linux environment to
  65. Windows. I need to update this section to include some mention of
  66. these alternatives.
  67. - The MSYS environment. MSYS derives from an older version of Cygwin
  68. simplified and adapted to work more naturally in the Windows
  69. environment. See http://www.mingw.org/wiki/MSYS if you are
  70. interested in using MSYS. The advantages of the MSYS environment is
  71. that it is better integrted with the native Windows environment and
  72. lighter weight; it uses only a minimal number of add-on POSIX-land
  73. tools.
  74. The download link in that Wiki takes you to the SourceForge download
  75. site. The SourceForge MSYS project has been stagnant for some time.
  76. The MSYS project has more recently moved to
  77. http://odsn.net/projects/sfnet_mingwbundle. Downloads of current .zip
  78. files are available there but no instructions for the installation.
  79. - MSYS2 appears to be a re-write of MSYS based on a newer version of
  80. Cygwin. Is it available at https://www.msys2.org. A windows
  81. installer is available at that site along with very good installation
  82. instructions. The download is relatively quick (at least compared to
  83. Cygwin) and the 'pacman' package management tool supports supports
  84. simple system updates. For example, 'pacman -S git' will install the
  85. GIT command line utilities.
  86. - Other POSIX environments. Check out:
  87. UnxUtils: https://sourceforge.net/projects/unxutils/,
  88. https://en.wikipedia.org/wiki/UnxUtils
  89. MobaXterm: https://mobaxterm.mobatek.net/
  90. Gow: https://github.com/bmatzelle/gow/wiki
  91. Disclaimer: In principle, these should work. However, I have never
  92. used any of these environments and cannot guarantee that there is
  93. not some less-than-obvious issues.
  94. NuttX can also be installed and built on a native Windows system, but with
  95. some potential tool-related issues (see the discussion "Native Windows
  96. Build" under "Building NuttX" below). GNUWin32 is used to provide
  97. compatible native windows tools.
  98. Installing Cygwin
  99. -----------------
  100. Installing Cygwin on your Windows PC is simple, but time consuming. See
  101. http://www.cygwin.com/ for installation instructions. Basically you just
  102. need to download a tiny setup.exe program and it does the real, network
  103. installation for you.
  104. Some Cygwin installation tips:
  105. 1. Install at C:\cygwin
  106. 2. Install EVERYTHING: "Only the minimal base packages from the
  107. Cygwin distribution are installed by default. Clicking on categories
  108. and packages in the setup.exe package installation screen will
  109. provide you with the ability to control what is installed or updated.
  110. Clicking on the "Default" field next to the "All" category will
  111. provide you with the opportunity to install every Cygwin package.
  112. Be advised that this will download and install hundreds of megabytes
  113. to your computer."
  114. If you use the "default" installation, you will be missing many
  115. of the Cygwin utilities that you will need to build NuttX. The
  116. build will fail in numerous places because of missing packages.
  117. NOTE: The last time I installed EVERYTHING, the download was
  118. about 5GiB. The server I selected was also very slow so it took
  119. over a day to do the whole install!
  120. NOTE: You don't really have to install EVERYTHING but I cannot
  121. answer the question "Then what should I install?" I don't know
  122. the answer to that and so will continue to recommend installing
  123. EVERYTHING.
  124. You should certainly be able to omit "Science", "Math", and
  125. "Publishing". You can try omitting KDE, Gnome, GTK, and other
  126. graphics packages if you don't plan to use them.
  127. Perhaps a minimum set would be those packages listed below for the
  128. "Ubuntu Bash under Windows 10" installation?
  129. UPDATE: Sergey Frolov had success with the following minimal
  130. Cygwin configuration:
  131. 1. After starting the Cygwin installer, keep the recommended
  132. packages that are pre-selected in the default configuration.
  133. 2. Using the installation tools, add the following packages:
  134. make (GNU make) bison libgmp3-dev
  135. gcc-core byacc libmpfr-dev
  136. gcc-g++ gperf libmpc-dev
  137. flex gdb automake-1.15
  138. libncurses-dev libgmp-dev
  139. After installing Cygwin, you will get lots of links for installed
  140. tools and shells. I use the RXVT native shell. It is fast and reliable
  141. and does not require you to run the Cygwin X server (which is neither
  142. fast nor reliable). Unless otherwise noted, the rest of these
  143. instructions assume that you are at a bash command line prompt in
  144. either Linux or in Cygwin shell.
  145. Using MSYS
  146. ----------
  147. MSYS is an environment the derives from Cygwin. Thus, most things said
  148. about Cygwin apply equally to MSYS. This section will, then, focus on
  149. the differences when using MSYS, specifically MSYS2.
  150. Here is it assumed that you have already downloaded and installed MSYS2
  151. from https://www.msys2.org using the windows installer available at that
  152. location. It is also assumed that you have brought in the necessary
  153. tools using the 'pacman' package management tool Tools needed including:
  154. pacman -S git
  155. pacman -S make
  156. pacman -S gcc
  157. pacman -S gdb
  158. And possibly others depending upon your usage. Then you will need to
  159. build and install kconfig-frontends per the instructions of the top-level
  160. README.txt file in the tools repository. This requires the following
  161. additional tools:
  162. pacman -S bison
  163. pacman -S gperf
  164. pacman -S ncurses-devel
  165. pacman -S automake-wrapper
  166. pacman -S autoconf
  167. pacman -S pkg-config
  168. Because of some versioning issues, I had to run 'aclocal' prior to
  169. running the kconfig-frontends configure script. See "Configuring NuttX"
  170. below for further information.
  171. Unlike Cygwin, MSYS does not support symbolic links. The 'ln -s' command
  172. will, in fact, copy a directory! This means that you Make.defs file will
  173. have to include definitions like:
  174. ifeq ($(CONFIG_WINDOWS_MSYS),y)
  175. DIRLINK = $(TOPDIR)/tools/copydir.sh
  176. DIRUNLINK = $(TOPDIR)/tools/unlink.sh
  177. endif
  178. This will force the directory copies to work in a way that can be handled
  179. by the NuttX build system. NOTE: The default link.sh script has been
  180. updated so that is should now be MSYS2 compatible. The above is preferred
  181. but no longer necessary in the Make.defs file.
  182. To build the simulator under MSYS, you also need:
  183. pacman -S zlib-devel
  184. It appears that you cannot use directory names with spaces in them like
  185. "/c/Program\ Files \(86\)" in the MSYS path variable. I worked around this
  186. by create Windows junctions like this::
  187. 1. Open the a windows command terminal,
  188. 2. CD to c:\msys64, then
  189. 3. mklink /j programfiles "C:/Program\ Files" and
  190. 4. mklink /j programfiles86 "C:/Program\ Files\ \(x86\)"
  191. They then show up as /programfiles and /programfiles86 with the MSYS2
  192. sandbox. Thos paths can then be used with the PATH variable. I had
  193. to do something similar for the path to the GNU Tools "ARM Embedded
  194. Toolchain" which also has spaces in the path name.
  195. Ubuntu Bash under Windows 10
  196. ----------------------------
  197. A better version of a command-line only Ubuntu under Windows 10 (beta)
  198. has recently been made available from Microsoft.
  199. Installation
  200. ------------
  201. Installation instructions abound on the Internet complete with screen
  202. shots. I will attempt to duplicate those instructions in full here.
  203. Here are the simplified installation steps:
  204. - Open "Settings".
  205. - Click on "Update & security".
  206. - Click on "For Developers".
  207. - Under "Use developer features", select the "Developer mode" option to
  208. setup the environment to install Bash.
  209. - A message box should pop up. Click "Yes" to turn on developer mode.
  210. - After the necessary components install, you'll need to restart your
  211. computer.
  212. Once your computer reboots:
  213. - Open "Control Panel".
  214. - Click on "Programs".
  215. - Click on "Turn Windows features on or off".
  216. - A list of features will pop up, check the "Windows Subsystem for Linux
  217. (beta)" option.
  218. - Click OK.
  219. - Once the components installed on your computer, click the "Restart
  220. now" button to complete the task.
  221. After your computer restarts, you will notice that Bash will not appear in
  222. the "Recently added" list of apps, this is because Bash isn't actually
  223. installed yet. Now that you have setup the necessary components, use the
  224. following steps to complete the installation of Bash:
  225. - Open "Start", do a search for bash.exe, and press "Enter".
  226. - On the command prompt, type y and press Enter to download and install
  227. Bash from the Windows Store. This will take awhile.
  228. - Then you'll need to create a default UNIX user account. This account
  229. doesn't have to be the same as your Windows account. Enter the
  230. username in the required field and press Enter (you can't use the
  231. username "admin").
  232. - Close the "bash.exe" command prompt.
  233. Now that you completed the installation and setup, you can open the Bash
  234. tool from the Start menu like you would with any other app.
  235. Accessing Windows Files from Ubuntu
  236. -----------------------------------
  237. File systems will be mounted under "/mnt" so for example "C:\Program Files"
  238. appears at "/mnt/c/Program Files". This is as opposed to Cygwin where
  239. the same directory would appear at "/cygdrive/c/Program Files".
  240. With these differences (perhaps a few other Windows quirks) the Ubuntu
  241. install works just like Ubuntu running natively on your PC.
  242. A good tip for file sharing is to use symbolic links within your Ubuntu
  243. home directory. For example, suppose you have your "projects" directory
  244. at C:\Documents\projects. Then you can set up a link to the projects/
  245. directory in your Ubuntu directory like:
  246. ln -s /mnt/c/Documents/projects projects
  247. Accessing Ubuntu Files From Windows
  248. -----------------------------------
  249. In Ubuntu Userspace for Windows, the Ubuntu file system root directory is
  250. at:
  251. %localappdata%\lxss\rootfs
  252. Or
  253. C:\Users\Username\AppData\Local\lxss\rootfs
  254. However, I am unable to see my files under the rootfs\home directory.
  255. After some looking around, I find the home directory
  256. %localappdata%\lxss\home.
  257. With that trick access to the /home directory, you should actually be
  258. able to use Windows tools outside of the Ubuntu sandbox with versions of
  259. NuttX built within the sandbox using that path.
  260. Executing Windows Tools from Ubuntu
  261. -----------------------------------
  262. You can also execute Windows tools from within the Ubuntu sandbox:
  263. /mnt/c/Program\ Files\ \(x86\)/Microchip/xc32/v1.43/bin/xc32-gcc.exe --version
  264. Unable to translate current working directory. Using C:\WINDOWS\System32
  265. xc32-gcc.exe (Microchip Technology) 4.8.3 MPLAB XC32 Compiler v1.43 Build date: Mar 1 2017
  266. ...
  267. The error message indicates that there are more issues: You cannot mix
  268. Windows tools that use Windows style paths in an environment that uses
  269. POSIX paths. I think you would have to use Linux tools only from within
  270. the Ubuntu sandbox.
  271. Install Ubuntu Software
  272. -----------------------
  273. Use "sudo apt-get install <package name>". As examples, this is how
  274. you would get GIT:
  275. sudo apt-get install git
  276. This will get you a compiler for your host PC:
  277. sudo apt-get install gcc
  278. This will get you an ARM compiler for your target:
  279. sudo apt-get install gcc-arm-none-eabi
  280. NOTE: That is just an example. I am not sure if apt-get will give you a
  281. current or usable compiler. You should carefully select your toolchain
  282. for the needs of your project.
  283. You will also need to get the kconfig-frontends configuration as
  284. described below under "NuttX Configuration Tool". In order to build the
  285. kconfig-frontends configuration tool you will also need: make, gperf,
  286. flex, bison, and libncurses-dev.
  287. That is enough to do a basic NuttX build.
  288. Integrating with Windows Tools
  289. ------------------------------
  290. If you want to integrate with Windows native tools, then you would need
  291. deal with the same kind of craziness as with integrating Cygwin with
  292. native toolchains, see the section "Cygwin Build Problems" below.
  293. However, there is currently no build support for using Windows native
  294. tools with Ubuntu under Windows. This tool combination is made to work
  295. with Cygwin through the use of the 'cygpath -w' tool that converts paths
  296. from say '/cydrive/c/Program Files' to 'C:\Program Files'. There is,
  297. however, no corresponding tool to convert '/mnt/c/Program Files' in the
  298. Ubuntu environment.
  299. Graphics Support
  300. ----------------
  301. The Ubuntu version support by Microsoft is a command-line only version.
  302. There is no support for Linux graphics utilities.
  303. This limitation is not a limitation of Ubuntu, however, only in what
  304. Microsoft is willing to support. If you install a X-Server, then you
  305. can also use basic graphics utilities. See for example:
  306. http://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/
  307. Many Linux graphics programs would, however, also require a graphics
  308. framework like GTK or Qt. So this might be a trip down the rabbit hole.
  309. INSTALLATION
  310. ^^^^^^^^^^^^
  311. There are two ways to get NuttX: You may download released, stable
  312. tarballs from either the Bitbucket or Sourceforge download locations.
  313. Or you may get NuttX by cloning the Bitbucket GIT repositories. Let's
  314. consider the released tarballs first:
  315. Download and Unpack
  316. -------------------
  317. Download and unpack the NuttX tarball. If you are reading this, then
  318. you have probably already done that. After unpacking, you will end
  319. up with a directory called nuttx-version (where version is the NuttX
  320. version number). You might want to rename that directory nuttx to
  321. match the various instructions in the documentation and some scripts
  322. in the source tree.
  323. Download locations:
  324. https://bitbucket.org/nuttx/nuttx/downloads
  325. https://sourceforge.net/projects/nuttx/files/nuttx/
  326. Semi-Optional apps/ Package
  327. ---------------------------
  328. All NuttX libraries and example code used to be in included within
  329. the NuttX source tree. As of NuttX-6.0, this application code was
  330. moved into a separate tarball, the apps tarball. If you are just
  331. beginning with NuttX, then you will want to download the versioned
  332. apps tarball along with the NuttX tarball. If you already have your
  333. own product application directory, then you may not need the apps
  334. tarball.
  335. It is called "Semi-optional" because if you don't have some apps/
  336. directory, NuttX will *fail* to build! You do not necessarily need
  337. to use the NuttX apps tarball but may, instead, provide your own
  338. custom application directory. Such a custom directory would need
  339. to include a valid Makefile to support the build and a valid Kconfig
  340. file to support the configuration. More about these files later.
  341. Download then unpack the apps tarball in the same directory where you
  342. unpacked the NuttX tarball. After you unpack the apps tarball, you
  343. will have a new directory called apps-version (where the version
  344. should exactly match the version of the NuttX tarball). Again, you
  345. might want to rename the directory to simply apps/ to match what
  346. you read in the documentation
  347. After unpacking (and renaming) the apps tarball, you will have two
  348. directories side by side like this:
  349. |
  350. +----+----+
  351. | |
  352. nuttx/ apps/
  353. This is important because the NuttX build will expect to find the
  354. apps directory in that (default) location. That default location
  355. can be changed by modifying your NuttX configuration file, but that
  356. is another story.
  357. Installation Directories with Spaces in the Path
  358. ------------------------------------------------
  359. The nuttx build directory should reside in a path that contains no
  360. spaces in any higher level directory name. For example, under
  361. Cygwin, your home directory might be formed from your first and last
  362. names like: "/home/First Last". That will cause strange errors when
  363. the make system tries to build.
  364. [Actually, that problem is probably not too difficult to fix. Some
  365. Makefiles probably just need some paths within double quotes]
  366. I work around spaces in the home directory name, by creating a
  367. new directory that does not contain any spaces, such as /home/nuttx.
  368. Then I install NuttX in /home/nuttx and always build from
  369. /home/nuttx/nuttx-code.
  370. Downloading from Repositories
  371. -----------------------------
  372. Cloning the Repository
  373. BEFORE cloning repositories on any Windows platform do the following GIT
  374. command:
  375. git config --global core.autocrlf false
  376. That will avoid conversions of linefeeds (newlines, \n) to carriage
  377. return plus linefeed sequences (\r\n)
  378. The current NuttX du jour is available in from a GIT repository. Here are
  379. instructions for cloning the core NuttX RTOS (corresponding to the nuttx
  380. tarball discussed above)::
  381. git clone https://bitbucket.org/nuttx/nuttx.git nuttx
  382. And the semi-optional apps/ application directory and be cloned like:
  383. git clone https://bitbucket.org/nuttx/apps.git apps
  384. That will give you the same directory structure like this:
  385. |
  386. +----+----+
  387. | |
  388. nuttx/ apps/
  389. Configuring the Clones
  390. The following steps need to be performed for each of the repositories.
  391. After changing to the clone directory:
  392. Set your identity:
  393. git config --global user.name "My Name"
  394. git config --global user.email my.name@example.com
  395. Colorized diffs are much easier to read:
  396. git config --global color.branch auto
  397. git config --global color.diff auto
  398. git config --global color.interactive auto
  399. git config --global color.status auto
  400. Checkout other settings
  401. git config --list
  402. Cloning NuttX Inside Cygwin
  403. If you are cloning the NuttX repository, it is recommended to avoid
  404. automatic end of lines conversions by git. These conversions may break
  405. some scripts like configure.sh. Before cloning, do the following:
  406. git config --global core.autocrlf false
  407. Related Repositories
  408. --------------------
  409. These are standalone repositories:
  410. * https://bitbucket.org/nuttx/apps
  411. This directory holds an optional package of applications and libraries
  412. can be used with the NuttX RTOS. There is a README.txt file there that
  413. will provide more information about that package.
  414. * https://bitbucket.org/nuttx/nxwidgets
  415. This is the NuttX C++ graphics support. This includes NxWM, the tiny
  416. NuttX Window Manager.
  417. * https://bitbucket.org/nuttx/uclibc
  418. This repository contains a version of the uClibc++ C++ library. This code
  419. originates from http://cxx.uclibc.org/ and has been adapted for NuttX by the
  420. RGMP team (http://rgmp.sourceforge.net/wiki/index.php/Main_Page).
  421. * https://bitbucket.org/nuttx/buildroot
  422. A environment that you can to use to build a custom, NuttX GNU toolchain.
  423. * https://bitbucket.org/nuttx/tools
  424. There are snapshots of some tools here that you will need to work with
  425. NuttX: kconfig-frontends, genromfs, and others.
  426. Notes about Header Files
  427. ------------------------
  428. Other C-Library Header Files.
  429. When a GCC toolchain is built, it must be built against a C library.
  430. The compiler together with the contents of the C library completes the
  431. C language definition and provides the complete C development
  432. environment. NuttX provides its own, built-in C library. So the
  433. complete, consistent C language definition for use with NuttX comes from
  434. the combination of the compiler and the header files provided by the
  435. NuttX C library.
  436. When a GCC toolchain is built, it incorporates the C library header
  437. files into the compiler internal directories and, in this way, the C
  438. library really becomes a part of the toolchain. If you use the NuttX
  439. buildroot toolchain as described below under "NuttX Buildroot
  440. Toolchain", your GCC toolchain will build against the NuttX C library
  441. and will incorporate the NuttX C library header files as part of the
  442. toolchain.
  443. If you use some other, third-party tool chain, this will not be the
  444. case, however. Those toolchains were probably built against some
  445. other, incompatible C library distribution (such as newlib). Those
  446. tools will have incorporated the incompatible C library header files
  447. as part of the toolchain. These incompatible header files must *not*
  448. be used with NuttX because they will conflict with definitions in the
  449. NuttX built-in C-Library. For such toolchains that include header
  450. files from a foreign C-Library, NuttX must be compiled without using
  451. the standard header files that are distributed with your toolchain.
  452. This prevents including conflicting, incompatible header files such
  453. as stdio.h.
  454. The math.h and stdarg.h are probably the two most trouble some header
  455. files to deal with. These troublesome header files are discussed in
  456. more detail below.
  457. Header Files Provided by Your Toolchain.
  458. Certain header files, such as setjmp.h, stdarg.h, and math.h, may still
  459. be needed from your toolchain and your compiler may not, however, be able
  460. to find these if you compile NuttX without using standard header files
  461. (i.e., with -nostdinc). If that is the case, one solution is to copy
  462. those header file from your toolchain into the NuttX include directory.
  463. Duplicated Header Files.
  464. There are also a few header files that can be found in the nuttx/include
  465. directory which are duplicated by the header files from your toolchain.
  466. stdint.h and stdbool.h are examples. If you prefer to use the stdint.h
  467. and stdbool.h header files from your toolchain, those could be copied
  468. into the nuttx/include/ directory. Using most other header files from
  469. your toolchain would probably cause errors.
  470. math.h
  471. Even though you should not use a foreign C-Library, you may still need
  472. to use other, external libraries with NuttX. In particular, you may
  473. need to use the math library, libm.a. NuttX supports a generic, built-in
  474. math library that can be enabled using CONFIG_LIBM=y. However, you may
  475. still want to use a higher performance external math library that has
  476. been tuned for your CPU. Sometimes such tuned math libraries are
  477. bundled with your toolchain.
  478. The math library header file, math.h, is a then special case. If you do
  479. nothing, the standard math.h header file that is provided with your
  480. toolchain will be used.
  481. If you have a custom, architecture specific math.h header file, then
  482. that header file should be placed at arch/<cpu>/include/math.h. There
  483. is a stub math.h header file located at include/nuttx/lib/math.h. This stub
  484. header file can be used to "redirect" the inclusion to an architecture-
  485. specific math.h header file. If you add an architecture specific math.h
  486. header file then you should also define CONFIG_ARCH_MATH_H=y in your
  487. NuttX Configuration file. If CONFIG_ARCH_MATH_H is selected, then the
  488. top-level Makefile will copy the stub math.h header file from
  489. include/nuttx/lib/math.h to include/math.h where it will become the system
  490. math.h header file. The stub math.h header file does nothing other
  491. than to include that architecture-specific math.h header file as the
  492. system math.h header file.
  493. float.h
  494. If you enable the generic, built-in math library, then that math library
  495. will expect your toolchain to provide the standard float.h header file.
  496. The float.h header file defines the properties of your floating point
  497. implementation. It would always be best to use your toolchain's float.h
  498. header file but if none is available, a default float.h header file will
  499. be provided if this option is selected. However, there is no assurance
  500. that the settings in this float.h are actually correct for your platform!
  501. stdarg.h
  502. In most cases, the correct version of stdarg.h is the version provided
  503. with your toolchain. However, sometimes there are issues with
  504. using your toolchains stdarg.h. For example, it may attempt to draw in
  505. header files that do not exist in NuttX or perhaps the header files that
  506. it uses are not compatible with the NuttX header files. In those cases,
  507. you can use an architecture-specific stdarg.h header file by defining
  508. CONFIG_ARCH_STDARG_H=y.
  509. See the discussion above for the math.h header. This setting works
  510. exactly the same for the stdarg.h header file.
  511. CONFIGURING NUTTX
  512. ^^^^^^^^^^^^^^^^^
  513. Instantiating "Canned" Configurations
  514. -------------------------------------
  515. configure.sh and configure.bat:
  516. "Canned" NuttX configuration files are retained in:
  517. boards/<arch-name>/<chip-name>/<board-name>/configs/<config-dir>
  518. Where <board-name> is the name of your development board and <config-dir>
  519. is the name of the sub-directory containing a specific configuration for
  520. that board. <arch-name> and <chip-name> refer to characteristics of the
  521. MCU used on the board: <arch-name> is the CPU architecture implemented
  522. by the MCU; <chip-name> identifies the MCU chip family. Only a few
  523. steps are required to instantiate a NuttX configuration, but to make the
  524. configuration even easier there are scripts available in the tools/
  525. sub-directory combines those simple steps into one command.
  526. There is one tool for use with any Bash-like shell that does configuration
  527. steps. It is used as follows:
  528. tools/configure.sh <board-name>:<config-dir>
  529. There is an alternative Windows batch file that can be used in the windows
  530. native environment like:
  531. tools\configure.bat <board-name>:<config-dir>
  532. And, to make sure that other platforms are supported, there is also a
  533. C program at tools/configure.c that can be compiled to establish the
  534. board configuration.
  535. See tools/README.txt for more information about these scripts.
  536. General information about configuring NuttX can be found in:
  537. {TOPDIR}/boards/README.txt
  538. {TOPDIR}/boards/<arch-name>/<chip-name>/<board-name>/README.txt
  539. The Hidden Configuration Scripts:
  540. As mentioned above, there are only a few simple steps to instantiating a
  541. NuttX configuration. Those steps are hidden by the configuration scripts
  542. but are summarized below:
  543. 1. Copy Files
  544. Configuring NuttX requires only copying two files from the
  545. <config-dir> to the directory where you installed NuttX (TOPDIR):
  546. Copy boards/<arch-name>/<chip-name>/<board-name>/configs/<config-dir>/Make.def
  547. to {TOPDIR}/Make.defs
  548. OR
  549. Copy boards/<arch-name>/<chip-name>/<board-name>/scripts/Make.def
  550. to {TOPDIR}/Make.defs
  551. Make.defs describes the rules needed by your tool chain to compile
  552. and link code. You may need to modify this file to match the
  553. specific needs of your toolchain. NOTE that a configuration may
  554. have its own unique Make.defs file in its configuration directory or
  555. it may use a common Make.defs file for the board in the scripts/
  556. directory. The first takes precedence.
  557. Copy boards/<arch-name>/<chip-name>/<board-name>/configs/<config-dir>/defconfig
  558. to{TOPDIR}/.config
  559. The defconfig file holds the actual build configuration. This
  560. file is included by all other make files to determine what is
  561. included in the build and what is not. This file is also used
  562. to generate a C configuration header at include/nuttx/config.h.
  563. Copy other, environment-specific files to{TOPDIR}
  564. This might include files like .gdbinit or IDE configuration files
  565. like .project or .cproject.
  566. 2. Refresh the Configuration
  567. New configuration setting may be added or removed. Existing settings
  568. may also change there values or options. This must be handled by
  569. refreshing the configuration as described below.
  570. NOTE: NuttX uses only compressed defconfig files. For the NuttX
  571. defconfig files, this refreshing step is *NOT* optional; it is also
  572. necessary to uncompress and regenerate the full making file. This is
  573. discussed further below.
  574. Refreshing Configurations
  575. -------------------------
  576. Configurations can get out of date. As new configuration settings are
  577. added or removed or as dependencies between configuration settings
  578. change, the contents of a default configuration can become out of synch
  579. with the build systems. Hence, it is a good practice to "refresh" each
  580. configuration after configuring and before making. To refresh the
  581. configuration, use the NuttX Configuration Tool like this:
  582. make oldconfig
  583. AFTER you have instantiated the NuttX configuration as described above.
  584. The configuration step copied the .config file into place in the top-level
  585. NuttX directory; 'make oldconfig' step will then operate on that .config
  586. file to bring it up-to-date.
  587. If your configuration is out of date, you will be prompted by 'make oldconfig'
  588. to resolve the issues detected by the configuration tool, that is, to
  589. provide values for the new configuration options in the build system. Doing
  590. this can save you a lot of problems down the road due to obsolete settings in
  591. the default board configuration file. The NuttX configuration tool is
  592. discussed in more detail in the following paragraph.
  593. Confused about what the correct value for a new configuration item should
  594. be? Enter ? in response to the 'make oldconfig' prompt and it will show
  595. you the help text that goes with the option.
  596. If you don't want to make any decisions are willing to just accept the
  597. recommended default value for each new configuration item, an even easier
  598. way is:
  599. make olddefconfig
  600. The olddefconfig target will simply bring your configuration up to date with
  601. the current Kconfig files, setting any new options to the default value.
  602. No questions asked.
  603. NuttX Configuration Tool
  604. ------------------------
  605. An automated tool has been incorporated to support re-configuration
  606. of NuttX. This tool is based on the kconfig-frontends application available
  607. at https://bitbucket.org/nuttx/tools/src/master/kconfig-frontends/. (This
  608. is a snapshot of http://ymorin.is-a-geek.org/projects/kconfig-frontends.)
  609. This application provides a tool called 'kconfig-mconf' that is used by the
  610. NuttX top-level Makefile. The following make target is provided:
  611. make menuconfig
  612. This make target will bring up NuttX configuration menus.
  613. WARNING: Never do 'make menuconfig' on a configuration that has
  614. not been converted to use the kconfig-frontends tools! This will
  615. damage your configuration (see
  616. http://www.nuttx.org/doku.php?id=wiki:howtos:convertconfig).
  617. How do we tell a new configuration from an old one? See "Incompatibilities
  618. with Older Configurations" below.
  619. The 'menuconfig' make target depends on two things:
  620. 1. The Kconfig configuration data files that appear in almost all
  621. NuttX directories. These data files are the part that is still
  622. under development (patches are welcome!). The Kconfig files
  623. contain configuration information for the configuration settings
  624. relevant to the directory in which the Kconfig file resides.
  625. NOTE: For a description of the syntax of this configuration file,
  626. see kconfig-language.txt in the tools repository at
  627. https://bitbucket.org/nuttx/tools
  628. 2. The 'kconfig-mconf' tool. 'kconfig-mconf' is part of the
  629. kconfig-frontends package. You can download that package from the
  630. snapshot in the tools repository at https://bitbucket.org/nuttx/tools.
  631. Building kconfig-frontends under Linux may be as simple as
  632. 'configure; make; make install' but there may be some build
  633. complexities, especially if you are building under Cygwin. See
  634. the more detailed build instructions in the top-level README.txt
  635. file of the tools repository at https://bitbucket.org/nuttx/tools.
  636. The 'make install' step will, by default, install the 'kconfig-mconf'
  637. tool at /usr/local/bin/mconf. Where ever you choose to
  638. install 'kconfig-mconf', make certain that your PATH variable includes
  639. a path to that installation directory.
  640. The kconfig-frontends tools will not build in a native Windows
  641. environment directly "out-of-the-box". For the Windows native
  642. case, you should use the modified version of kconfig-frontends
  643. that can be found at
  644. http://uvc.de/posts/linux-kernel-configuration-tool-mconf-under-windows.html
  645. The basic configuration order is "bottom-up":
  646. - Select the build environment,
  647. - Select the processor,
  648. - Select the board,
  649. - Select the supported peripherals
  650. - Configure the device drivers,
  651. - Configure the application options on top of this.
  652. This is pretty straight forward for creating new configurations
  653. but may be less intuitive for modifying existing configurations.
  654. Another ncurses-based tool that is an option to kconfig-mconf is
  655. kconfig-nconf. The differences are primary in in the aesthetics of the
  656. UI. If you have kconfig-nconf built, then you can invoke that front end
  657. with:
  658. make nconfig
  659. If you have an environment that supports the Qt or GTK graphical systems
  660. (probably KDE or gnome, respectively, or Cygwin under Windows with Qt or
  661. GTK installed), then you can also build the graphical kconfig-frontends,
  662. kconfig-qconf and kconfig-gconf. In these case, you can start the
  663. graphical configurator with either:
  664. make qconfig
  665. or
  666. make gconfig
  667. Some keyboard shortcuts supported by kconfig-mconf, the tool that runs
  668. when you do 'make menuconfig':
  669. - '?' will bring up the mconfig help display.
  670. - '/' can be used find configuration selections.
  671. - 'Z' can be used to reveal hidden configuration options
  672. These last two shortcuts are described further in the following
  673. paragraphs.
  674. Finding Selections in the Configuration Menus
  675. ---------------------------------------------
  676. The NuttX configuration options have gotten complex and it can be very
  677. difficult to find options in the menu trees if you are not sure where
  678. to look. The "basic configuration order" describe above can help to
  679. narrow things down.
  680. But if you know exactly what configuration setting you want to select,
  681. say CONFIG_XYZ, but not where to find it, then the 'make menuconfig'
  682. version of the tool offers some help: By pressing the '/' key, the
  683. tool will bring up a menu that will allow you to search for a
  684. configuration item. Just enter the string CONFIG_XYZ and press 'ENTER'.
  685. It will show you not only where to find the configuration item, but
  686. also all of the dependencies related to the configuration item.
  687. Reveal Hidden Configuration Options
  688. -----------------------------------
  689. If you type 'Z', then kconfig-mconf will change what is displayed.
  690. Normally, only enabled features that have all of their dependencies met
  691. are displayed. That is, of course, not very useful if you would like to
  692. discover new options or if you are looking for an option and do not
  693. realize that the dependencies have not yet been selected and, hence, it
  694. is not displayed.
  695. But if you enter 'Z', then every option will be shown, whether or not its
  696. dependencies have been met. You can then see everything that could be
  697. selected with the right dependency selections. These additional options
  698. will be shown the '-' for the selection and for the value (since it
  699. cannot be selected and has no value). About all you do is to select
  700. the <Help> option to see what the dependencies are.
  701. Make Sure that You are on the Right Platform
  702. --------------------------------------------
  703. Saved configurations may run on Linux, Cygwin (32- or 64-bit), or other
  704. platforms. The platform characteristics can be changed use 'make
  705. menuconfig'. Sometimes this can be confusing due to the differences
  706. between the platforms. Enter sethost.sh
  707. sethost.sh is a simple script that changes a configuration to your
  708. host platform. This can greatly simplify life if you use many different
  709. configurations. For example, if you are running on Linux and you
  710. configure like this:
  711. tools/configure.sh board:configuration
  712. The you can use the following command to both (1) make sure that the
  713. configuration is up to date, AND (2) the configuration is set up
  714. correctly for Linux:
  715. tools/sethost.sh -l
  716. Or, if you are on a Windows/Cygwin 64-bit platform:
  717. tools/sethost.sh -c
  718. Or, for MSYS/MSYS2:
  719. tools/sethost.sh -g
  720. Other options are available from the help option built into the
  721. script. You can see all options with:
  722. tools/sethost.sh -h
  723. Recently, the options to the configure.sh (and configure.bat) scripts have
  724. been extended so that you both setup the configuration, select for the host
  725. platform that you use, and uncompress and refresh the defconfig file all in
  726. one command like:
  727. tools/configure.sh -l board:configuration
  728. For a Linux host or for a Windows/Cygwin host:
  729. tools/configure.sh -h board:configuration
  730. Other options are available from the help option built into the
  731. script. You can see all options with:
  732. tools/configure.sh -h
  733. Comparing Two Configurations
  734. ----------------------------
  735. If you try to compare two configurations using 'diff', you will probably
  736. not be happy with the result. There are superfluous things added to
  737. the configuration files that make comparisons with the human eye
  738. difficult.
  739. There is a tool at nuttx/tools/cmpconfig.c that can be built to simplify
  740. these comparisons. The output from this difference tool will show only
  741. the meaningful differences between two configuration files. This tool is
  742. built as follows:
  743. cd nuttx/tools
  744. make -f Makefile.host
  745. This will create a program called 'cmpconfig' or 'comconfig.exe' on Windows.
  746. Why would you want to compare two configuration files? Here are a few
  747. of the reasons why I do this
  748. 1. When I create a new configuration I usually base it on an older
  749. configuration and I want to know, "What are the options that I need to
  750. change to add the new feature to the older configurations?" For example,
  751. suppose that I have a boardA/nsh configuration and I want to create a
  752. boardA/nxwm configuration. Suppose I already have boardB/nsh and
  753. boardB/nxwm configurations. Then by comparing the boardB/nsh with the
  754. boardB/nxwm I can see the modifications that I would need to make to my
  755. boardA/nsh to create a new boardA/nxwm.
  756. 2. But the most common reason that I use the 'cmpconfig' program is to
  757. check the results of "refreshing" a configuration with 'make oldconfig'
  758. (see the paragraph "Refreshing Configurations" above). The 'make
  759. oldconfig' command will make changes to my configuration and using
  760. 'cmpconfig', I can see precisely what those changes were and if any
  761. should be of concern to me.
  762. 3. The 'cmpconfig' tool can also be useful when converting older, legacy
  763. manual configurations to the current configurations based on the
  764. kconfig-frontends tools. See the following paragraph.
  765. Making defconfig Files
  766. ----------------------
  767. .config Files as defconfig Files:
  768. The minimum defconfig file is simply the generated .config file with
  769. CONFIG_APPS_DIR setting removed or commented out. That setting provides
  770. the name and location of the apps/ directory relative to the nuttx build
  771. directory. The default is ../apps/, however, the apps directory may be
  772. any other location and may have a different name. For example, the name
  773. of versioned NuttX releases are always in the form apps-xx.yy where xx.yy
  774. is the version number.
  775. Finding the apps/ Directory Path:
  776. When the default configuration is installed using one of the scripts or
  777. programs in the NuttX tools directory, there will be an option to provide
  778. the path to the apps/ directory. If not provided, then the configure tool
  779. will look around and try to make a reasonable decision about where the
  780. apps/ directory is located.
  781. Compressed defconfig Files:
  782. The Makefile also supports an option to generate very small defconfig
  783. files. The .config files are quite large and complex. But most of the
  784. settings in the .config file simply have the default settings from the
  785. Kconfig files. These .config files can be converted into small defconfig
  786. file:
  787. make savedefconfig
  788. That make target will generate a defconfig file in the top-level
  789. directory. The size reduction is really quite remarkable:
  790. wc -l .config defconfig
  791. 1085 .config
  792. 82 defconfig
  793. 1167 total
  794. In order to be usable, the .config file installed from the compressed
  795. defconfig file must be reconstituted using:
  796. make olddefconfig
  797. NOTE 1: Only compressed defconfig files are retained in the NuttX repository.
  798. All patches and PRs that attempt to add or modify a defconfig file MUST
  799. use the compressed defconfig format as created by 'make savdefconfig.'
  800. NOTE 2: When 'make savedefconfig' runs it will try several things some of
  801. which are expected to fail. In these cases you will see an error message
  802. from make followed by "(ignored)." You should also ignore these messages
  803. CAUTION: This size reduction was accomplished by removing all setting
  804. from the .config file that were at the default value. 'make olddefconfig'
  805. can regenerate the original .config file by simply restoring those default
  806. settings. The underlying assumption here is, of course, that the default
  807. settings do not change. If the default settings change, and they often
  808. do, then the original .config may not be reproducible.
  809. So if your project requires 100% reproducibility over a long period of
  810. time, you make want to save the complete .config files vs. the standard,
  811. compressed defconfig file.
  812. Configuring with "Compressed" defconfig Files:
  813. As described above defconfig, all NuttX defconfig files are compressed
  814. using 'make savedeconfig'. These compressed defconfig files are
  815. generally not fully usable as they are and may not build the target
  816. binaries that you want because the compression process removed all of
  817. the default settings from the defconfig file. To restore the default
  818. settings, you should run the following after configuring:
  819. make olddefconfig
  820. That will restore the the missing defaulted values.
  821. Using this command after configuring is generally a good practice anyway:
  822. Even if the defconfig files are not "compressed" in this fashion, the
  823. defconfig file may be old and the only way to assure that the installed
  824. .config is is up to date is via 'make oldconfig' or 'make olddefconfig'.
  825. See the paragraph above entitled ""Refreshing Configurations" for
  826. additional information.
  827. Incompatibilities with Older Configurations
  828. -------------------------------------------
  829. ***** WARNING *****
  830. The current NuttX build system supports *only* the new compressed,
  831. defconfig configuration files generated using the kconfig-frontends tools
  832. as described in the preceding section. Support for the older, legacy,
  833. manual configurations was eliminated in NuttX 7.0; support for
  834. uncompressed .config-files-as-defconfig files was eliminated after
  835. NuttX-7.21. All configurations must now be done using the
  836. kconfig-frontends tool. The older manual configurations and the new
  837. kconfig-frontends configurations are not compatible. Old legacy
  838. configurations can *not* be used with the kconfig-frontends tool and,
  839. hence, cannot be used with releases of NuttX 7.0 and beyond:
  840. If you run 'make menuconfig' with a legacy configuration the resulting
  841. configuration will probably not be functional.
  842. Q: How can I tell if a configuration is a new kconfig-frontends
  843. configuration or an older, manual configuration?
  844. A: Only old, manual configurations will have an appconfig file
  845. Q: How can I convert a older, manual configuration into a new,
  846. kconfig-frontends toolchain.
  847. A: Refer to http://www.nuttx.org/doku.php?id=wiki:howtos:convertconfig
  848. ***** WARNING *****
  849. As described above, whenever you use a configuration, you really should
  850. always refresh the configuration with the following command *before* you
  851. make NuttX:
  852. make oldconfig
  853. OR
  854. make olddefconfig
  855. This will make sure that the configuration is up-to-date in the event that
  856. it has lapsed behind the current NuttX development (see the paragraph
  857. "Refreshing Configurations" above). But this only works with *new*
  858. configuration files created with the kconfig-frontends tools.
  859. Further, this step is *NOT* optional with the new, compressed defconfig
  860. files. It is a necessary step that will also uncompress the defconfig
  861. file, regenerating the .config and making it usable for NuttX builds.
  862. Never do 'make oldconfig' (OR 'make menuconfig') on a configuration that
  863. has not been converted to use the kconfig-frontends tools! This will
  864. damage your configuration (see
  865. http://www.nuttx.org/doku.php?id=wiki:howtos:convertconfig).
  866. NuttX Configuration Tool under DOS
  867. ----------------------------------
  868. Recent versions of NuttX support building NuttX from a native Windows
  869. console window (see "Native Windows Build" below). But kconfig-frontends
  870. is a Linux tool. At one time this was a problem for Windows users, but
  871. now there is a specially modified version of the kconfig-frontends tools
  872. that can be used:
  873. http://uvc.de/posts/linux-kernel-configuration-tool-mconf-under-windows.html
  874. The configuration steps most recent versions of NuttX require the
  875. kconfig-tweak tool that is not not available in the the above. However,
  876. there has been an update to this Kconfig Windows tools that does include
  877. kconfig-tweak: http://reclonelabs.com/more-kconfig-awesomeness-for-windows/
  878. Source code is available here: https://github.com/reclone/kconfig-frontends-win32
  879. and https://github.com/reclone/kconfig-frontends-win32/releases
  880. It is also possible to use the version of kconfig-frontends built
  881. under Cygwin outside of the Cygwin "sandbox" in a native Windows
  882. environment:
  883. 1. You can run the configuration tool using Cygwin. However, the
  884. Cygwin Makefile.win will complain so to do this will, you have
  885. to manually edit the .config file:
  886. a. Delete the line: CONFIG_WINDOWS_NATIVE=y
  887. b. Change the apps/ directory path, CONFIG_APPS_DIR to use Unix
  888. style delimiters. For example, change "..\apps" to "../apps"
  889. And of course, after you use the configuration tool you need to
  890. restore CONFIG_WINDOWS_NATIVE=y and the correct CONFIG_APPS_DIR.
  891. 2) You can, with some effort, run the Cygwin kconfig-mconf tool
  892. directly in the Windows console window. In this case, you do not
  893. have to modify the .config file, but there are other complexities:
  894. a. You need to temporarily set the Cygwin directories in the PATH
  895. variable then run kconfig-mconf manually like:
  896. kconfig-mconf Kconfig
  897. There is a Windows batch file at tools/kconfig.bat that automates
  898. these steps:
  899. tools/kconfig menuconfig
  900. b. There is an issue with accessing DOS environment variables from
  901. the Cygwin kconfig-mconf running in the Windows console. The
  902. following change to the top-level Kconfig file seems to work
  903. around these problems:
  904. config APPSDIR
  905. string
  906. - option env="APPSDIR"
  907. + default "../apps"
  908. TOOLCHAINS
  909. ^^^^^^^^^^
  910. Cross-Development Toolchains
  911. ----------------------------
  912. In order to build NuttX for your board, you will have to obtain a cross-
  913. compiler to generate code for your target CPU. For each board,
  914. configuration, there is a README.txt file (at
  915. boards/<arch-name>/<chip-name>/<board-name>/README.txt).
  916. That README file contains suggestions and information about appropriate
  917. tools and development environments for use with your board.
  918. In any case, the PATH environment variable will need to be updated to
  919. include the location where the build can find the toolchain binaries.
  920. NuttX Buildroot Toolchain
  921. -------------------------
  922. For many configurations, a DIY set of tools is available for NuttX. These
  923. tools can be downloaded from the NuttX Bitbucket.org file repository. After
  924. unpacking the buildroot tarball, you can find instructions for building
  925. the tools in the buildroot/boards/README.txt file.
  926. Check the README.txt file in the configuration directory for your board
  927. to see if you can use the buildroot toolchain with your board (this
  928. README.txt file is located in
  929. boards/<arch-name>/<chip-name>/<board-name>/README.txt).
  930. This toolchain is available for both the Linux and Cygwin development
  931. environments.
  932. Advantages: (1) NuttX header files are built into the tool chain,
  933. and (2) related support tools like NXFLAT tools, the ROMFS
  934. genromfs tools, and the kconfig-frontends tools can be built into your
  935. toolchain.
  936. Disadvantages: This tool chain is not was well supported as some other
  937. toolchains. GNU tools are not my priority and so the buildroot tools
  938. often get behind. For example, until recently there was no EABI support
  939. in the NuttX buildroot toolchain for ARM.
  940. NOTE: For Cortex-M3/4, there are OABI and EABI versions of the buildroot
  941. toolchains. If you are using the older OABI toolchain the prefix for
  942. the tools will be arm-nuttx-elf-; for the EABI toolchain the prefix will
  943. be arm-nuttx-eabi-. If you are using the older OABI toolchain with
  944. an ARM Cortex-M3/4, you will need to set CONFIG_ARMV7M_OABI_TOOLCHAIN
  945. in the .config file in order to pick the right tool prefix.
  946. If the make system ever picks the wrong prefix for your toolchain, you
  947. can always specify the prefix on the command to override the default
  948. like:
  949. make CROSSDEV=arm-nuttx-elf
  950. SHELLS
  951. ^^^^^^
  952. The NuttX build relies on some shell scripts. Some are inline in the
  953. Makefiles and many are executable scripts in the tools/. directory. The
  954. scripts were all developed using bash and many contain bash shell
  955. dependencies.
  956. Most of the scripts begin with #!/bin/bash to specifically select the
  957. bash shell. Some still have #!/bin/sh but I haven't heard any complaints
  958. so these must not have bash dependencies.
  959. There are two shell issues that I have heard of:
  960. 1. Linux where /bin/sh refers to an incompatible shell (like ksh or csh).
  961. In this case, bash is probably available and the #!/bin/bash at the
  962. beginning of the file should do the job. If any scripts with #!/bin/sh
  963. fail, try changing that to #!/bin/bash and let me know about the change.
  964. 2. FreeBSD with the Bourne Shell and no bash shell.
  965. The other, reverse case has also been reported on FreeBSD setups that
  966. have the Bourne shell, but not bash. In this base, #!/bin/bash fails
  967. but #!/bin/sh works okay. My recommendation in this case is to create
  968. a symbolic link at /bin/bash that refers to the Bourne shell.
  969. There may still be issues, however, with certain the bash-centric scripts
  970. that will require modifications.
  971. BUILDING NUTTX
  972. ^^^^^^^^^^^^^^
  973. Building
  974. --------
  975. NuttX builds in-place in the source tree. You do not need to create
  976. any special build directories. Assuming that your Make.defs is setup
  977. properly for your tool chain and that PATH environment variable contains
  978. the path to where your cross-development tools are installed, the
  979. following steps are all that are required to build NuttX:
  980. cd{TOPDIR}
  981. make
  982. At least one configuration (eagle100) requires additional command line
  983. arguments on the make command. Read
  984. {TOPDIR}/boards/<arch-name>/<chip-name>/<board-name>/README.txt to see
  985. if that applies to your target.
  986. Re-building
  987. -----------
  988. Re-building is normally simple -- just type make again.
  989. But there are some things that can "get you" when you use the Cygwin
  990. development environment with Windows native tools. The native Windows
  991. tools do not understand Cygwin's symbolic links, so the NuttX make system
  992. does something weird: It copies the configuration directories instead of
  993. linking to them (it could, perhaps, use the NTFS 'mklink' command, but it
  994. doesn't).
  995. A consequence of this is that you can easily get confused when you edit
  996. a file in one of the linked (i.e., copied) directories, re-build NuttX,
  997. and then not see your changes when you run the program. That is because
  998. build is still using the version of the file in the copied directory, not
  999. your modified file!
  1000. Older versions of NuttX did not support dependencies in this
  1001. configuration. So a simple work around this annoying behavior in this
  1002. case was the following when you re-build:
  1003. make clean_context all
  1004. This 'make' command will remove of the copied directories, re-copy them,
  1005. then make NuttX.
  1006. However, more recent versions of NuttX do support dependencies for the
  1007. Cygwin build. As a result, the above command will cause everything to be
  1008. rebuilt (because it removes and will cause recreating the
  1009. include/nuttx/config.h header file). A much less gracefully but still
  1010. effective command in this case is the following for the ARM configuration:
  1011. rm -rf arch/arm/src/chip arch/arm/src/board
  1012. This "kludge" simple removes the copied directories. These directories
  1013. will be re-created when you do a normal 'make' and your edits will then be
  1014. effective.
  1015. Build Targets and Options
  1016. -------------------------
  1017. Build Targets:
  1018. Below is a summary of the build targets available in the top-level
  1019. NuttX Makefile:
  1020. all
  1021. The default target builds the NuttX executable in the selected output
  1022. formats.
  1023. clean
  1024. Removes derived object files, archives, executables, and temporary
  1025. files, but retains the configuration and context files and directories.
  1026. distclean
  1027. Does 'clean' then also removes all configuration and context files.
  1028. This essentially restores the directory structure to its original,
  1029. unconfigured stated.
  1030. Application housekeeping targets. The APPDIR variable refers to the user
  1031. application directory. A sample apps/ directory is included with NuttX,
  1032. however, this is not treated as part of NuttX and may be replaced with a
  1033. different application directory. For the most part, the application
  1034. directory is treated like any other build directory in the Makefile script.
  1035. However, as a convenience, the following targets are included to support
  1036. housekeeping functions in the user application directory from the NuttX
  1037. build directory.
  1038. apps_clean
  1039. Perform the clean operation only in the user application directory
  1040. apps_distclean
  1041. Perform the distclean operation only in the user application directory.
  1042. The apps/.config file is preserved so that this is not a "full" distclean
  1043. but more of a configuration "reset" for the application directory.
  1044. export
  1045. The export target will package the NuttX libraries and header files into
  1046. an exportable package. Caveats: (1) These needs some extension for the KERNEL
  1047. build. (2) The logic in tools/mkexport.sh only supports GCC and, for example,
  1048. explicitly assumes that the archiver is 'ar'
  1049. download
  1050. This is a helper target that will rebuild NuttX and download it to the target
  1051. system in one step. The operation of this target depends completely upon
  1052. implementation of the DOWNLOAD command in the user Make.defs file. It will
  1053. generate an error an error if the DOWNLOAD command is not defined.
  1054. The following targets are used internally by the make logic but can be invoked
  1055. from the command under certain conditions if necessary.
  1056. depend
  1057. Create build dependencies. (NOTE: There is currently no support for build
  1058. dependencies under Cygwin using Windows-native toolchains.)
  1059. context
  1060. The context target is invoked on each target build to assure that NuttX is
  1061. properly configured. The basic configuration steps include creation of the
  1062. the config.h and version.h header files in the include/nuttx directory and
  1063. the establishment of symbolic links to configured directories.
  1064. clean_context
  1065. This is part of the distclean target. It removes all of the header files
  1066. and symbolic links created by the context target.
  1067. Build Options:
  1068. Of course, the value any make variable an be overridden from the make command
  1069. line. However, there is one particular variable assignment option that may
  1070. be useful to you:
  1071. V=1
  1072. This is the build "verbosity flag." If you specify V=1 on the make command
  1073. line, you will see the exact commands used in the build. This can be very
  1074. useful when adding new boards or tracking down compile time errors and
  1075. warnings (Contributed by Richard Cochran).
  1076. Native Windows Build
  1077. --------------------
  1078. The beginnings of a Windows native build are in place but still not often
  1079. used as of this writing. The build was functional but because of lack of
  1080. use may find some issues to be resolved with this build configuration.
  1081. The windows native build logic initiated if CONFIG_WINDOWS_NATIVE=y is
  1082. defined in the NuttX configuration file:
  1083. This build:
  1084. - Uses all Windows style paths
  1085. - Uses primarily Windows batch commands from cmd.exe, with
  1086. - A few extensions from GNUWin32
  1087. In this build, you cannot use a Cygwin or MSYS shell. Rather the build must
  1088. be performed in a Windows console window. Here is a better terminal than the
  1089. standard issue, CMD.exe terminal: ConEmu which can be downloaded from:
  1090. https://sourceforge.net/projects/conemu/ or https://conemu.github.io/ .
  1091. Build Tools. The build still relies on some Unix-like commands. I use
  1092. the GNUWin32 tools that can be downloaded from http://gnuwin32.sourceforge.net/
  1093. using the 'Download all' selection. Individual packages can be download
  1094. instead if you know what you are doing and want a faster download (No, I
  1095. can't tell you which packages you should or should not download).
  1096. Host Compiler: I use the MingGW GCC compiler which can be downloaded from
  1097. http://www.mingw.org/. If you are using GNUWin32, then it is recommended
  1098. the you not install the optional MSYS components as there may be conflicts.
  1099. This capability should still be considered a work in progress because:
  1100. (1) It has not been verified on all targets and tools, and
  1101. (2) it still lacks some of the creature-comforts of the more mature
  1102. environments.
  1103. Installing GNUWin32
  1104. -------------------
  1105. The Windows native build will depend upon a few Unix-like tools that can be
  1106. provided either by MSYS or GNUWin32. The GNUWin32 are available from
  1107. http://gnuwin32.sourceforge.net/. GNUWin32 provides ports of tools with a
  1108. GPL or similar open source license to modern MS-Windows (Microsoft Windows
  1109. 2000 / XP / 2003 / Vista / 2008 / 7). See
  1110. http://gnuwin32.sourceforge.net/packages.html for a list of all of the tools
  1111. available in the GNUWin32 package.
  1112. The SourceForge project is located here:
  1113. http://sourceforge.net/projects/gnuwin32/. The project is still being
  1114. actively supported (although some of the Windows ports have gotten very old).
  1115. Some commercial toolchains include a subset of the GNUWin32 tools in the
  1116. installation. My recommendation is that you download the GNUWin32 tools
  1117. directly from the sourceforge.net website so that you will know what you are
  1118. using and can reproduce your build environment.
  1119. GNUWin32 Installation Steps:
  1120. The following steps will download and execute the GNUWin32 installer.
  1121. 1. Download GetGNUWin32-x.x.x.exe from
  1122. http://sourceforge.net/projects/getgnuwin32/files/. This is the
  1123. installer. The current version as of this writing is 0.6.3.
  1124. 2. Run the installer.
  1125. 3. Accept the license.
  1126. 4. Select the installation directory. My recommendation is the
  1127. directory that contains this README file (<this-directory>).
  1128. 5. After running GetGNUWin32-0.x.x.exe, you will have a new directory
  1129. <this-directory>/GetGNUWin32
  1130. Note that the GNUWin32 installer didn't install GNUWin32. Instead, it
  1131. installed another, smarter downloader. That downloader is the GNUWin32
  1132. package management tool developed by the Open SSL project.
  1133. The following steps probably should be performed from inside a DOS shell.
  1134. 6. Change to the directory created by GetGNUWin32-x.x.x.exe
  1135. cd GetGNUWin32
  1136. 7. Execute the download.bat script. The download.bat script will download
  1137. about 446 packages! Enough to have a very complete Linux-like environment
  1138. under the DOS shell. This will take awhile. This step only downloads
  1139. the packages and the next step will install the packages.
  1140. download
  1141. 8. This step will install the downloaded packages. The argument of the
  1142. install.bat script is the installation location. C:\gnuwin32 is the
  1143. standard install location:
  1144. install C:\gnuwin32
  1145. NOTE: This installation step will install *all* GNUWin32 packages... far
  1146. more than you will ever need. If disc space is a problem for you, you might
  1147. need to perform a manual installation of the individual ZIP files that you
  1148. will find in the <this directory>/GetGNUWin32/packages directory.
  1149. CYGWIN BUILD PROBLEMS
  1150. ^^^^^^^^^^^^^^^^^^^^^
  1151. Performance
  1152. -----------
  1153. Build performance under Cygwin is really not so bad, certainly not as good
  1154. as a Linux build. However, often you will find that the performance is
  1155. not just bad but terrible. If you are seeing awful performance.. like two
  1156. or three compilations per second.. the culprit is usually your Windows
  1157. Anti-Virus protection interfering with the build tool program execution.
  1158. I use Cygwin quite often and I use Windows Defender. In order to get good
  1159. build performance, I routinely keep the Windows Defender "Virus & Threat
  1160. Protections Settings" screen up: I disable "Real-Time Protection" just
  1161. before entering 'make' then turn "Real-Time Protection" back on when the
  1162. build completes. With this additional nuisance step, I find that build
  1163. performance under Cygwin is completely acceptable.
  1164. Strange Path Problems
  1165. ---------------------
  1166. If you see strange behavior when building under Cygwin then you may have
  1167. a problem with your PATH variable. For example, if you see failures to
  1168. locate files that are clearly present, that may mean that you are using
  1169. the wrong version of a tool. For example, you may not be using Cygwin's
  1170. 'make' program at /usr/bin/make. Try:
  1171. which make
  1172. /usr/bin/make
  1173. When you install some toolchains (such as Yargarto or CodeSourcery tools),
  1174. they may modify your PATH variable to include a path to their binaries.
  1175. At that location, they may have GNUWin32 versions of the tools. So you
  1176. might actually be using a version of make that does not understand Cygwin
  1177. paths.
  1178. The solution is either:
  1179. 1. Edit your PATH to remove the path to the GNUWin32 tools, or
  1180. 2. Put /usr/local/bin, /usr/bin, and /bin at the front of your path:
  1181. export PATH=/usr/local/bin:/usr/bin:/bin:$PATH
  1182. Window Native Toolchain Issues
  1183. ------------------------------
  1184. There are many popular Windows native toolchains that may be used with NuttX.
  1185. Examples include CodeSourcery (for Windows), devkitARM, and several vendor-
  1186. provided toolchains. There are several limitations with using a and Windows
  1187. based toolchain in a Cygwin environment. The three biggest are:
  1188. 1. The Windows toolchain cannot follow Cygwin paths. Path conversions are
  1189. performed automatically in the Cygwin makefiles using the 'cygpath' utility
  1190. but you might easily find some new path problems. If so, check out 'cygpath -w'
  1191. 2. Windows toolchains cannot follow Cygwin symbolic links. Many symbolic links
  1192. are used in Nuttx (e.g., include/arch). The make system works around these
  1193. problems for the Windows tools by copying directories instead of linking them.
  1194. But this can also cause some confusion for you: For example, you may edit
  1195. a file in a "linked" directory and find that your changes had no effect.
  1196. That is because you are building the copy of the file in the "fake" symbolic
  1197. directory. If you use a Windows toolchain, you should get in the habit of
  1198. making like this:
  1199. make clean_context all
  1200. An alias in your .bashrc file might make that less painful. The rebuild
  1201. is not a long as you might think because there is no dependency checking
  1202. if you are using a native Windows toolchain. That bring us to #3:
  1203. General Pre-built Toolchain Issues
  1204. ----------------------------------
  1205. To continue with the list of "Window Native Toolchain Issues" we can add
  1206. the following. These, however, are really just issues that you will have
  1207. if you use any pre-built toolchain (vs. building the NuttX toolchain from
  1208. the NuttX buildroot package):
  1209. There may be incompatibilities with header files, libraries, and compiler
  1210. built-in functions detailed below. For the most part, these issues
  1211. are handled in the existing make logic. But if you are breaking new ground,
  1212. then you may encounter these:
  1213. 4. Header Files. Most pre-built toolchains will build with a foreign C
  1214. library (usually newlib, but maybe uClibc or glibc if you are using a
  1215. Linux toolchain). This means that the header files from the foreign
  1216. C library will be built into the toolchain. So if you "include <stdio.h>",
  1217. you will get the stdio.h from the incompatible, foreign C library and
  1218. not the nuttx stdio.h (at nuttx/include/stdio.h) that you wanted.
  1219. This can cause confusion in the builds and you must always be
  1220. sure the -nostdinc is included in the CFLAGS. That will assure that
  1221. you take the include files only from
  1222. 5. Libraries. What was said above header files applies to libraries.
  1223. You do not want to include code from the libraries of any foreign
  1224. C libraries built into your toolchain. If this happens you will get
  1225. perplexing errors about undefined symbols. To avoid these errors,
  1226. you will need to add -nostdlib to your CFLAGS flags to assure that
  1227. you only take code from the NuttX libraries.
  1228. This, however, may causes other issues for libraries in the toolchain
  1229. that you do want (like libgcc.a or libm.a). These are special-cased
  1230. in most Makefiles, but you could still run into issues of missing
  1231. libraries.
  1232. 6. Built-Ins. Some compilers target a particular operating system.
  1233. Many people would, for example, like to use the same toolchain to
  1234. develop Linux and NuttX software. Compilers built for other
  1235. operating systems may generate incompatible built-in logic and,
  1236. for this reason, -fno-builtin should also be included in your
  1237. C flags
  1238. And finally you may not be able to use NXFLAT.
  1239. 7. NXFLAT. If you use a pre-built toolchain, you will lose all support
  1240. for NXFLAT. NXFLAT is a binary format described in
  1241. Documentation/NuttXNxFlat.html. It may be possible to build
  1242. standalone versions of the NXFLAT tools; there are a few examples
  1243. of this in the buildroot repository at https://bitbucket.org/nuttx/buildroot
  1244. However, it is possible that there could be interoperability issues
  1245. with your toolchain since they will be using different versions of
  1246. binutils and possibly different ABIs.
  1247. Building Original Linux Boards in Cygwin
  1248. ----------------------------------------
  1249. Some default board configurations are set to build under Linux and others
  1250. to build under Windows with Cygwin. Various default toolchains may also
  1251. be used in each configuration. It is possible to change the default
  1252. setup. Here, for example, is what you must do in order to compile a
  1253. default Linux configuration in the Cygwin environment using the
  1254. CodeSourcery for Windows toolchain. After instantiating a "canned"
  1255. NuttX configuration, run the target 'menuconfig' and set the following
  1256. items:
  1257. Build Setup->Build Host Platform->Windows
  1258. Build Setup->Windows Build Environment->Cygwin
  1259. System Type->Toolchain Selection->CodeSourcery GNU Toolchain under Windows
  1260. In Windows 7 it may be required to open the Cygwin shell as Administrator
  1261. ("Run As" option, right button) you find errors like "Permission denied".
  1262. Recovering from Bad Configurations
  1263. ----------------------------------
  1264. Many people make the mistake of configuring NuttX with the "canned"
  1265. configuration and then just typing 'make' with disastrous consequences;
  1266. the build may fail with mysterious, uninterpretable, and irrecoverable
  1267. build errors. If, for example, you do this with an unmodified Linux
  1268. configuration in a Windows/Cgwin environment, you will corrupt the
  1269. build environment. The environment will be corrupted because of POSIX vs
  1270. Windows path issues and with issues related to symbolic links. If you
  1271. make the mistake of doing this, the easiest way to recover is to just
  1272. start over: Do 'make distclean' to remove every trace of the corrupted
  1273. configuration, reconfigure from scratch, and make certain that the set
  1274. the configuration correctly for your platform before attempting to make
  1275. again.
  1276. Just fixing the configuration file after you have instantiated the bad
  1277. configuration with 'make' is not enough.
  1278. DOCUMENTATION
  1279. ^^^^^^^^^^^^^
  1280. Additional information can be found in the Documentation/ directory and
  1281. also in README files that are scattered throughout the source tree. The
  1282. documentation is in HTML and can be access by loading the following file
  1283. into your Web browser:
  1284. Documentation/index.html
  1285. NuttX documentation is also available online at http://www.nuttx.org.
  1286. Below is a guide to the available README files in the NuttX source tree:
  1287. nuttx/
  1288. |
  1289. |- arch/
  1290. | |
  1291. | |- arm/
  1292. | | `- src
  1293. | | |- common
  1294. | | | `- README_lwl_console.txt
  1295. | | |- lpc214x
  1296. | | | `-README.txt
  1297. | | `- stm32l4
  1298. | | `- README.txt
  1299. | |- renesas/
  1300. | | |- include/
  1301. | | | `-README.txt
  1302. | | |- src/
  1303. | | | `-README.txt
  1304. | |- x86/
  1305. | | |- include/
  1306. | | | `-README.txt
  1307. | | `- src/
  1308. | | `-README.txt
  1309. | `- z80/
  1310. | | `- src/
  1311. | | |- z80/README.txt
  1312. | | `- z180/README.txt, z180_mmu.txt
  1313. | `- README.txt
  1314. |- audio/
  1315. | `-README.txt
  1316. |- boards/
  1317. | |- arm/
  1318. | | |- a1x/
  1319. | | | `- pcduino-a10/
  1320. | | | `- README.txt
  1321. | | |- am335x/
  1322. | | | `- beaglebone-black/
  1323. | | | `- README.txt
  1324. | | |- c5471/
  1325. | | | `- c5471evm/
  1326. | | | `- README.txt
  1327. | | |- cxd56xx/
  1328. | | | `- spresense/
  1329. | | | `- README.txt
  1330. | | |- dm320/
  1331. | | | `- ntosd-dm320/
  1332. | | | |- doc/README.txt
  1333. | | | `- README.txt
  1334. | | |- efm32/
  1335. | | | |- efm32-g8xx-stk/
  1336. | | | | `- README.txt
  1337. | | | |- efm32gg-stk3700/
  1338. | | | | `- README.txt
  1339. | | | `- olimex-efm32g880f128-stk/
  1340. | | | `- README.txt
  1341. | | |- imx6/
  1342. | | | `- sabre-6quad/
  1343. | | | `- README.txt
  1344. | | |- imxrt/
  1345. | | | |- imxrt1050-evk/
  1346. | | | | `- README.txt
  1347. | | | `- imxrt1060-evk/
  1348. | | | `- README.txt
  1349. | | |- kinetis/
  1350. | | | |- freedom-k28f/
  1351. | | | | `- README.txt
  1352. | | | |- freedom-k64f/
  1353. | | | | `- README.txt
  1354. | | | |- freedom-k66f/
  1355. | | | | `- README.txt
  1356. | | | |- kwikstik-k40/
  1357. | | | | `- README.txt
  1358. | | | |- teensy-3.x/
  1359. | | | | `- README.txt
  1360. | | | |- twr-k60n512/
  1361. | | | | `- README.txt
  1362. | | | `- twr-k64f120m/
  1363. | | | `- README.txt
  1364. | | |- kl/
  1365. | | | |- freedom-kl25z/
  1366. | | | | `- README.txt
  1367. | | | |- freedom-kl26z/
  1368. | | | | `- README.txt
  1369. | | | `- teensy-lc/
  1370. | | | `- README.txt
  1371. | | |- lc823450/
  1372. | | | `- lc823450-xgevk/
  1373. | | | `- README.txt
  1374. | | |- lpc17xx_40xx/
  1375. | | | |- lincoln60/
  1376. | | | | `- README.txt
  1377. | | | |- lpc4088-devkit/
  1378. | | | | `- README.txt
  1379. | | | |- lpc4088-quickstart/
  1380. | | | | `- README.txt
  1381. | | | |- lpcxpresso-lpc1768/
  1382. | | | | `- README.txt
  1383. | | | |- lx_cpu/
  1384. | | | | `- README.txt
  1385. | | | |- mbed/
  1386. | | | | `- README.txt
  1387. | | | |- mcb1700/
  1388. | | | | `- README.txt
  1389. | | | |- olimex-lpc1766stk/
  1390. | | | | `- README.txt
  1391. | | | |- open1788/
  1392. | | | | `- README.txt
  1393. | | | |- pnev5180b/
  1394. | | | | `- README.txt
  1395. | | | |- u-blox-c027/
  1396. | | | | `- README.txt
  1397. | | | `- zkit-arm-1769/
  1398. | | | `- README.txt
  1399. | | |- lpc214x/
  1400. | | | |- mcu123-lpc214x/
  1401. | | | | `- README.txt
  1402. | | | `- zp214xpa/
  1403. | | | `- README.txt
  1404. | | |- lpc2378/
  1405. | | | `- olimex-lpc2378/
  1406. | | | `- README.txt
  1407. | | |- lpc31xx/
  1408. | | | |- ea3131/
  1409. | | | | `- README.txt
  1410. | | | |- ea3152/
  1411. | | | | `- README.txt
  1412. | | | `- olimex-lpc-h3131/
  1413. | | | `- README.txt
  1414. | | |- lpc43xx/
  1415. | | | |- bambino-200e/
  1416. | | | | `- README.txt
  1417. | | | |- lpc4330-xplorer/
  1418. | | | | `- README.txt
  1419. | | | |- lpc4337-ws/
  1420. | | | | `- README.txt
  1421. | | | |- lpc4357-evb/
  1422. | | | | `- README.txt
  1423. | | | `- lpc4370-link2/
  1424. | | | `- README.txt
  1425. | | |- lpc54xx/
  1426. | | | `- lpcxpresso-lpc54628/
  1427. | | | `- README.txt
  1428. | | |- max326xx/
  1429. | | | `- max32660-evsys/
  1430. | | | `- README.txt
  1431. | | |- moxart/
  1432. | | | `- moxa/
  1433. | | |- nrf52/
  1434. | | | `- nrf52-generic/
  1435. | | | `- README.txt
  1436. | | |- nuc1xx/
  1437. | | | `- nutiny-nuc120/
  1438. | | | `- README.txt
  1439. | | |- s32k1xx/
  1440. | | | |- s32k118evb/
  1441. | | | | `- README.txt
  1442. | | | |- s32k146evb/
  1443. | | | | `- README.txt
  1444. | | | `- s32k148evb/
  1445. | | | `- README.txt
  1446. | | |- sam34/
  1447. | | | |- arduino-due/
  1448. | | | | `- README.txt
  1449. | | | |- flipnclick-sam3x/
  1450. | | | | `- README.txt
  1451. | | | |- sam3u-ek/
  1452. | | | | `- README.txt
  1453. | | | |- sam4cmp-db/
  1454. | | | | `- README.txt
  1455. | | | |- sam4e-ek/
  1456. | | | | `- README.txt
  1457. | | | |- sam4l-xplained/
  1458. | | | | `- README.txt
  1459. | | | |- sam4s-xplained/
  1460. | | | | `- README.txt
  1461. | | | `- sam4s-xplained-pro/
  1462. | | | `- README.txt
  1463. | | |- sama5/
  1464. | | | |- sama5d2-xult/
  1465. | | | | `- README.txt
  1466. | | | |- sama5d3x-ek/
  1467. | | | | `- README.txt
  1468. | | | |- sama5d3-xplained/
  1469. | | | | `- README.txt
  1470. | | | `- sama5d4-ek/
  1471. | | | `- README.txt
  1472. | | |- samd2l2/
  1473. | | | |- arduino-m0/
  1474. | | | | `- README.txt
  1475. | | | |- samd20-xplained/
  1476. | | | | `- README.txt
  1477. | | | |- samd21-xplained/
  1478. | | | | `- README.txt
  1479. | | | `- saml21-xplained/
  1480. | | | `- README.txt
  1481. | | |- samd5e5/
  1482. | | | `- metro-m4/
  1483. | | | `- README.txt
  1484. | | |- samv7/
  1485. | | | |- same70-xplained/
  1486. | | | | `- README.txt
  1487. | | | `- samv71-xult/
  1488. | | | `- README.txt
  1489. | | |- stm32/
  1490. | | | |- axoloti/
  1491. | | | | `- README.txt
  1492. | | | |- clicker2-stm32/
  1493. | | | | `- README.txt
  1494. | | | |- cloudctrl/
  1495. | | | | `- README.txt
  1496. | | | |- fire-stm32v2/
  1497. | | | | `- README.txt
  1498. | | | |- hymini-stm32v/
  1499. | | | | `- README.txt
  1500. | | | |- maple/
  1501. | | | | `- README.txt
  1502. | | | |- mikroe-stm32f4/
  1503. | | | | `- README.txt
  1504. | | | |- nucleo-f103rb/
  1505. | | | | `- README.txt
  1506. | | | |- nucleo-f207zg/
  1507. | | | | `- README.txt
  1508. | | | |- nucleo-f302r8/
  1509. | | | | `- README.txt
  1510. | | | |- nucleo-f303re/
  1511. | | | | `- README.txt
  1512. | | | |- nucleo-f303ze/
  1513. | | | | `- README.txt
  1514. | | | |- nucleo-f334r8/
  1515. | | | | `- README.txt
  1516. | | | |- nucleo-f410rb/
  1517. | | | | `- README.txt
  1518. | | | |- nucleo-f446re/
  1519. | | | | `- README.txt
  1520. | | | |- nucleo-f4x1re/
  1521. | | | | `- README.txt
  1522. | | | |- nucleo-l152re/
  1523. | | | | `- README.txt
  1524. | | | |- olimexino-stm32/
  1525. | | | |- olimex-stm32-e407/
  1526. | | | | `- README.txt
  1527. | | | |- olimex-stm32-h405/
  1528. | | | | `- README.txt
  1529. | | | |- olimex-stm32-h407/
  1530. | | | | `- README.txt
  1531. | | | |- olimex-stm32-p107/
  1532. | | | |- olimex-stm32-p207/
  1533. | | | | `- README.txt
  1534. | | | |- olimex-stm32-p407/
  1535. | | | | `- README.txt
  1536. | | | |- omnibusf4/
  1537. | | | | `- README.txt
  1538. | | | |- photon/
  1539. | | | | `- README.txt
  1540. | | | |- shenzhou/
  1541. | | | | `- README.txt
  1542. | | | |- stm32_tiny/
  1543. | | | | `- README.txt
  1544. | | | |- stm3210e-eval/
  1545. | | | | `- README.txt
  1546. | | | |- stm3220g-eval/
  1547. | | | | `- README.txt
  1548. | | | |- stm3240g-eval/
  1549. | | | | `- README.txt
  1550. | | | |- stm32butterfly2/
  1551. | | | |- stm32f103-minimum/
  1552. | | | | `- README.txt
  1553. | | | |- stm32f334-disco/
  1554. | | | | `- README.txt
  1555. | | | |- stm32f3discovery/
  1556. | | | | `- README.txt
  1557. | | | |- stm32f411e-disco/
  1558. | | | | `- README.txt
  1559. | | | |- stm32f429i-disco/
  1560. | | | | `- README.txt
  1561. | | | |- stm32f4discovery/
  1562. | | | | `- README.txt
  1563. | | | |- stm32ldiscovery/
  1564. | | | | `- README.txt
  1565. | | | |- stm32vldiscovery/
  1566. | | | | `- README.txt
  1567. | | | `- viewtool-stm32f107/
  1568. | | | `- README.txt
  1569. | | |- stm32f0l0g0/
  1570. | | | |- b-l072z-lrwan1/
  1571. | | | | `- README.txt
  1572. | | | |- nucleo-f072rb/
  1573. | | | | `- README.txt
  1574. | | | |- nucleo-f091rc/
  1575. | | | | `- README.txt
  1576. | | | |- nucleo-g070rb/
  1577. | | | | `- README.txt
  1578. | | | |- nucleo-g071rb/
  1579. | | | | `- README.txt
  1580. | | | |- nucleo-l073rz/
  1581. | | | | `- README.txt
  1582. | | | |- stm32f051-discovery/
  1583. | | | | `- README.txt
  1584. | | | `- stm32f072-discovery/
  1585. | | | `- README.txt
  1586. | | |- stm32f7/
  1587. | | | |- nucleo-144/
  1588. | | | | `- README.txt
  1589. | | | |- stm32f746g-disco/
  1590. | | | | |- configs/fb/README.txt
  1591. | | | | |- configs/nxdemo/README.txt
  1592. | | | | |- configs/nxterm/README.txt
  1593. | | | | `- README.txt
  1594. | | | |- stm32f746-ws/
  1595. | | | `- stm32f769i-disco/
  1596. | | | `- README.txt
  1597. | | |- stm32h7/
  1598. | | | `- nucleo-h743zi/
  1599. | | | `- README.txt
  1600. | | |- stm32l4/
  1601. | | | |- b-l475e-iot01a/
  1602. | | | | `- README.txt
  1603. | | | |- nucleo-l432kc/
  1604. | | | | `- README.txt
  1605. | | | |- nucleo-l452re/
  1606. | | | | `- README.txt
  1607. | | | |- nucleo-l476rg/
  1608. | | | | `- README.txt
  1609. | | | |- nucleo-l496zg/
  1610. | | | | `- README.txt
  1611. | | | |- stm32l476-mdk/
  1612. | | | | `- README.txt
  1613. | | | |- stm32l476vg-disco/
  1614. | | | | `- README.txt
  1615. | | | `- stm32l4r9ai-disco/
  1616. | | | `- README.txt
  1617. | | |- str71x/
  1618. | | | `- olimex-strp711/
  1619. | | | `- README.txt
  1620. | | |- tiva/
  1621. | | | |- dk-tm4c129x/
  1622. | | | | `- README.txt
  1623. | | | |- eagle100/
  1624. | | | | `- README.txt
  1625. | | | |- ekk-lm3s9b96/
  1626. | | | | `- README.txt
  1627. | | | |- launchxl-cc1310/
  1628. | | | | `- README.txt
  1629. | | | |- launchxl-cc1312r1/
  1630. | | | | `- README.txt
  1631. | | | |- lm3s6432-s2e/
  1632. | | | | `- README.txt
  1633. | | | |- lm3s6965-ek/
  1634. | | | | `- README.txt
  1635. | | | |- lm3s8962-ek/
  1636. | | | | `- README.txt
  1637. | | | |- lm4f120-launchpad/
  1638. | | | | `- README.txt
  1639. | | | |- tm4c123g-launchpad/
  1640. | | | | `- README.txt
  1641. | | | `- tm4c1294-launchpad/
  1642. | | | `- README.txt
  1643. | | |- tms570/
  1644. | | | |- launchxl-tms57004/
  1645. | | | | `- README.txt
  1646. | | | `- tms570ls31x-usb-kit/
  1647. | | | `- README.txt
  1648. | | `- xmc4/
  1649. | | `- xmc4500-relax/
  1650. | | `- README.txt
  1651. | |- avr/
  1652. | | |- at32uc3/
  1653. | | | `- avr32dev1/
  1654. | | | `- README.txt
  1655. | | |- at90usb/
  1656. | | | |- micropendous3/
  1657. | | | | `- README.txt
  1658. | | | `- teensy-2.0/
  1659. | | | `- README.txt
  1660. | | `- atmega/
  1661. | | |- amber/
  1662. | | | `- README.txt
  1663. | | |- arduino-mega2560/
  1664. | | | `- README.txt
  1665. | | `- moteino-mega/
  1666. | | `- README.txt
  1667. | |- hc/
  1668. | | `- mcs92s12ne64/
  1669. | | |- demo9s12ne64/
  1670. | | | `- README.txt
  1671. | | `- ne64badge/
  1672. | | `- README.txt
  1673. | |- mips/
  1674. | | |- pic32mx/
  1675. | | | |- mirtoo/
  1676. | | | | `- README.txt
  1677. | | | |- pic32mx7mmb/
  1678. | | | | `- README.txt
  1679. | | | |- pic32mx-starterkit/
  1680. | | | | `- README.txt
  1681. | | | |- sure-pic32mx/
  1682. | | | | `- README.txt
  1683. | | | `- ubw32/
  1684. | | | `- README.txt
  1685. | | `-pic32mz/
  1686. | | |- flipnclick-pic32mz/
  1687. | | | `- README.txt
  1688. | | `- pic32mz-starterkit/
  1689. | | `- README.txt
  1690. | |- misoc/
  1691. | | `- lm32/
  1692. | | `- misoc/
  1693. | | `- README.txt
  1694. | |- or1k/
  1695. | | `- mor1kx/
  1696. | | `- or1k/
  1697. | | `- README.txt
  1698. | |- renesas/
  1699. | | |- m32262f8/
  1700. | | | `- skp16c26/
  1701. | | | `- README.txt
  1702. | | `-sh7032/
  1703. | | `- us7032evb1/
  1704. | | `- README.txt
  1705. | |- risc-v/
  1706. | | |- gap8/
  1707. | | | `- gapuino/
  1708. | | | `- README.txt
  1709. | | `-nr5m100/
  1710. | | `- nr5m100-nexys4/
  1711. | | `- README.txt
  1712. | |- sim/
  1713. | | `- sim/
  1714. | | `- sim/
  1715. | | |- include/README.txt
  1716. | | `- README.txt
  1717. | |- x86/
  1718. | | `- qemu/
  1719. | | `- qemu-i486/
  1720. | | `- README.txt
  1721. | |- xtensa/
  1722. | | `- esp32/
  1723. | | `- esp32-core/
  1724. | | `- README.txt
  1725. | |- z16/
  1726. | | `- z16f2811/
  1727. | | `- z16f2800100zcog/
  1728. | | |- configs/nsh/README.txt
  1729. | | |- configs/ostest/README.txt
  1730. | | |- configs/pashello/README.txt
  1731. | | `- README.txt
  1732. | |- z80/
  1733. | | |- ez80/
  1734. | | | |- ez80f910200kitg/
  1735. | | | | |- configs/ostest/README.txt
  1736. | | | | `- README.txt
  1737. | | | |- ez80f910200zco/
  1738. | | | | |- configs/dhcpd/README.txt
  1739. | | | | |- configs/httpd/README.txt
  1740. | | | | |- configs/nettest/README.txt
  1741. | | | | |- configs/nsh/README.txt
  1742. | | | | |- configs/poll/README.txt
  1743. | | | | `- README.txt
  1744. | | | `- makerlisp/
  1745. | | | |- configs/nsh_flash/README.txt
  1746. | | | |- configs/nsh_ram/README.txt
  1747. | | | |- configs/sdboot/README.txt
  1748. | | | `- README.txt
  1749. | | |- z180/
  1750. | | | `- p112/
  1751. | | | `- README.txt
  1752. | | |- z8/
  1753. | | | |- z8encore000zco/
  1754. | | | | |- configs/ostest/README.txt
  1755. | | | | `- README.txt
  1756. | | | `- z8f64200100kit/
  1757. | | | |- configs/ostest/README.txt
  1758. | | | `- README.txt
  1759. | | `- z80/
  1760. | | `- z80sim/
  1761. | | `- README.txt
  1762. | `-README.txt
  1763. |- drivers/
  1764. | |- eeprom/
  1765. | | `- README.txt
  1766. | |- lcd/
  1767. | | | README.txt
  1768. | | `- pcf8574_lcd_backpack_readme.txt
  1769. | |- mtd/
  1770. | | `- README.txt
  1771. | |- sensors/
  1772. | | `- README.txt
  1773. | |- syslog/
  1774. | | `- README.txt
  1775. | `- README.txt
  1776. |- fs/
  1777. | |- binfs/
  1778. | | `- README.txt
  1779. | |- cromfs/
  1780. | | `- README.txt
  1781. | |- mmap/
  1782. | | `- README.txt
  1783. | |- nxffs/
  1784. | | `- README.txt
  1785. | |- smartfs/
  1786. | | `- README.txt
  1787. | |- procfs/
  1788. | | `- README.txt
  1789. | |- spiffs/
  1790. | | `- README.md
  1791. | `- unionfs/
  1792. | `- README.txt
  1793. |- graphics/
  1794. | `- README.txt
  1795. |- libs/
  1796. | |- README.txt
  1797. | |- libc/
  1798. | | |- zoneinfo
  1799. | | | `- README.txt
  1800. | | `- README.txt
  1801. | |- libdsp/
  1802. | | `- README.txt
  1803. | |- libnx/
  1804. | | |- nxfongs
  1805. | | | `- README.txt
  1806. | | `- README.txt
  1807. | |- libxx/
  1808. | `- README.txt
  1809. |- mm/
  1810. | |- shm/
  1811. | | `- README.txt
  1812. | `- README.txt
  1813. |- net/
  1814. | |- sixlowpan
  1815. | | `- README.txt
  1816. | `- README.txt
  1817. |- pass1/
  1818. | `- README.txt
  1819. |- syscall/
  1820. | `- README.txt
  1821. `- tools/
  1822. `- README.txt
  1823. Below is a guide to the available README files in the semi-optional apps/
  1824. source tree:
  1825. apps/
  1826. |- examples/
  1827. | |- bastest/README.txt
  1828. | |- json/README.txt
  1829. | |- pashello/README.txt
  1830. | `- README.txt
  1831. |- gpsutils/
  1832. | `- minmea/README.txt
  1833. |- graphics/
  1834. | |- tiff/README.txt
  1835. | `- traveler/tools/tcledit/README.txt
  1836. |- interpreters/
  1837. | |- bas/
  1838. | | `- README.txt
  1839. | |- ficl/
  1840. | | `- README.txt
  1841. | `- README.txt
  1842. |- modbus/
  1843. | `- README.txt
  1844. |- netutils/
  1845. | |- discover/
  1846. | | `- README.txt
  1847. | |- ftpc/
  1848. | | `- README.txt
  1849. | |- json/
  1850. | | `- README.txt
  1851. | |- telnetd/
  1852. | | `- README.txt
  1853. | `- README.txt
  1854. |- nshlib/
  1855. | `- README.txt
  1856. |- NxWidgets/
  1857. | `- README.txt
  1858. |- system/
  1859. | |- cdcacm/
  1860. | | `- README.txt
  1861. | |- i2c/
  1862. | | `- README.txt
  1863. | |- inifile/
  1864. | | `- README.txt
  1865. | |- install/
  1866. | | `- README.txt
  1867. | |- nsh/
  1868. | | `- README.txt
  1869. | |- nxplayer/
  1870. | | `- README.txt
  1871. | |- psmq/
  1872. | | `- README.txt
  1873. | |- symtab/
  1874. | | `- README.txt
  1875. | |- termcurses/
  1876. | | `- README.txt
  1877. | |- usbmsc/
  1878. | | `- README.txt
  1879. | `- zmodem/
  1880. | `- README.txt
  1881. `- wireless
  1882. |- bluetooth/
  1883. | `- btsak/
  1884. | `- README.txt
  1885. `- ieee802154
  1886. `- i8sak/
  1887. `- README.txt
  1888. Additional README.txt files in the other, related repositories:
  1889. NxWidgets/
  1890. |- Doxygen
  1891. | `- README.txt
  1892. |- tools
  1893. | `- README.txt
  1894. |- UnitTests
  1895. | `- README.txt
  1896. `- README.txt
  1897. buildroot/
  1898. `- README.txt
  1899. tools/
  1900. `- README.txt
  1901. uClibc++/
  1902. `- README.txt