https://github.com/niklauslee/nuttx-boilerplate
https://github.com/niklauslee/nuttx-boilerplate
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/niklauslee/nuttx-boilerplate
- Owner: niklauslee
- Created: 2017-08-30T13:20:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-30T14:25:52.000Z (over 7 years ago)
- Last Synced: 2025-01-21T17:30:36.054Z (4 months ago)
- Language: C
- Size: 7.83 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Overview
* Board: STM32F411E-Discovery
* Use USB CDC/ACM for console (not USART2)# Development settings
Required packages:
* __GCC ARM__
* __cmake__ : https://cmake.org/
* __kconfig-frontends__ : https://github.com/PX4/NuttX/tree/master/misc/tools
* __st-link tool__ : https://github.com/texane/stlink__for Linux__:
https://github.com/niklauslee/kameleon-firmware/wiki/Ubuntu-Linux__for Atom Editor__: https://github.com/niklauslee/kameleon-firmware/wiki/Development-using-Atom
# Build
1. Checkout repository
```sh
$ git clone https://github.com/niklauslee/nuttx-boilerplate.git
$ cd nuttx-boilerplate
$ git submodule init
$ git submodule update
```2. Configure NuttX
```sh
$ cd deps/nuttx/tools
$ ./configure.sh -a ../../src stm32f411e-disco/nsh
$ cd ..
```
`.config` and `Make.defs` are created at `deps/nuttx`3. Change Configuration Variables
```sh
# at deps/nuttx
$ cp ../../defconfig .config
```Or, configure manually using Kconfig-frontend as follow:
```sh
# at deps/nuttx
$ make menuconfig
```* `System Type`
* `STM32 Peripheral Support`
* `OTG FS` : __Check__
* `Device Drivers`
* `Serial Driver Support`
* `Serial console` : __No serial console__
* `USB Device Driver Support` : __Check__
* `USB Modem (CDC/ACM) support` : __Check__
* `CDC/ACM console device` : __Check__
* `Receive buffer size` : __256__
* `Transmit buffer size` : __256__
* `Board Selection`
* `Enable boardctl() interface` : __Check__
* `Enable USB device controls` : __Check__
* `RTOS Features`
* `Tasks and Scheduling`
* `Application entry point` : __kameleon_main__
* `Files and I/O`
* `Enable /dev/console` : __Uncheck__
* `Binary Loader`
* `Disable BINFMT support` : __Check__
* `Library Routines`
* `Have C++ compiler` : __Uncheck__3. Make
```sh
$ make
```4. Flash
```sh
$ st-flash write nuttx.bin 0x8000000
```5. Terminal
```sh
# Press RESET button on board
$ screen /dev/tty.usbmodem1 115200 # macOS
# or
$ screen /dev/ttyACM0 115200 # Linux# Hit return several times,
# then "Hello, World" will be printed.
```