README.txt 88 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364
  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. * https://bitbucket.org/nuttx/pascal
  427. Yes, this really is a Pascal compiler. The Pascal p-code run-time and
  428. pcode debugger can be built as a part of NuttX.
  429. Notes about Header Files
  430. ------------------------
  431. Other C-Library Header Files.
  432. When a GCC toolchain is built, it must be built against a C library.
  433. The compiler together with the contents of the C library completes the
  434. C language definition and provides the complete C development
  435. environment. NuttX provides its own, built-in C library. So the
  436. complete, consistent C language definition for use with NuttX comes from
  437. the combination of the compiler and the header files provided by the
  438. NuttX C library.
  439. When a GCC toolchain is built, it incorporates the C library header
  440. files into the compiler internal directories and, in this way, the C
  441. library really becomes a part of the toolchain. If you use the NuttX
  442. buildroot toolchain as described below under "NuttX Buildroot
  443. Toolchain", your GCC toolchain will build against the NuttX C library
  444. and will incorporate the NuttX C library header files as part of the
  445. toolchain.
  446. If you use some other, third-party tool chain, this will not be the
  447. case, however. Those toolchains were probably built against some
  448. other, incompatible C library distribution (such as newlib). Those
  449. tools will have incorporated the incompatible C library header files
  450. as part of the toolchain. These incompatible header files must *not*
  451. be used with NuttX because they will conflict with definitions in the
  452. NuttX built-in C-Library. For such toolchains that include header
  453. files from a foreign C-Library, NuttX must be compiled without using
  454. the standard header files that are distributed with your toolchain.
  455. This prevents including conflicting, incompatible header files such
  456. as stdio.h.
  457. The math.h and stdarg.h are probably the two most trouble some header
  458. files to deal with. These troublesome header files are discussed in
  459. more detail below.
  460. Header Files Provided by Your Toolchain.
  461. Certain header files, such as setjmp.h, stdarg.h, and math.h, may still
  462. be needed from your toolchain and your compiler may not, however, be able
  463. to find these if you compile NuttX without using standard header files
  464. (i.e., with -nostdinc). If that is the case, one solution is to copy
  465. those header file from your toolchain into the NuttX include directory.
  466. Duplicated Header Files.
  467. There are also a few header files that can be found in the nuttx/include
  468. directory which are duplicated by the header files from your toolchain.
  469. stdint.h and stdbool.h are examples. If you prefer to use the stdint.h
  470. and stdbool.h header files from your toolchain, those could be copied
  471. into the nuttx/include/ directory. Using most other header files from
  472. your toolchain would probably cause errors.
  473. math.h
  474. Even though you should not use a foreign C-Library, you may still need
  475. to use other, external libraries with NuttX. In particular, you may
  476. need to use the math library, libm.a. NuttX supports a generic, built-in
  477. math library that can be enabled using CONFIG_LIBM=y. However, you may
  478. still want to use a higher performance external math library that has
  479. been tuned for your CPU. Sometimes such tuned math libraries are
  480. bundled with your toolchain.
  481. The math library header file, math.h, is a then special case. If you do
  482. nothing, the standard math.h header file that is provided with your
  483. toolchain will be used.
  484. If you have a custom, architecture specific math.h header file, then
  485. that header file should be placed at arch/<cpu>/include/math.h. There
  486. is a stub math.h header file located at include/nuttx/lib/math.h. This stub
  487. header file can be used to "redirect" the inclusion to an architecture-
  488. specific math.h header file. If you add an architecture specific math.h
  489. header file then you should also define CONFIG_ARCH_MATH_H=y in your
  490. NuttX Configuration file. If CONFIG_ARCH_MATH_H is selected, then the
  491. top-level Makefile will copy the stub math.h header file from
  492. include/nuttx/lib/math.h to include/math.h where it will become the system
  493. math.h header file. The stub math.h header file does nothing other
  494. than to include that architecture-specific math.h header file as the
  495. system math.h header file.
  496. float.h
  497. If you enable the generic, built-in math library, then that math library
  498. will expect your toolchain to provide the standard float.h header file.
  499. The float.h header file defines the properties of your floating point
  500. implementation. It would always be best to use your toolchain's float.h
  501. header file but if none is available, a default float.h header file will
  502. be provided if this option is selected. However, there is no assurance
  503. that the settings in this float.h are actually correct for your platform!
  504. stdarg.h
  505. In most cases, the correct version of stdarg.h is the version provided
  506. with your toolchain. However, sometimes there are issues with
  507. using your toolchains stdarg.h. For example, it may attempt to draw in
  508. header files that do not exist in NuttX or perhaps the header files that
  509. it uses are not compatible with the NuttX header files. In those cases,
  510. you can use an architecture-specific stdarg.h header file by defining
  511. CONFIG_ARCH_STDARG_H=y.
  512. See the discussion above for the math.h header. This setting works
  513. exactly the same for the stdarg.h header file.
  514. CONFIGURING NUTTX
  515. ^^^^^^^^^^^^^^^^^
  516. Instantiating "Canned" Configurations
  517. -------------------------------------
  518. configure.sh and configure.bat:
  519. "Canned" NuttX configuration files are retained in:
  520. boards/<arch-name>/<chip-name>/<board-name>/configs/<config-dir>
  521. Where <board-name> is the name of your development board and <config-dir>
  522. is the name of the sub-directory containing a specific configuration for
  523. that board. <arch-name> and <chip-name> refer to characteristics of the
  524. MCU used on the board: <arch-name> is the CPU architecture implemented
  525. by the MCU; <chip-name> identifies the MCU chip family. Only a few
  526. steps are required to instantiate a NuttX configuration, but to make the
  527. configuration even easier there are scripts available in the tools/
  528. sub-directory combines those simple steps into one command.
  529. There is one tool for use with any Bash-like shell that does configuration
  530. steps. It is used as follows:
  531. tools/configure.sh <board-name>:<config-dir>
  532. There is an alternative Windows batch file that can be used in the windows
  533. native environment like:
  534. tools\configure.bat <board-name>:<config-dir>
  535. And, to make sure that other platforms are supported, there is also a
  536. C program at tools/configure.c that can be compiled to establish the
  537. board configuration.
  538. See tools/README.txt for more information about these scripts.
  539. General information about configuring NuttX can be found in:
  540. {TOPDIR}/boards/README.txt
  541. {TOPDIR}/boards/<arch-name>/<chip-name>/<board-name>/README.txt
  542. The Hidden Configuration Scripts:
  543. As mentioned above, there are only a few simple steps to instantiating a
  544. NuttX configuration. Those steps are hidden by the configuration scripts
  545. but are summarized below:
  546. 1. Copy Files
  547. Configuring NuttX requires only copying two files from the
  548. <config-dir> to the directory where you installed NuttX (TOPDIR):
  549. Copy boards/<arch-name>/<chip-name>/<board-name>/configs/<config-dir>/Make.def
  550. to {TOPDIR}/Make.defs
  551. OR
  552. Copy boards/<arch-name>/<chip-name>/<board-name>/scripts/Make.def
  553. to {TOPDIR}/Make.defs
  554. Make.defs describes the rules needed by your tool chain to compile
  555. and link code. You may need to modify this file to match the
  556. specific needs of your toolchain. NOTE that a configuration may
  557. have its own unique Make.defs file in its configuration directory or
  558. it may use a common Make.defs file for the board in the scripts/
  559. directory. The first takes precedence.
  560. Copy boards/<arch-name>/<chip-name>/<board-name>/configs/<config-dir>/defconfig
  561. to{TOPDIR}/.config
  562. The defconfig file holds the actual build configuration. This
  563. file is included by all other make files to determine what is
  564. included in the build and what is not. This file is also used
  565. to generate a C configuration header at include/nuttx/config.h.
  566. Copy other, environment-specific files to{TOPDIR}
  567. This might include files like .gdbinit or IDE configuration files
  568. like .project or .cproject.
  569. 2. Refresh the Configuration
  570. New configuration setting may be added or removed. Existing settings
  571. may also change there values or options. This must be handled by
  572. refreshing the configuration as described below.
  573. NOTE: NuttX uses only compressed defconfig files. For the NuttX
  574. defconfig files, this refreshing step is *NOT* optional; it is also
  575. necessary to uncompress and regenerate the full making file. This is
  576. discussed further below.
  577. Refreshing Configurations
  578. -------------------------
  579. Configurations can get out of date. As new configuration settings are
  580. added or removed or as dependencies between configuration settings
  581. change, the contents of a default configuration can become out of synch
  582. with the build systems. Hence, it is a good practice to "refresh" each
  583. configuration after configuring and before making. To refresh the
  584. configuration, use the NuttX Configuration Tool like this:
  585. make oldconfig
  586. AFTER you have instantiated the NuttX configuration as described above.
  587. The configuration step copied the .config file into place in the top-level
  588. NuttX directory; 'make oldconfig' step will then operate on that .config
  589. file to bring it up-to-date.
  590. If your configuration is out of date, you will be prompted by 'make oldconfig'
  591. to resolve the issues detected by the configuration tool, that is, to
  592. provide values for the new configuration options in the build system. Doing
  593. this can save you a lot of problems down the road due to obsolete settings in
  594. the default board configuration file. The NuttX configuration tool is
  595. discussed in more detail in the following paragraph.
  596. Confused about what the correct value for a new configuration item should
  597. be? Enter ? in response to the 'make oldconfig' prompt and it will show
  598. you the help text that goes with the option.
  599. If you don't want to make any decisions are willing to just accept the
  600. recommended default value for each new configuration item, an even easier
  601. way is:
  602. make olddefconfig
  603. The olddefconfig target will simply bring your configuration up to date with
  604. the current Kconfig files, setting any new options to the default value.
  605. No questions asked.
  606. NuttX Configuration Tool
  607. ------------------------
  608. An automated tool has been incorporated to support re-configuration
  609. of NuttX. This tool is based on the kconfig-frontends application available
  610. at https://bitbucket.org/nuttx/tools/src/master/kconfig-frontends/. (This
  611. is a snapshot of http://ymorin.is-a-geek.org/projects/kconfig-frontends.)
  612. This application provides a tool called 'kconfig-mconf' that is used by the
  613. NuttX top-level Makefile. The following make target is provided:
  614. make menuconfig
  615. This make target will bring up NuttX configuration menus.
  616. WARNING: Never do 'make menuconfig' on a configuration that has
  617. not been converted to use the kconfig-frontends tools! This will
  618. damage your configuration (see
  619. http://www.nuttx.org/doku.php?id=wiki:howtos:convertconfig).
  620. How do we tell a new configuration from an old one? See "Incompatibilities
  621. with Older Configurations" below.
  622. The 'menuconfig' make target depends on two things:
  623. 1. The Kconfig configuration data files that appear in almost all
  624. NuttX directories. These data files are the part that is still
  625. under development (patches are welcome!). The Kconfig files
  626. contain configuration information for the configuration settings
  627. relevant to the directory in which the Kconfig file resides.
  628. NOTE: For a description of the syntax of this configuration file,
  629. see kconfig-language.txt in the tools repository at
  630. https://bitbucket.org/nuttx/tools
  631. 2. The 'kconfig-mconf' tool. 'kconfig-mconf' is part of the
  632. kconfig-frontends package. You can download that package from the
  633. snapshot in the tools repository at https://bitbucket.org/nuttx/tools.
  634. Building kconfig-frontends under Linux may be as simple as
  635. 'configure; make; make install' but there may be some build
  636. complexities, especially if you are building under Cygwin. See
  637. the more detailed build instructions in the top-level README.txt
  638. file of the tools repository at https://bitbucket.org/nuttx/tools.
  639. The 'make install' step will, by default, install the 'kconfig-mconf'
  640. tool at /usr/local/bin/mconf. Where ever you choose to
  641. install 'kconfig-mconf', make certain that your PATH variable includes
  642. a path to that installation directory.
  643. The kconfig-frontends tools will not build in a native Windows
  644. environment directly "out-of-the-box". For the Windows native
  645. case, you should use the modified version of kconfig-frontends
  646. that can be found at
  647. http://uvc.de/posts/linux-kernel-configuration-tool-mconf-under-windows.html
  648. The basic configuration order is "bottom-up":
  649. - Select the build environment,
  650. - Select the processor,
  651. - Select the board,
  652. - Select the supported peripherals
  653. - Configure the device drivers,
  654. - Configure the application options on top of this.
  655. This is pretty straight forward for creating new configurations
  656. but may be less intuitive for modifying existing configurations.
  657. Another ncurses-based tool that is an option to kconfig-mconf is
  658. kconfig-nconf. The differences are primary in in the aesthetics of the
  659. UI. If you have kconfig-nconf built, then you can invoke that front end
  660. with:
  661. make nconfig
  662. If you have an environment that supports the Qt or GTK graphical systems
  663. (probably KDE or gnome, respectively, or Cygwin under Windows with Qt or
  664. GTK installed), then you can also build the graphical kconfig-frontends,
  665. kconfig-qconf and kconfig-gconf. In these case, you can start the
  666. graphical configurator with either:
  667. make qconfig
  668. or
  669. make gconfig
  670. Some keyboard shortcuts supported by kconfig-mconf, the tool that runs
  671. when you do 'make menuconfig':
  672. - '?' will bring up the mconfig help display.
  673. - '/' can be used find configuration selections.
  674. - 'Z' can be used to reveal hidden configuration options
  675. These last two shortcuts are described further in the following
  676. paragraphs.
  677. Finding Selections in the Configuration Menus
  678. ---------------------------------------------
  679. The NuttX configuration options have gotten complex and it can be very
  680. difficult to find options in the menu trees if you are not sure where
  681. to look. The "basic configuration order" describe above can help to
  682. narrow things down.
  683. But if you know exactly what configuration setting you want to select,
  684. say CONFIG_XYZ, but not where to find it, then the 'make menuconfig'
  685. version of the tool offers some help: By pressing the '/' key, the
  686. tool will bring up a menu that will allow you to search for a
  687. configuration item. Just enter the string CONFIG_XYZ and press 'ENTER'.
  688. It will show you not only where to find the configuration item, but
  689. also all of the dependencies related to the configuration item.
  690. Reveal Hidden Configuration Options
  691. -----------------------------------
  692. If you type 'Z', then kconfig-mconf will change what is displayed.
  693. Normally, only enabled features that have all of their dependencies met
  694. are displayed. That is, of course, not very useful if you would like to
  695. discover new options or if you are looking for an option and do not
  696. realize that the dependencies have not yet been selected and, hence, it
  697. is not displayed.
  698. But if you enter 'Z', then every option will be shown, whether or not its
  699. dependencies have been met. You can then see everything that could be
  700. selected with the right dependency selections. These additional options
  701. will be shown the '-' for the selection and for the value (since it
  702. cannot be selected and has no value). About all you do is to select
  703. the <Help> option to see what the dependencies are.
  704. Make Sure that You are on the Right Platform
  705. --------------------------------------------
  706. Saved configurations may run on Linux, Cygwin (32- or 64-bit), or other
  707. platforms. The platform characteristics can be changed use 'make
  708. menuconfig'. Sometimes this can be confusing due to the differences
  709. between the platforms. Enter sethost.sh
  710. sethost.sh is a simple script that changes a configuration to your
  711. host platform. This can greatly simplify life if you use many different
  712. configurations. For example, if you are running on Linux and you
  713. configure like this:
  714. tools/configure.sh board:configuration
  715. The you can use the following command to both (1) make sure that the
  716. configuration is up to date, AND (2) the configuration is set up
  717. correctly for Linux:
  718. tools/sethost.sh -l
  719. Or, if you are on a Windows/Cygwin 64-bit platform:
  720. tools/sethost.sh -c
  721. Or, for MSYS/MSYS2:
  722. tools/sethost.sh -g
  723. Other options are available from the help option built into the
  724. script. You can see all options with:
  725. tools/sethost.sh -h
  726. Recently, the options to the configure.sh (and configure.bat) scripts have
  727. been extended so that you both setup the configuration, select for the host
  728. platform that you use, and uncompress and refresh the defconfig file all in
  729. one command like:
  730. tools/configure.sh -l board:configuration
  731. For a Linux host or for a Windows/Cygwin host:
  732. tools/configure.sh -h board:configuration
  733. Other options are available from the help option built into the
  734. script. You can see all options with:
  735. tools/configure.sh -h
  736. Comparing Two Configurations
  737. ----------------------------
  738. If you try to compare two configurations using 'diff', you will probably
  739. not be happy with the result. There are superfluous things added to
  740. the configuration files that make comparisons with the human eye
  741. difficult.
  742. There is a tool at nuttx/tools/cmpconfig.c that can be built to simplify
  743. these comparisons. The output from this difference tool will show only
  744. the meaningful differences between two configuration files. This tool is
  745. built as follows:
  746. cd nuttx/tools
  747. make -f Makefile.host
  748. This will create a program called 'cmpconfig' or 'comconfig.exe' on Windows.
  749. Why would you want to compare two configuration files? Here are a few
  750. of the reasons why I do this
  751. 1. When I create a new configuration I usually base it on an older
  752. configuration and I want to know, "What are the options that I need to
  753. change to add the new feature to the older configurations?" For example,
  754. suppose that I have a boardA/nsh configuration and I want to create a
  755. boardA/nxwm configuration. Suppose I already have boardB/nsh and
  756. boardB/nxwm configurations. Then by comparing the boardB/nsh with the
  757. boardB/nxwm I can see the modifications that I would need to make to my
  758. boardA/nsh to create a new boardA/nxwm.
  759. 2. But the most common reason that I use the 'cmpconfig' program is to
  760. check the results of "refreshing" a configuration with 'make oldconfig'
  761. (see the paragraph "Refreshing Configurations" above). The 'make
  762. oldconfig' command will make changes to my configuration and using
  763. 'cmpconfig', I can see precisely what those changes were and if any
  764. should be of concern to me.
  765. 3. The 'cmpconfig' tool can also be useful when converting older, legacy
  766. manual configurations to the current configurations based on the
  767. kconfig-frontends tools. See the following paragraph.
  768. Making defconfig Files
  769. ----------------------
  770. .config Files as defconfig Files:
  771. The minimum defconfig file is simply the generated .config file with
  772. CONFIG_APPS_DIR setting removed or commented out. That setting provides
  773. the name and location of the apps/ directory relative to the nuttx build
  774. directory. The default is ../apps/, however, the apps directory may be
  775. any other location and may have a different name. For example, the name
  776. of versioned NuttX releases are always in the form apps-xx.yy where xx.yy
  777. is the version number.
  778. Finding the apps/ Directory Path:
  779. When the default configuration is installed using one of the scripts or
  780. programs in the NuttX tools directory, there will be an option to provide
  781. the path to the apps/ directory. If not provided, then the configure tool
  782. will look around and try to make a reasonable decision about where the
  783. apps/ directory is located.
  784. Compressed defconfig Files:
  785. The Makefile also supports an option to generate very small defconfig
  786. files. The .config files are quite large and complex. But most of the
  787. settings in the .config file simply have the default settings from the
  788. Kconfig files. These .config files can be converted into small defconfig
  789. file:
  790. make savedefconfig
  791. That make target will generate a defconfig file in the top-level
  792. directory. The size reduction is really quite remarkable:
  793. wc -l .config defconfig
  794. 1085 .config
  795. 82 defconfig
  796. 1167 total
  797. In order to be usable, the .config file installed from the compressed
  798. defconfig file must be reconstituted using:
  799. make olddefconfig
  800. NOTE 1: Only compressed defconfig files are retained in the NuttX repository.
  801. All patches and PRs that attempt to add or modify a defconfig file MUST
  802. use the compressed defconfig format as created by 'make savdefconfig.'
  803. NOTE 2: When 'make savedefconfig' runs it will try several things some of
  804. which are expected to fail. In these cases you will see an error message
  805. from make followed by "(ignored)." You should also ignore these messages
  806. CAUTION: This size reduction was accomplished by removing all setting
  807. from the .config file that were at the default value. 'make olddefconfig'
  808. can regenerate the original .config file by simply restoring those default
  809. settings. The underlying assumption here is, of course, that the default
  810. settings do not change. If the default settings change, and they often
  811. do, then the original .config may not be reproducible.
  812. So if your project requires 100% reproducibility over a long period of
  813. time, you make want to save the complete .config files vs. the standard,
  814. compressed defconfig file.
  815. Configuring with "Compressed" defconfig Files:
  816. As described above defconfig, all NuttX defconfig files are compressed
  817. using 'make savedeconfig'. These compressed defconfig files are
  818. generally not fully usable as they are and may not build the target
  819. binaries that you want because the compression process removed all of
  820. the default settings from the defconfig file. To restore the default
  821. settings, you should run the following after configuring:
  822. make olddefconfig
  823. That will restore the the missing defaulted values.
  824. Using this command after configuring is generally a good practice anyway:
  825. Even if the defconfig files are not "compressed" in this fashion, the
  826. defconfig file may be old and the only way to assure that the installed
  827. .config is is up to date is via 'make oldconfig' or 'make olddefconfig'.
  828. See the paragraph above entitled ""Refreshing Configurations" for
  829. additional information.
  830. Incompatibilities with Older Configurations
  831. -------------------------------------------
  832. ***** WARNING *****
  833. The current NuttX build system supports *only* the new compressed,
  834. defconfig configuration files generated using the kconfig-frontends tools
  835. as described in the preceding section. Support for the older, legacy,
  836. manual configurations was eliminated in NuttX 7.0; support for
  837. uncompressed .config-files-as-defconfig files was eliminated after
  838. NuttX-7.21. All configurations must now be done using the
  839. kconfig-frontends tool. The older manual configurations and the new
  840. kconfig-frontends configurations are not compatible. Old legacy
  841. configurations can *not* be used with the kconfig-frontends tool and,
  842. hence, cannot be used with releases of NuttX 7.0 and beyond:
  843. If you run 'make menuconfig' with a legacy configuration the resulting
  844. configuration will probably not be functional.
  845. Q: How can I tell if a configuration is a new kconfig-frontends
  846. configuration or an older, manual configuration?
  847. A: Only old, manual configurations will have an appconfig file
  848. Q: How can I convert a older, manual configuration into a new,
  849. kconfig-frontends toolchain.
  850. A: Refer to http://www.nuttx.org/doku.php?id=wiki:howtos:convertconfig
  851. ***** WARNING *****
  852. As described above, whenever you use a configuration, you really should
  853. always refresh the configuration with the following command *before* you
  854. make NuttX:
  855. make oldconfig
  856. OR
  857. make olddefconfig
  858. This will make sure that the configuration is up-to-date in the event that
  859. it has lapsed behind the current NuttX development (see the paragraph
  860. "Refreshing Configurations" above). But this only works with *new*
  861. configuration files created with the kconfig-frontends tools.
  862. Further, this step is *NOT* optional with the new, compressed defconfig
  863. files. It is a necessary step that will also uncompress the defconfig
  864. file, regenerating the .config and making it usable for NuttX builds.
  865. Never do 'make oldconfig' (OR 'make menuconfig') on a configuration that
  866. has not been converted to use the kconfig-frontends tools! This will
  867. damage your configuration (see
  868. http://www.nuttx.org/doku.php?id=wiki:howtos:convertconfig).
  869. NuttX Configuration Tool under DOS
  870. ----------------------------------
  871. Recent versions of NuttX support building NuttX from a native Windows
  872. console window (see "Native Windows Build" below). But kconfig-frontends
  873. is a Linux tool. At one time this was a problem for Windows users, but
  874. now there is a specially modified version of the kconfig-frontends tools
  875. that can be used:
  876. http://uvc.de/posts/linux-kernel-configuration-tool-mconf-under-windows.html
  877. The configuration steps most recent versions of NuttX require the
  878. kconfig-tweak tool that is not not available in the the above. However,
  879. there has been an update to this Kconfig Windows tools that does include
  880. kconfig-tweak: http://reclonelabs.com/more-kconfig-awesomeness-for-windows/
  881. Source code is available here: https://github.com/reclone/kconfig-frontends-win32
  882. and https://github.com/reclone/kconfig-frontends-win32/releases
  883. It is also possible to use the version of kconfig-frontends built
  884. under Cygwin outside of the Cygwin "sandbox" in a native Windows
  885. environment:
  886. 1. You can run the configuration tool using Cygwin. However, the
  887. Cygwin Makefile.win will complain so to do this will, you have
  888. to manually edit the .config file:
  889. a. Delete the line: CONFIG_WINDOWS_NATIVE=y
  890. b. Change the apps/ directory path, CONFIG_APPS_DIR to use Unix
  891. style delimiters. For example, change "..\apps" to "../apps"
  892. And of course, after you use the configuration tool you need to
  893. restore CONFIG_WINDOWS_NATIVE=y and the correct CONFIG_APPS_DIR.
  894. 2) You can, with some effort, run the Cygwin kconfig-mconf tool
  895. directly in the Windows console window. In this case, you do not
  896. have to modify the .config file, but there are other complexities:
  897. a. You need to temporarily set the Cygwin directories in the PATH
  898. variable then run kconfig-mconf manually like:
  899. kconfig-mconf Kconfig
  900. There is a Windows batch file at tools/kconfig.bat that automates
  901. these steps:
  902. tools/kconfig menuconfig
  903. b. There is an issue with accessing DOS environment variables from
  904. the Cygwin kconfig-mconf running in the Windows console. The
  905. following change to the top-level Kconfig file seems to work
  906. around these problems:
  907. config APPSDIR
  908. string
  909. - option env="APPSDIR"
  910. + default "../apps"
  911. TOOLCHAINS
  912. ^^^^^^^^^^
  913. Cross-Development Toolchains
  914. ----------------------------
  915. In order to build NuttX for your board, you will have to obtain a cross-
  916. compiler to generate code for your target CPU. For each board,
  917. configuration, there is a README.txt file (at
  918. boards/<arch-name>/<chip-name>/<board-name>/README.txt).
  919. That README file contains suggestions and information about appropriate
  920. tools and development environments for use with your board.
  921. In any case, the PATH environment variable will need to be updated to
  922. include the location where the build can find the toolchain binaries.
  923. NuttX Buildroot Toolchain
  924. -------------------------
  925. For many configurations, a DIY set of tools is available for NuttX. These
  926. tools can be downloaded from the NuttX Bitbucket.org file repository. After
  927. unpacking the buildroot tarball, you can find instructions for building
  928. the tools in the buildroot/boards/README.txt file.
  929. Check the README.txt file in the configuration directory for your board
  930. to see if you can use the buildroot toolchain with your board (this
  931. README.txt file is located in
  932. boards/<arch-name>/<chip-name>/<board-name>/README.txt).
  933. This toolchain is available for both the Linux and Cygwin development
  934. environments.
  935. Advantages: (1) NuttX header files are built into the tool chain,
  936. and (2) related support tools like NXFLAT tools, the ROMFS
  937. genromfs tools, and the kconfig-frontends tools can be built into your
  938. toolchain.
  939. Disadvantages: This tool chain is not was well supported as some other
  940. toolchains. GNU tools are not my priority and so the buildroot tools
  941. often get behind. For example, until recently there was no EABI support
  942. in the NuttX buildroot toolchain for ARM.
  943. NOTE: For Cortex-M3/4, there are OABI and EABI versions of the buildroot
  944. toolchains. If you are using the older OABI toolchain the prefix for
  945. the tools will be arm-nuttx-elf-; for the EABI toolchain the prefix will
  946. be arm-nuttx-eabi-. If you are using the older OABI toolchain with
  947. an ARM Cortex-M3/4, you will need to set CONFIG_ARMV7M_OABI_TOOLCHAIN
  948. in the .config file in order to pick the right tool prefix.
  949. If the make system ever picks the wrong prefix for your toolchain, you
  950. can always specify the prefix on the command to override the default
  951. like:
  952. make CROSSDEV=arm-nuttx-elf
  953. SHELLS
  954. ^^^^^^
  955. The NuttX build relies on some shell scripts. Some are inline in the
  956. Makefiles and many are executable scripts in the tools/. directory. The
  957. scripts were all developed using bash and many contain bash shell
  958. dependencies.
  959. Most of the scripts begin with #!/bin/bash to specifically select the
  960. bash shell. Some still have #!/bin/sh but I haven't heard any complaints
  961. so these must not have bash dependencies.
  962. There are two shell issues that I have heard of:
  963. 1. Linux where /bin/sh refers to an incompatible shell (like ksh or csh).
  964. In this case, bash is probably available and the #!/bin/bash at the
  965. beginning of the file should do the job. If any scripts with #!/bin/sh
  966. fail, try changing that to #!/bin/bash and let me know about the change.
  967. 2. FreeBSD with the Bourne Shell and no bash shell.
  968. The other, reverse case has also been reported on FreeBSD setups that
  969. have the Bourne shell, but not bash. In this base, #!/bin/bash fails
  970. but #!/bin/sh works okay. My recommendation in this case is to create
  971. a symbolic link at /bin/bash that refers to the Bourne shell.
  972. There may still be issues, however, with certain the bash-centric scripts
  973. that will require modifications.
  974. BUILDING NUTTX
  975. ^^^^^^^^^^^^^^
  976. Building
  977. --------
  978. NuttX builds in-place in the source tree. You do not need to create
  979. any special build directories. Assuming that your Make.defs is setup
  980. properly for your tool chain and that PATH environment variable contains
  981. the path to where your cross-development tools are installed, the
  982. following steps are all that are required to build NuttX:
  983. cd{TOPDIR}
  984. make
  985. At least one configuration (eagle100) requires additional command line
  986. arguments on the make command. Read
  987. {TOPDIR}/boards/<arch-name>/<chip-name>/<board-name>/README.txt to see
  988. if that applies to your target.
  989. Re-building
  990. -----------
  991. Re-building is normally simple -- just type make again.
  992. But there are some things that can "get you" when you use the Cygwin
  993. development environment with Windows native tools. The native Windows
  994. tools do not understand Cygwin's symbolic links, so the NuttX make system
  995. does something weird: It copies the configuration directories instead of
  996. linking to them (it could, perhaps, use the NTFS 'mklink' command, but it
  997. doesn't).
  998. A consequence of this is that you can easily get confused when you edit
  999. a file in one of the linked (i.e., copied) directories, re-build NuttX,
  1000. and then not see your changes when you run the program. That is because
  1001. build is still using the version of the file in the copied directory, not
  1002. your modified file!
  1003. Older versions of NuttX did not support dependencies in this
  1004. configuration. So a simple work around this annoying behavior in this
  1005. case was the following when you re-build:
  1006. make clean_context all
  1007. This 'make' command will remove of the copied directories, re-copy them,
  1008. then make NuttX.
  1009. However, more recent versions of NuttX do support dependencies for the
  1010. Cygwin build. As a result, the above command will cause everything to be
  1011. rebuilt (because it removes and will cause recreating the
  1012. include/nuttx/config.h header file). A much less gracefully but still
  1013. effective command in this case is the following for the ARM configuration:
  1014. rm -rf arch/arm/src/chip arch/arm/src/board
  1015. This "kludge" simple removes the copied directories. These directories
  1016. will be re-created when you do a normal 'make' and your edits will then be
  1017. effective.
  1018. Build Targets and Options
  1019. -------------------------
  1020. Build Targets:
  1021. Below is a summary of the build targets available in the top-level
  1022. NuttX Makefile:
  1023. all
  1024. The default target builds the NuttX executable in the selected output
  1025. formats.
  1026. clean
  1027. Removes derived object files, archives, executables, and temporary
  1028. files, but retains the configuration and context files and directories.
  1029. check_format
  1030. Will run nxstyle to check compliance with the NuttX coding standard on
  1031. the files the have been changed relative to master. This feature is only
  1032. available if 1) git is installed and 2) the changed files are located in
  1033. the local git repository and have been committed. The benefit of this
  1034. flow is that commits that only effect formatting changes do not over
  1035. shadow code changes. As of this writting this is a Unix only feature.
  1036. distclean
  1037. Does 'clean' then also removes all configuration and context files.
  1038. This essentially restores the directory structure to its original,
  1039. unconfigured stated.
  1040. Application housekeeping targets. The APPDIR variable refers to the user
  1041. application directory. A sample apps/ directory is included with NuttX,
  1042. however, this is not treated as part of NuttX and may be replaced with a
  1043. different application directory. For the most part, the application
  1044. directory is treated like any other build directory in the Makefile script.
  1045. However, as a convenience, the following targets are included to support
  1046. housekeeping functions in the user application directory from the NuttX
  1047. build directory.
  1048. apps_clean
  1049. Perform the clean operation only in the user application directory
  1050. apps_distclean
  1051. Perform the distclean operation only in the user application directory.
  1052. The apps/.config file is preserved so that this is not a "full" distclean
  1053. but more of a configuration "reset" for the application directory.
  1054. export
  1055. The export target will package the NuttX libraries and header files into
  1056. an exportable package. Caveats: (1) These needs some extension for the KERNEL
  1057. build. (2) The logic in tools/mkexport.sh only supports GCC and, for example,
  1058. explicitly assumes that the archiver is 'ar'
  1059. download
  1060. This is a helper target that will rebuild NuttX and download it to the target
  1061. system in one step. The operation of this target depends completely upon
  1062. implementation of the DOWNLOAD command in the user Make.defs file. It will
  1063. generate an error an error if the DOWNLOAD command is not defined.
  1064. The following targets are used internally by the make logic but can be invoked
  1065. from the command under certain conditions if necessary.
  1066. depend
  1067. Create build dependencies. (NOTE: There is currently no support for build
  1068. dependencies under Cygwin using Windows-native toolchains.)
  1069. context
  1070. The context target is invoked on each target build to assure that NuttX is
  1071. properly configured. The basic configuration steps include creation of the
  1072. the config.h and version.h header files in the include/nuttx directory and
  1073. the establishment of symbolic links to configured directories.
  1074. clean_context
  1075. This is part of the distclean target. It removes all of the header files
  1076. and symbolic links created by the context target.
  1077. Build Options:
  1078. Of course, the value any make variable an be overridden from the make command
  1079. line. However, there is one particular variable assignment option that may
  1080. be useful to you:
  1081. V=1
  1082. This is the build "verbosity flag." If you specify V=1 on the make command
  1083. line, you will see the exact commands used in the build. This can be very
  1084. useful when adding new boards or tracking down compile time errors and
  1085. warnings (Contributed by Richard Cochran).
  1086. Native Windows Build
  1087. --------------------
  1088. The beginnings of a Windows native build are in place but still not often
  1089. used as of this writing. The build was functional but because of lack of
  1090. use may find some issues to be resolved with this build configuration.
  1091. The windows native build logic initiated if CONFIG_WINDOWS_NATIVE=y is
  1092. defined in the NuttX configuration file:
  1093. This build:
  1094. - Uses all Windows style paths
  1095. - Uses primarily Windows batch commands from cmd.exe, with
  1096. - A few extensions from GNUWin32
  1097. In this build, you cannot use a Cygwin or MSYS shell. Rather the build must
  1098. be performed in a Windows console window. Here is a better terminal than the
  1099. standard issue, CMD.exe terminal: ConEmu which can be downloaded from:
  1100. https://sourceforge.net/projects/conemu/ or https://conemu.github.io/ .
  1101. Build Tools. The build still relies on some Unix-like commands. I use
  1102. the GNUWin32 tools that can be downloaded from http://gnuwin32.sourceforge.net/
  1103. using the 'Download all' selection. Individual packages can be download
  1104. instead if you know what you are doing and want a faster download (No, I
  1105. can't tell you which packages you should or should not download).
  1106. Host Compiler: I use the MingGW GCC compiler which can be downloaded from
  1107. http://www.mingw.org/. If you are using GNUWin32, then it is recommended
  1108. the you not install the optional MSYS components as there may be conflicts.
  1109. This capability should still be considered a work in progress because:
  1110. (1) It has not been verified on all targets and tools, and
  1111. (2) it still lacks some of the creature-comforts of the more mature
  1112. environments.
  1113. Installing GNUWin32
  1114. -------------------
  1115. The Windows native build will depend upon a few Unix-like tools that can be
  1116. provided either by MSYS or GNUWin32. The GNUWin32 are available from
  1117. http://gnuwin32.sourceforge.net/. GNUWin32 provides ports of tools with a
  1118. GPL or similar open source license to modern MS-Windows (Microsoft Windows
  1119. 2000 / XP / 2003 / Vista / 2008 / 7). See
  1120. http://gnuwin32.sourceforge.net/packages.html for a list of all of the tools
  1121. available in the GNUWin32 package.
  1122. The SourceForge project is located here:
  1123. http://sourceforge.net/projects/gnuwin32/. The project is still being
  1124. actively supported (although some of the Windows ports have gotten very old).
  1125. Some commercial toolchains include a subset of the GNUWin32 tools in the
  1126. installation. My recommendation is that you download the GNUWin32 tools
  1127. directly from the sourceforge.net website so that you will know what you are
  1128. using and can reproduce your build environment.
  1129. GNUWin32 Installation Steps:
  1130. The following steps will download and execute the GNUWin32 installer.
  1131. 1. Download GetGNUWin32-x.x.x.exe from
  1132. http://sourceforge.net/projects/getgnuwin32/files/. This is the
  1133. installer. The current version as of this writing is 0.6.3.
  1134. 2. Run the installer.
  1135. 3. Accept the license.
  1136. 4. Select the installation directory. My recommendation is the
  1137. directory that contains this README file (<this-directory>).
  1138. 5. After running GetGNUWin32-0.x.x.exe, you will have a new directory
  1139. <this-directory>/GetGNUWin32
  1140. Note that the GNUWin32 installer didn't install GNUWin32. Instead, it
  1141. installed another, smarter downloader. That downloader is the GNUWin32
  1142. package management tool developed by the Open SSL project.
  1143. The following steps probably should be performed from inside a DOS shell.
  1144. 6. Change to the directory created by GetGNUWin32-x.x.x.exe
  1145. cd GetGNUWin32
  1146. 7. Execute the download.bat script. The download.bat script will download
  1147. about 446 packages! Enough to have a very complete Linux-like environment
  1148. under the DOS shell. This will take awhile. This step only downloads
  1149. the packages and the next step will install the packages.
  1150. download
  1151. 8. This step will install the downloaded packages. The argument of the
  1152. install.bat script is the installation location. C:\gnuwin32 is the
  1153. standard install location:
  1154. install C:\gnuwin32
  1155. NOTE: This installation step will install *all* GNUWin32 packages... far
  1156. more than you will ever need. If disc space is a problem for you, you might
  1157. need to perform a manual installation of the individual ZIP files that you
  1158. will find in the <this directory>/GetGNUWin32/packages directory.
  1159. CYGWIN BUILD PROBLEMS
  1160. ^^^^^^^^^^^^^^^^^^^^^
  1161. Performance
  1162. -----------
  1163. Build performance under Cygwin is really not so bad, certainly not as good
  1164. as a Linux build. However, often you will find that the performance is
  1165. not just bad but terrible. If you are seeing awful performance.. like two
  1166. or three compilations per second.. the culprit is usually your Windows
  1167. Anti-Virus protection interfering with the build tool program execution.
  1168. I use Cygwin quite often and I use Windows Defender. In order to get good
  1169. build performance, I routinely keep the Windows Defender "Virus & Threat
  1170. Protections Settings" screen up: I disable "Real-Time Protection" just
  1171. before entering 'make' then turn "Real-Time Protection" back on when the
  1172. build completes. With this additional nuisance step, I find that build
  1173. performance under Cygwin is completely acceptable.
  1174. Strange Path Problems
  1175. ---------------------
  1176. If you see strange behavior when building under Cygwin then you may have
  1177. a problem with your PATH variable. For example, if you see failures to
  1178. locate files that are clearly present, that may mean that you are using
  1179. the wrong version of a tool. For example, you may not be using Cygwin's
  1180. 'make' program at /usr/bin/make. Try:
  1181. which make
  1182. /usr/bin/make
  1183. When you install some toolchains (such as Yargarto or CodeSourcery tools),
  1184. they may modify your PATH variable to include a path to their binaries.
  1185. At that location, they may have GNUWin32 versions of the tools. So you
  1186. might actually be using a version of make that does not understand Cygwin
  1187. paths.
  1188. The solution is either:
  1189. 1. Edit your PATH to remove the path to the GNUWin32 tools, or
  1190. 2. Put /usr/local/bin, /usr/bin, and /bin at the front of your path:
  1191. export PATH=/usr/local/bin:/usr/bin:/bin:$PATH
  1192. Window Native Toolchain Issues
  1193. ------------------------------
  1194. There are many popular Windows native toolchains that may be used with NuttX.
  1195. Examples include CodeSourcery (for Windows), devkitARM, and several vendor-
  1196. provided toolchains. There are several limitations with using a and Windows
  1197. based toolchain in a Cygwin environment. The three biggest are:
  1198. 1. The Windows toolchain cannot follow Cygwin paths. Path conversions are
  1199. performed automatically in the Cygwin makefiles using the 'cygpath' utility
  1200. but you might easily find some new path problems. If so, check out 'cygpath -w'
  1201. 2. Windows toolchains cannot follow Cygwin symbolic links. Many symbolic links
  1202. are used in Nuttx (e.g., include/arch). The make system works around these
  1203. problems for the Windows tools by copying directories instead of linking them.
  1204. But this can also cause some confusion for you: For example, you may edit
  1205. a file in a "linked" directory and find that your changes had no effect.
  1206. That is because you are building the copy of the file in the "fake" symbolic
  1207. directory. If you use a Windows toolchain, you should get in the habit of
  1208. making like this:
  1209. make clean_context all
  1210. An alias in your .bashrc file might make that less painful. The rebuild
  1211. is not a long as you might think because there is no dependency checking
  1212. if you are using a native Windows toolchain. That bring us to #3:
  1213. General Pre-built Toolchain Issues
  1214. ----------------------------------
  1215. To continue with the list of "Window Native Toolchain Issues" we can add
  1216. the following. These, however, are really just issues that you will have
  1217. if you use any pre-built toolchain (vs. building the NuttX toolchain from
  1218. the NuttX buildroot package):
  1219. There may be incompatibilities with header files, libraries, and compiler
  1220. built-in functions detailed below. For the most part, these issues
  1221. are handled in the existing make logic. But if you are breaking new ground,
  1222. then you may encounter these:
  1223. 4. Header Files. Most pre-built toolchains will build with a foreign C
  1224. library (usually newlib, but maybe uClibc or glibc if you are using a
  1225. Linux toolchain). This means that the header files from the foreign
  1226. C library will be built into the toolchain. So if you "include <stdio.h>",
  1227. you will get the stdio.h from the incompatible, foreign C library and
  1228. not the nuttx stdio.h (at nuttx/include/stdio.h) that you wanted.
  1229. This can cause confusion in the builds and you must always be
  1230. sure the -nostdinc is included in the CFLAGS. That will assure that
  1231. you take the include files only from
  1232. 5. Libraries. What was said above header files applies to libraries.
  1233. You do not want to include code from the libraries of any foreign
  1234. C libraries built into your toolchain. If this happens you will get
  1235. perplexing errors about undefined symbols. To avoid these errors,
  1236. you will need to add -nostdlib to your CFLAGS flags to assure that
  1237. you only take code from the NuttX libraries.
  1238. This, however, may causes other issues for libraries in the toolchain
  1239. that you do want (like libgcc.a or libm.a). These are special-cased
  1240. in most Makefiles, but you could still run into issues of missing
  1241. libraries.
  1242. 6. Built-Ins. Some compilers target a particular operating system.
  1243. Many people would, for example, like to use the same toolchain to
  1244. develop Linux and NuttX software. Compilers built for other
  1245. operating systems may generate incompatible built-in logic and,
  1246. for this reason, -fno-builtin should also be included in your
  1247. C flags
  1248. And finally you may not be able to use NXFLAT.
  1249. 7. NXFLAT. If you use a pre-built toolchain, you will lose all support
  1250. for NXFLAT. NXFLAT is a binary format described in
  1251. Documentation/NuttXNxFlat.html. It may be possible to build
  1252. standalone versions of the NXFLAT tools; there are a few examples
  1253. of this in the buildroot repository at https://bitbucket.org/nuttx/buildroot
  1254. However, it is possible that there could be interoperability issues
  1255. with your toolchain since they will be using different versions of
  1256. binutils and possibly different ABIs.
  1257. Building Original Linux Boards in Cygwin
  1258. ----------------------------------------
  1259. Some default board configurations are set to build under Linux and others
  1260. to build under Windows with Cygwin. Various default toolchains may also
  1261. be used in each configuration. It is possible to change the default
  1262. setup. Here, for example, is what you must do in order to compile a
  1263. default Linux configuration in the Cygwin environment using the
  1264. CodeSourcery for Windows toolchain. After instantiating a "canned"
  1265. NuttX configuration, run the target 'menuconfig' and set the following
  1266. items:
  1267. Build Setup->Build Host Platform->Windows
  1268. Build Setup->Windows Build Environment->Cygwin
  1269. System Type->Toolchain Selection->CodeSourcery GNU Toolchain under Windows
  1270. In Windows 7 it may be required to open the Cygwin shell as Administrator
  1271. ("Run As" option, right button) you find errors like "Permission denied".
  1272. Recovering from Bad Configurations
  1273. ----------------------------------
  1274. Many people make the mistake of configuring NuttX with the "canned"
  1275. configuration and then just typing 'make' with disastrous consequences;
  1276. the build may fail with mysterious, uninterpretable, and irrecoverable
  1277. build errors. If, for example, you do this with an unmodified Linux
  1278. configuration in a Windows/Cgwin environment, you will corrupt the
  1279. build environment. The environment will be corrupted because of POSIX vs
  1280. Windows path issues and with issues related to symbolic links. If you
  1281. make the mistake of doing this, the easiest way to recover is to just
  1282. start over: Do 'make distclean' to remove every trace of the corrupted
  1283. configuration, reconfigure from scratch, and make certain that the set
  1284. the configuration correctly for your platform before attempting to make
  1285. again.
  1286. Just fixing the configuration file after you have instantiated the bad
  1287. configuration with 'make' is not enough.
  1288. DOCUMENTATION
  1289. ^^^^^^^^^^^^^
  1290. Additional information can be found in the Documentation/ directory and
  1291. also in README files that are scattered throughout the source tree. The
  1292. documentation is in HTML and can be access by loading the following file
  1293. into your Web browser:
  1294. Documentation/index.html
  1295. NuttX documentation is also available online at http://www.nuttx.org.
  1296. Below is a guide to the available README files in the NuttX source tree:
  1297. nuttx/
  1298. |
  1299. |- arch/
  1300. | |
  1301. | |- arm/
  1302. | | `- src
  1303. | | |- common
  1304. | | | `- README_lwl_console.txt
  1305. | | |- lpc214x
  1306. | | | `-README.txt
  1307. | | `- stm32l4
  1308. | | `- README.txt
  1309. | |- renesas/
  1310. | | |- include/
  1311. | | | `-README.txt
  1312. | | |- src/
  1313. | | | `-README.txt
  1314. | |- x86/
  1315. | | |- include/
  1316. | | | `-README.txt
  1317. | | `- src/
  1318. | | `-README.txt
  1319. | `- z80/
  1320. | | `- src/
  1321. | | |- z80/README.txt
  1322. | | `- z180/README.txt, z180_mmu.txt
  1323. | `- README.txt
  1324. |- audio/
  1325. | `-README.txt
  1326. |- binfmt/
  1327. | `-libpcode/
  1328. | `-README.txt
  1329. |- boards/
  1330. | |- arm/
  1331. | | |- a1x/
  1332. | | | `- pcduino-a10/
  1333. | | | `- README.txt
  1334. | | |- am335x/
  1335. | | | `- beaglebone-black/
  1336. | | | `- README.txt
  1337. | | |- c5471/
  1338. | | | `- c5471evm/
  1339. | | | `- README.txt
  1340. | | |- cxd56xx/
  1341. | | | `- spresense/
  1342. | | | `- README.txt
  1343. | | |- dm320/
  1344. | | | `- ntosd-dm320/
  1345. | | | |- doc/README.txt
  1346. | | | `- README.txt
  1347. | | |- efm32/
  1348. | | | |- efm32-g8xx-stk/
  1349. | | | | `- README.txt
  1350. | | | |- efm32gg-stk3700/
  1351. | | | | `- README.txt
  1352. | | | `- olimex-efm32g880f128-stk/
  1353. | | | `- README.txt
  1354. | | |- imx6/
  1355. | | | `- sabre-6quad/
  1356. | | | `- README.txt
  1357. | | |- imxrt/
  1358. | | | |- imxrt1050-evk/
  1359. | | | | `- README.txt
  1360. | | | `- imxrt1060-evk/
  1361. | | | `- README.txt
  1362. | | |- kinetis/
  1363. | | | |- freedom-k28f/
  1364. | | | | `- README.txt
  1365. | | | |- freedom-k64f/
  1366. | | | | `- README.txt
  1367. | | | |- freedom-k66f/
  1368. | | | | `- README.txt
  1369. | | | |- kwikstik-k40/
  1370. | | | | `- README.txt
  1371. | | | |- teensy-3.x/
  1372. | | | | `- README.txt
  1373. | | | |- twr-k60n512/
  1374. | | | | `- README.txt
  1375. | | | `- twr-k64f120m/
  1376. | | | `- README.txt
  1377. | | |- kl/
  1378. | | | |- freedom-kl25z/
  1379. | | | | `- README.txt
  1380. | | | |- freedom-kl26z/
  1381. | | | | `- README.txt
  1382. | | | `- teensy-lc/
  1383. | | | `- README.txt
  1384. | | |- lc823450/
  1385. | | | `- lc823450-xgevk/
  1386. | | | `- README.txt
  1387. | | |- lpc17xx_40xx/
  1388. | | | |- lincoln60/
  1389. | | | | `- README.txt
  1390. | | | |- lpc4088-devkit/
  1391. | | | | `- README.txt
  1392. | | | |- lpc4088-quickstart/
  1393. | | | | `- README.txt
  1394. | | | |- lpcxpresso-lpc1768/
  1395. | | | | `- README.txt
  1396. | | | |- lx_cpu/
  1397. | | | | `- README.txt
  1398. | | | |- mbed/
  1399. | | | | `- README.txt
  1400. | | | |- mcb1700/
  1401. | | | | `- README.txt
  1402. | | | |- olimex-lpc1766stk/
  1403. | | | | `- README.txt
  1404. | | | |- open1788/
  1405. | | | | `- README.txt
  1406. | | | |- pnev5180b/
  1407. | | | | `- README.txt
  1408. | | | |- u-blox-c027/
  1409. | | | | `- README.txt
  1410. | | | `- zkit-arm-1769/
  1411. | | | `- README.txt
  1412. | | |- lpc214x/
  1413. | | | |- mcu123-lpc214x/
  1414. | | | | `- README.txt
  1415. | | | `- zp214xpa/
  1416. | | | `- README.txt
  1417. | | |- lpc2378/
  1418. | | | `- olimex-lpc2378/
  1419. | | | `- README.txt
  1420. | | |- lpc31xx/
  1421. | | | |- ea3131/
  1422. | | | | `- README.txt
  1423. | | | |- ea3152/
  1424. | | | | `- README.txt
  1425. | | | `- olimex-lpc-h3131/
  1426. | | | `- README.txt
  1427. | | |- lpc43xx/
  1428. | | | |- bambino-200e/
  1429. | | | | `- README.txt
  1430. | | | |- lpc4330-xplorer/
  1431. | | | | `- README.txt
  1432. | | | |- lpc4337-ws/
  1433. | | | | `- README.txt
  1434. | | | |- lpc4357-evb/
  1435. | | | | `- README.txt
  1436. | | | `- lpc4370-link2/
  1437. | | | `- README.txt
  1438. | | |- lpc54xx/
  1439. | | | `- lpcxpresso-lpc54628/
  1440. | | | `- README.txt
  1441. | | |- max326xx/
  1442. | | | `- max32660-evsys/
  1443. | | | `- README.txt
  1444. | | |- moxart/
  1445. | | | `- moxa/
  1446. | | |- nrf52/
  1447. | | | `- nrf52-generic/
  1448. | | | `- README.txt
  1449. | | |- nuc1xx/
  1450. | | | `- nutiny-nuc120/
  1451. | | | `- README.txt
  1452. | | |- s32k1xx/
  1453. | | | |- s32k118evb/
  1454. | | | | `- README.txt
  1455. | | | |- s32k146evb/
  1456. | | | | `- README.txt
  1457. | | | `- s32k148evb/
  1458. | | | `- README.txt
  1459. | | |- sam34/
  1460. | | | |- arduino-due/
  1461. | | | | `- README.txt
  1462. | | | |- flipnclick-sam3x/
  1463. | | | | `- README.txt
  1464. | | | |- sam3u-ek/
  1465. | | | | `- README.txt
  1466. | | | |- sam4cmp-db/
  1467. | | | | `- README.txt
  1468. | | | |- sam4e-ek/
  1469. | | | | `- README.txt
  1470. | | | |- sam4l-xplained/
  1471. | | | | `- README.txt
  1472. | | | |- sam4s-xplained/
  1473. | | | | `- README.txt
  1474. | | | `- sam4s-xplained-pro/
  1475. | | | `- README.txt
  1476. | | |- sama5/
  1477. | | | |- sama5d2-xult/
  1478. | | | | `- README.txt
  1479. | | | |- sama5d3x-ek/
  1480. | | | | `- README.txt
  1481. | | | |- sama5d3-xplained/
  1482. | | | | `- README.txt
  1483. | | | `- sama5d4-ek/
  1484. | | | `- README.txt
  1485. | | |- samd2l2/
  1486. | | | |- arduino-m0/
  1487. | | | | `- README.txt
  1488. | | | |- samd20-xplained/
  1489. | | | | `- README.txt
  1490. | | | |- samd21-xplained/
  1491. | | | | `- README.txt
  1492. | | | `- saml21-xplained/
  1493. | | | `- README.txt
  1494. | | |- samd5e5/
  1495. | | | `- metro-m4/
  1496. | | | `- README.txt
  1497. | | |- samv7/
  1498. | | | |- same70-xplained/
  1499. | | | | `- README.txt
  1500. | | | `- samv71-xult/
  1501. | | | `- README.txt
  1502. | | |- stm32/
  1503. | | | |- axoloti/
  1504. | | | | `- README.txt
  1505. | | | |- clicker2-stm32/
  1506. | | | | `- README.txt
  1507. | | | |- cloudctrl/
  1508. | | | | `- README.txt
  1509. | | | |- fire-stm32v2/
  1510. | | | | `- README.txt
  1511. | | | |- hymini-stm32v/
  1512. | | | | `- README.txt
  1513. | | | |- maple/
  1514. | | | | `- README.txt
  1515. | | | |- mikroe-stm32f4/
  1516. | | | | `- README.txt
  1517. | | | |- nucleo-f103rb/
  1518. | | | | `- README.txt
  1519. | | | |- nucleo-f207zg/
  1520. | | | | `- README.txt
  1521. | | | |- nucleo-f302r8/
  1522. | | | | `- README.txt
  1523. | | | |- nucleo-f303re/
  1524. | | | | `- README.txt
  1525. | | | |- nucleo-f303ze/
  1526. | | | | `- README.txt
  1527. | | | |- nucleo-f334r8/
  1528. | | | | `- README.txt
  1529. | | | |- nucleo-f410rb/
  1530. | | | | `- README.txt
  1531. | | | |- nucleo-f446re/
  1532. | | | | `- README.txt
  1533. | | | |- nucleo-f4x1re/
  1534. | | | | `- README.txt
  1535. | | | |- nucleo-l152re/
  1536. | | | | `- README.txt
  1537. | | | |- olimexino-stm32/
  1538. | | | |- olimex-stm32-e407/
  1539. | | | | `- README.txt
  1540. | | | |- olimex-stm32-h405/
  1541. | | | | `- README.txt
  1542. | | | |- olimex-stm32-h407/
  1543. | | | | `- README.txt
  1544. | | | |- olimex-stm32-p107/
  1545. | | | |- olimex-stm32-p207/
  1546. | | | | `- README.txt
  1547. | | | |- olimex-stm32-p407/
  1548. | | | | `- README.txt
  1549. | | | |- omnibusf4/
  1550. | | | | `- README.txt
  1551. | | | |- photon/
  1552. | | | | `- README.txt
  1553. | | | |- shenzhou/
  1554. | | | | `- README.txt
  1555. | | | |- stm32_tiny/
  1556. | | | | `- README.txt
  1557. | | | |- stm3210e-eval/
  1558. | | | | `- README.txt
  1559. | | | |- stm3220g-eval/
  1560. | | | | `- README.txt
  1561. | | | |- stm3240g-eval/
  1562. | | | | `- README.txt
  1563. | | | |- stm32butterfly2/
  1564. | | | |- stm32f103-minimum/
  1565. | | | | `- README.txt
  1566. | | | |- stm32f334-disco/
  1567. | | | | `- README.txt
  1568. | | | |- stm32f3discovery/
  1569. | | | | `- README.txt
  1570. | | | |- stm32f411e-disco/
  1571. | | | | `- README.txt
  1572. | | | |- stm32f429i-disco/
  1573. | | | | `- README.txt
  1574. | | | |- stm32f4discovery/
  1575. | | | | `- README.txt
  1576. | | | |- stm32ldiscovery/
  1577. | | | | `- README.txt
  1578. | | | |- stm32vldiscovery/
  1579. | | | | `- README.txt
  1580. | | | `- viewtool-stm32f107/
  1581. | | | `- README.txt
  1582. | | |- stm32f0l0g0/
  1583. | | | |- b-l072z-lrwan1/
  1584. | | | | `- README.txt
  1585. | | | |- nucleo-f072rb/
  1586. | | | | `- README.txt
  1587. | | | |- nucleo-f091rc/
  1588. | | | | `- README.txt
  1589. | | | |- nucleo-g070rb/
  1590. | | | | `- README.txt
  1591. | | | |- nucleo-g071rb/
  1592. | | | | `- README.txt
  1593. | | | |- nucleo-l073rz/
  1594. | | | | `- README.txt
  1595. | | | |- stm32f051-discovery/
  1596. | | | | `- README.txt
  1597. | | | `- stm32f072-discovery/
  1598. | | | `- README.txt
  1599. | | |- stm32f7/
  1600. | | | |- nucleo-144/
  1601. | | | | `- README.txt
  1602. | | | |- stm32f746g-disco/
  1603. | | | | |- configs/fb/README.txt
  1604. | | | | |- configs/nxdemo/README.txt
  1605. | | | | |- configs/nxterm/README.txt
  1606. | | | | `- README.txt
  1607. | | | |- stm32f746-ws/
  1608. | | | `- stm32f769i-disco/
  1609. | | | `- README.txt
  1610. | | |- stm32h7/
  1611. | | | `- nucleo-h743zi/
  1612. | | | `- README.txt
  1613. | | |- stm32l4/
  1614. | | | |- b-l475e-iot01a/
  1615. | | | | `- README.txt
  1616. | | | |- nucleo-l432kc/
  1617. | | | | `- README.txt
  1618. | | | |- nucleo-l452re/
  1619. | | | | `- README.txt
  1620. | | | |- nucleo-l476rg/
  1621. | | | | `- README.txt
  1622. | | | |- nucleo-l496zg/
  1623. | | | | `- README.txt
  1624. | | | |- stm32l476-mdk/
  1625. | | | | `- README.txt
  1626. | | | |- stm32l476vg-disco/
  1627. | | | | `- README.txt
  1628. | | | `- stm32l4r9ai-disco/
  1629. | | | `- README.txt
  1630. | | |- str71x/
  1631. | | | `- olimex-strp711/
  1632. | | | `- README.txt
  1633. | | |- tiva/
  1634. | | | |- dk-tm4c129x/
  1635. | | | | `- README.txt
  1636. | | | |- eagle100/
  1637. | | | | `- README.txt
  1638. | | | |- ekk-lm3s9b96/
  1639. | | | | `- README.txt
  1640. | | | |- launchxl-cc1310/
  1641. | | | | `- README.txt
  1642. | | | |- launchxl-cc1312r1/
  1643. | | | | `- README.txt
  1644. | | | |- lm3s6432-s2e/
  1645. | | | | `- README.txt
  1646. | | | |- lm3s6965-ek/
  1647. | | | | `- README.txt
  1648. | | | |- lm3s8962-ek/
  1649. | | | | `- README.txt
  1650. | | | |- lm4f120-launchpad/
  1651. | | | | `- README.txt
  1652. | | | |- tm4c123g-launchpad/
  1653. | | | | `- README.txt
  1654. | | | `- tm4c1294-launchpad/
  1655. | | | `- README.txt
  1656. | | |- tms570/
  1657. | | | |- launchxl-tms57004/
  1658. | | | | `- README.txt
  1659. | | | `- tms570ls31x-usb-kit/
  1660. | | | `- README.txt
  1661. | | `- xmc4/
  1662. | | `- xmc4500-relax/
  1663. | | `- README.txt
  1664. | |- avr/
  1665. | | |- at32uc3/
  1666. | | | `- avr32dev1/
  1667. | | | `- README.txt
  1668. | | |- at90usb/
  1669. | | | |- micropendous3/
  1670. | | | | `- README.txt
  1671. | | | `- teensy-2.0/
  1672. | | | `- README.txt
  1673. | | `- atmega/
  1674. | | |- amber/
  1675. | | | `- README.txt
  1676. | | |- arduino-mega2560/
  1677. | | | `- README.txt
  1678. | | `- moteino-mega/
  1679. | | `- README.txt
  1680. | |- hc/
  1681. | | `- mcs92s12ne64/
  1682. | | |- demo9s12ne64/
  1683. | | | `- README.txt
  1684. | | `- ne64badge/
  1685. | | `- README.txt
  1686. | |- mips/
  1687. | | |- pic32mx/
  1688. | | | |- mirtoo/
  1689. | | | | `- README.txt
  1690. | | | |- pic32mx7mmb/
  1691. | | | | `- README.txt
  1692. | | | |- pic32mx-starterkit/
  1693. | | | | `- README.txt
  1694. | | | |- sure-pic32mx/
  1695. | | | | `- README.txt
  1696. | | | `- ubw32/
  1697. | | | `- README.txt
  1698. | | `-pic32mz/
  1699. | | |- flipnclick-pic32mz/
  1700. | | | `- README.txt
  1701. | | `- pic32mz-starterkit/
  1702. | | `- README.txt
  1703. | |- misoc/
  1704. | | `- lm32/
  1705. | | `- misoc/
  1706. | | `- README.txt
  1707. | |- or1k/
  1708. | | `- mor1kx/
  1709. | | `- or1k/
  1710. | | `- README.txt
  1711. | |- renesas/
  1712. | | |- m32262f8/
  1713. | | | `- skp16c26/
  1714. | | | `- README.txt
  1715. | | `-sh7032/
  1716. | | `- us7032evb1/
  1717. | | `- README.txt
  1718. | |- risc-v/
  1719. | | |- gap8/
  1720. | | | `- gapuino/
  1721. | | | `- README.txt
  1722. | | `-nr5m100/
  1723. | | `- nr5m100-nexys4/
  1724. | | `- README.txt
  1725. | |- sim/
  1726. | | `- sim/
  1727. | | `- sim/
  1728. | | |- include/README.txt
  1729. | | `- README.txt
  1730. | |- x86/
  1731. | | `- qemu/
  1732. | | `- qemu-i486/
  1733. | | `- README.txt
  1734. | |- xtensa/
  1735. | | `- esp32/
  1736. | | `- esp32-core/
  1737. | | `- README.txt
  1738. | |- z16/
  1739. | | `- z16f2811/
  1740. | | `- z16f2800100zcog/
  1741. | | |- configs/nsh/README.txt
  1742. | | |- configs/ostest/README.txt
  1743. | | |- configs/pashello/README.txt
  1744. | | `- README.txt
  1745. | |- z80/
  1746. | | |- ez80/
  1747. | | | |- ez80f910200kitg/
  1748. | | | | |- configs/ostest/README.txt
  1749. | | | | `- README.txt
  1750. | | | |- ez80f910200zco/
  1751. | | | | |- configs/dhcpd/README.txt
  1752. | | | | |- configs/httpd/README.txt
  1753. | | | | |- configs/nettest/README.txt
  1754. | | | | |- configs/nsh/README.txt
  1755. | | | | |- configs/poll/README.txt
  1756. | | | | `- README.txt
  1757. | | | `- makerlisp/
  1758. | | | |- configs/nsh_flash/README.txt
  1759. | | | |- configs/nsh_ram/README.txt
  1760. | | | |- configs/sdboot/README.txt
  1761. | | | `- README.txt
  1762. | | |- z180/
  1763. | | | `- p112/
  1764. | | | `- README.txt
  1765. | | |- z8/
  1766. | | | |- z8encore000zco/
  1767. | | | | |- configs/ostest/README.txt
  1768. | | | | `- README.txt
  1769. | | | `- z8f64200100kit/
  1770. | | | |- configs/ostest/README.txt
  1771. | | | `- README.txt
  1772. | | `- z80/
  1773. | | `- z80sim/
  1774. | | `- README.txt
  1775. | `-README.txt
  1776. |- drivers/
  1777. | |- eeprom/
  1778. | | `- README.txt
  1779. | |- lcd/
  1780. | | | README.txt
  1781. | | `- pcf8574_lcd_backpack_readme.txt
  1782. | |- mtd/
  1783. | | `- README.txt
  1784. | |- sensors/
  1785. | | `- README.txt
  1786. | |- syslog/
  1787. | | `- README.txt
  1788. | `- README.txt
  1789. |- fs/
  1790. | |- binfs/
  1791. | | `- README.txt
  1792. | |- cromfs/
  1793. | | `- README.txt
  1794. | |- mmap/
  1795. | | `- README.txt
  1796. | |- nxffs/
  1797. | | `- README.txt
  1798. | |- smartfs/
  1799. | | `- README.txt
  1800. | |- procfs/
  1801. | | `- README.txt
  1802. | |- spiffs/
  1803. | | `- README.md
  1804. | `- unionfs/
  1805. | `- README.txt
  1806. |- graphics/
  1807. | `- README.txt
  1808. |- libs/
  1809. | |- README.txt
  1810. | |- libc/
  1811. | | |- zoneinfo
  1812. | | | `- README.txt
  1813. | | `- README.txt
  1814. | |- libdsp/
  1815. | | `- README.txt
  1816. | |- libnx/
  1817. | | |- nxfongs
  1818. | | | `- README.txt
  1819. | | `- README.txt
  1820. | |- libxx/
  1821. | `- README.txt
  1822. |- mm/
  1823. | |- shm/
  1824. | | `- README.txt
  1825. | `- README.txt
  1826. |- net/
  1827. | |- sixlowpan
  1828. | | `- README.txt
  1829. | `- README.txt
  1830. |- pass1/
  1831. | `- README.txt
  1832. |- syscall/
  1833. | `- README.txt
  1834. `- tools/
  1835. `- README.txt
  1836. Below is a guide to the available README files in the semi-optional apps/
  1837. source tree:
  1838. apps/
  1839. |- examples/
  1840. | |- bastest/README.txt
  1841. | |- json/README.txt
  1842. | |- pashello/README.txt
  1843. | `- README.txt
  1844. |- gpsutils/
  1845. | `- minmea/README.txt
  1846. |- graphics/
  1847. | |- tiff/README.txt
  1848. | `- traveler/tools/tcledit/README.txt
  1849. |- interpreters/
  1850. | |- bas/
  1851. | | `- README.txt
  1852. | |- ficl/
  1853. | | `- README.txt
  1854. | `- README.txt
  1855. |- modbus/
  1856. | `- README.txt
  1857. |- netutils/
  1858. | |- discover/
  1859. | | `- README.txt
  1860. | |- ftpc/
  1861. | | `- README.txt
  1862. | |- json/
  1863. | | `- README.txt
  1864. | |- telnetd/
  1865. | | `- README.txt
  1866. | `- README.txt
  1867. |- nshlib/
  1868. | `- README.txt
  1869. |- NxWidgets/
  1870. | `- README.txt
  1871. |- system/
  1872. | |- cdcacm/
  1873. | | `- README.txt
  1874. | |- i2c/
  1875. | | `- README.txt
  1876. | |- inifile/
  1877. | | `- README.txt
  1878. | |- install/
  1879. | | `- README.txt
  1880. | |- nsh/
  1881. | | `- README.txt
  1882. | |- nxplayer/
  1883. | | `- README.txt
  1884. | |- psmq/
  1885. | | `- README.txt
  1886. | |- symtab/
  1887. | | `- README.txt
  1888. | |- termcurses/
  1889. | | `- README.txt
  1890. | |- usbmsc/
  1891. | | `- README.txt
  1892. | `- zmodem/
  1893. | `- README.txt
  1894. `- wireless
  1895. |- bluetooth/
  1896. | `- btsak/
  1897. | `- README.txt
  1898. `- ieee802154
  1899. `- i8sak/
  1900. `- README.txt
  1901. Additional README.txt files in the other, related repositories:
  1902. NxWidgets/
  1903. |- Doxygen
  1904. | `- README.txt
  1905. |- tools
  1906. | `- README.txt
  1907. |- UnitTests
  1908. | `- README.txt
  1909. `- README.txt
  1910. buildroot/
  1911. `- README.txt
  1912. tools/
  1913. `- README.txt
  1914. uClibc++/
  1915. `- README.txt
  1916. pascal/
  1917. `- README.txt