Created
September 18, 2021 11:40
-
-
Save master-q/6d440830978afd0c3caa2d329b25b39e to your computer and use it in GitHub Desktop.
NuttXお試しメモ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= NuttXお試しメモ | |
[2021-09-18 19:11] | |
<<<NuttX | |
<<<RTOS | |
== シミュレータ | |
https://nuttx.apache.org/docs/latest/quickstart/install.html | |
https://nuttx.apache.org/docs/latest/guides/simulator.html | |
``` | |
$ sudo apt install \ | |
bison flex gettext texinfo libncurses5-dev libncursesw5-dev \ | |
gperf automake libtool pkg-config build-essential gperf genromfs \ | |
libgmp-dev libmpc-dev libmpfr-dev libisl-dev binutils-dev libelf-dev \ | |
libexpat-dev gcc-multilib g++-multilib picocom u-boot-tools util-linux \ | |
kconfig-frontends gcc-arm-none-eabi binutils-arm-none-eabi | |
$ mkdir nuttx | |
$ cd nuttx | |
$ git clone https://github.com/apache/incubator-nuttx.git nuttx | |
$ git clone https://github.com/apache/incubator-nuttx-apps apps | |
$ cd nuttx | |
$ ./tools/configure.sh sim:nsh | |
$ make | |
$ ./nuttx | |
login: admin | |
password: Administrator | |
User Logged-in! | |
NuttShell (NSH) NuttX-10.1.0 | |
MOTD: username=admin password=Administrator | |
nsh> help | |
help usage: help [-v] [<cmd>] | |
. cd echo hexdump mkfatfs pwd source unset | |
[ cp exec kill mkrd readlink test usleep | |
? cmp exit losetup mount rm time xd | |
basename dirname false ln mv rmdir true | |
break dd free ls poweroff set uname | |
cat df help mkdir ps sleep umount | |
Builtin Apps: | |
hello nsh sh | |
nsh> mount | |
/bin type binfs | |
/etc type romfs | |
/proc type procfs | |
/tmp type vfat | |
$ pkill nuttx | |
``` | |
setcapするとTCP/IPが使えるらしい | |
== ROM/RAM使用量調査 | |
=== 結論 | |
ROM: NuttXの方が50kB程度大きい | |
RAM: xxx ChibiOS/RTはヒープ用にBSSをコンパイル時に確保する? | |
=== NuttX | |
ROM: 94-186 kB | |
RAM: 2-30 kB | |
``` | |
$ ./tools/configure.sh -L | grep lpc1768 | |
lpcxpresso-lpc1768:dhcpd | |
lpcxpresso-lpc1768:usbmsc | |
lpcxpresso-lpc1768:nx | |
lpcxpresso-lpc1768:thttpd | |
lpcxpresso-lpc1768:nsh | |
$ ./tools/configure.sh lpcxpresso-lpc1768:nsh | |
$ make | |
$ size nuttx | |
text data bss dec hex filename | |
107388 292 9880 117560 1cb38 nuttx | |
``` | |
``` | |
$ ./tools/configure.sh -L | grep stm32f746g | |
stm32f746g-disco:netnsh | |
stm32f746g-disco:nxterm | |
stm32f746g-disco:nsh | |
stm32f746g-disco:fb | |
stm32f746g-disco:nxdemo | |
stm32f746g-disco:audio | |
stm32f746g-disco:lvgl | |
$ ./tools/configure.sh stm32f746g-disco:nsh | |
$ make | |
$ size nuttx | |
text data bss dec hex filename | |
95639 112 1964 97715 17db3 nuttx | |
``` | |
``` | |
$ ./tools/configure.sh -L | grep netnsh | grep stm32 | |
stm32f746g-disco:netnsh | |
stm32f769i-disco:netnsh | |
olimex-stm32-e407:netnsh | |
viewtool-stm32f107:netnsh | |
stm32f4discovery:netnsh | |
$ ./tools/configure.sh stm32f746g-disco:netnsh | |
$ make | |
$ size nuttx | |
text data bss dec hex filename | |
190120 508 29936 220564 35d94 nuttx | |
``` | |
=== ChibiOS/RT | |
ROM: 6,42-122 kB | |
RAM: 0.8,8-962 kB | |
``` | |
$ cd demos/AVR/NIL-ARDUINO-UNO | |
$ make | |
$ size `find . -name "*.elf"` | |
text data bss dec hex filename | |
6010 96 688 6794 1a8a ./build/ch.elf | |
``` | |
``` | |
$ cd demos/STM32/NIL-STM32F051-DISCOVERY | |
$ make | |
$ size `find . -name "*.elf"` | |
text data bss dec hex filename | |
43020 128 8064 51212 c80c ./build/ch.elf | |
``` | |
``` | |
$ cd demos/STM32/NIL-STM32F746G-DISCOVERY | |
$ make | |
$ size `find . -name "*.elf"` | |
text data bss dec hex filename | |
44640 128 266704 311472 4c0b0 ./build/ch.elf | |
$ nm build/ch.elf | sort -n | |
--snip-- | |
20000960 b wa1Thread1 | |
20001128 b wa_common | |
20001250 B __bss_end__ | |
20001250 ? __ram3_clear__ | |
20001250 ? __ram3_free__ | |
20001250 ? __ram3_init__ | |
20001250 ? __ram3_noinit__ | |
20010000 A __ram3_end__ | |
20010000 B __ram0_base__ | |
20010000 B __ram1_base__ | |
20010000 D __data_base__ | |
20010000 d es1 | |
20010000 ? __ram1_clear__ | |
20010000 ? __ram1_free__ | |
20010000 ? __ram1_init__ | |
20010000 ? __ram1_noinit__ | |
20010004 d es2 | |
20010008 d gmp1 | |
20010050 d myobj.1 | |
20010054 d pipe1 | |
20010080 B __heap_base__ | |
20010080 D __data_end__ | |
20010080 ? __ram0_clear__ | |
20010080 ? __ram0_free__ | |
20010080 ? __ram0_init__ | |
20010080 ? __ram0_noinit__ | |
20050000 A __ram0_end__ | |
20050000 A __ram2_end__ | |
20050000 B __heap_end__ | |
40024000 B __ram5_base__ | |
40024000 ? __ram5_clear__ | |
40024000 ? __ram5_free__ | |
40024000 ? __ram5_init__ | |
40024000 ? __ram5_noinit__ | |
40025000 A __ram5_end__ | |
``` | |
``` | |
$ git grep STM32F476 demos/ | |
demos/STM32/RT-STM32-LWIP-FATFS-USB-HTTPS/readme.txt:The demo runs on a STM32F476-Discovery board. | |
$ cd demos/STM32/RT-STM32-LWIP-FATFS-USB-HTTPS | |
$ make | |
$ size `find . -name "*.elf"` | |
text data bss dec hex filename | |
123896 232 430504 554632 87688 ./build/stm32f769_discovery/ch.elf | |
123976 232 299432 423640 676d8 ./build/stm32f746_discovery/ch.elf | |
123744 232 65304 189280 2e360 ./build/stm32f107_goldbull/ch.elf | |
123084 232 130840 254156 3e0cc ./build/stm32f407_olimex/ch.elf | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment