Skip to content

Commit

Permalink
boards: added support for EMW3162 Wi-Fi board
Browse files Browse the repository at this point in the history
  • Loading branch information
a-lunev authored and xiaoxiang781216 committed Jun 12, 2021
1 parent 1bce864 commit fd46d7a
Show file tree
Hide file tree
Showing 19 changed files with 1,362 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2092,6 +2092,8 @@ Below is a guide to the available README files in the NuttX source tree:
| | | | `- README.txt
| | | |- cloudctrl/
| | | | `- README.txt
| | | |- emw3162/
| | | | `- README.txt
| | | |- fire-stm32v2/
| | | | `- README.txt
| | | |- hymini-stm32v/
Expand Down
12 changes: 12 additions & 0 deletions boards/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,14 @@ config ARCH_BOARD_EKKLM3S9B96
TI/Stellaris EKK-LM3S9B96 board. This board is based on the
an EKK-LM3S9B96 which is a Cortex-M3.

config ARCH_BOARD_EMW3162
bool "EMW3162 Wi-Fi board"
depends on ARCH_CHIP_STM32F205RG
select ARCH_HAVE_LEDS
---help---
EMW3162 board (https://www.waveshare.com/wiki/EMW3162). This board
features the STM32F205RGY6 MCU and BCM43362KUBG Wi-Fi chip.

config ARCH_BOARD_QUICKFEATHER
bool "EOS S3 QuickFeather"
depends on ARCH_CHIP_EOSS3
Expand Down Expand Up @@ -2321,6 +2329,7 @@ config ARCH_BOARD
default "efm32-g8xx-stk" if ARCH_BOARD_EFM32G8XXSTK
default "efm32gg-stk3700" if ARCH_BOARD_EFM32GG_STK3700
default "ekk-lm3s9b96" if ARCH_BOARD_EKKLM3S9B96
default "emw3162" if ARCH_BOARD_EMW3162
default "quickfeather" if ARCH_BOARD_QUICKFEATHER
default "esp32-devkitc" if ARCH_BOARD_ESP32_DEVKITC
default "esp32-ethernet-kit" if ARCH_BOARD_ESP32_ETHERNETKIT
Expand Down Expand Up @@ -2924,6 +2933,9 @@ endif
if ARCH_BOARD_CLOUDCTRL
source "boards/arm/stm32/cloudctrl/Kconfig"
endif
if ARCH_BOARD_EMW3162
source "boards/arm/stm32/emw3162/Kconfig"
endif
if ARCH_BOARD_FIRE_STM32
source "boards/arm/stm32/fire-stm32v2/Kconfig"
endif
Expand Down
5 changes: 5 additions & 0 deletions boards/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ boards/arm/tiva/ekk-lm3s9b96
TI/Stellaris EKK-LM3S9B96 board. This board is based on the
an EKK-LM3S9B96 which is a Cortex-M3.

boards/arm/stm32/emw3162
A configuration for the EMW3162 Wi-Fi board
(https://www.waveshare.com/wiki/EMW3162). This board features
the STM32F205RGY6 MCU from STMicro.

boards/xtensa/esp32/esp-core
The ESP32 is a dual-core system from Espressif with two Harvard architecture
Xtensa LX6 CPUs. All embedded memory, external memory and peripherals are
Expand Down
12 changes: 12 additions & 0 deletions boards/arm/stm32/emw3162/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#

if ARCH_BOARD_EMW3162

config EMW3162_WLAN
bool "Enable WLAN chip support"
depends on IEEE80211_BROADCOM_FULLMAC_SDIO

endif
82 changes: 82 additions & 0 deletions boards/arm/stm32/emw3162/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
README
======

EMW3162 board (https://www.waveshare.com/EMW3162.htm) features the
STM32F205RG MCU and Broadcom BCM43362KUBG Wi-Fi chip.
The STM32F205RG is a 120 MHz Cortex-M3 operation with 1Mbit Flash
memory and 128kbytes.

Contents
========

- Configuring NuttX for the EMW3162 board
- Configuring NuttX to use your Wireless Router (aka Access Point)
- Programming Flash
- NSH via telnet
- Serial console configuration

Configuring NuttX for the EMW3162 board
=======================================

$ cd nuttx
$ make apps_distclean
$ make distclean
$ ./configure.sh emw3162:wlan

Configuring NuttX to use your Wireless Router (aka Access Point)
================================================================

$ make menuconfig

Browse the menus this way:

Application Configuration --->
NSH Library --->
Networking Configuration --->
WAPI Configuration --->
(myApSSID) SSID
(mySSIDpassphrase) Passprhase

Replace the SSID from myApSSID with your wireless router name and
the Passprhase with your WiFi password.

Exit and save.

Finally just compile NuttX:

$ make

Programming Flash
=================

Flash memory can be programmed by stlink toolset
(https://github.com/stlink-org/stlink) and ST-LINK V2 programmer
(via SWD interface) as follows:

$ sudo st-flash write nuttx.bin 0x8000000

NSH via telnet
==============

After you successfully downloaded nuttx.bin, reset the board and it
automatically connects to the corresponding wifi AP. You may login
your router to see its IP address. Assume that it's 192.168.1.111

Open a terminal on your computer and telnet your EMW3162 board:

$ telnet 192.168.1.111
Trying 192.168.1.111...
Connected to 192.168.1.111.
Escape character is '^]'

NuttShell (NSH) NuttX-10.1.0-RC1
nsh>

Serial console configuration
============================

Connect a USB/Serial 3.3V dongle to GND, TXD and RXD pins of EMW3162 board.
Then use some serial console client (minicom, picocom, teraterm, etc) confi-
gured to 115200 8n1 without software or hardware flow control.

Reset the board and you should see NuttX starting in the serial.
45 changes: 45 additions & 0 deletions boards/arm/stm32/emw3162/configs/nsh/defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_NSH_ARGCAT is not set
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
# CONFIG_NSH_CMDPARMS is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="emw3162"
CONFIG_ARCH_BOARD_EMW3162=y
CONFIG_ARCH_CHIP="stm32"
CONFIG_ARCH_CHIP_STM32=y
CONFIG_ARCH_CHIP_STM32F205RG=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BUILTIN=y
CONFIG_FS_PROCFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_INTELHEX_BINARY=y
CONFIG_MAX_TASKS=16
CONFIG_MM_REGIONS=2
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
CONFIG_NSH_READLINE=y
CONFIG_PREALLOC_TIMERS=4
CONFIG_RAM_SIZE=114688
CONFIG_RAM_START=0x20000000
CONFIG_RAW_BINARY=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_WAITPID=y
CONFIG_SDCLONE_DISABLE=y
CONFIG_START_DAY=6
CONFIG_START_MONTH=12
CONFIG_START_YEAR=2011
CONFIG_STM32_JTAG_SW_ENABLE=y
CONFIG_STM32_USART1=y
CONFIG_SYSTEM_NSH=y
CONFIG_USART1_SERIAL_CONSOLE=y
CONFIG_USER_ENTRYPOINT="nsh_main"
86 changes: 86 additions & 0 deletions boards/arm/stm32/emw3162/configs/wlan/defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_IEEE80211_BROADCOM_FWFILES is not set
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
# CONFIG_MMCSD_MMCSUPPORT is not set
# CONFIG_NSH_ARGCAT is not set
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
# CONFIG_NSH_CMDPARMS is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="emw3162"
CONFIG_ARCH_BOARD_EMW3162=y
CONFIG_ARCH_CHIP="stm32"
CONFIG_ARCH_CHIP_STM32=y
CONFIG_ARCH_CHIP_STM32F205RG=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BUILTIN=y
CONFIG_DRIVERS_IEEE80211=y
CONFIG_DRIVERS_WIRELESS=y
CONFIG_EMW3162_WLAN=y
CONFIG_FS_PROCFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IEEE80211_BROADCOM_BCM43362=y
CONFIG_IEEE80211_BROADCOM_FULLMAC_SDIO=y
CONFIG_INTELHEX_BINARY=y
CONFIG_LIBM=y
CONFIG_MAX_TASKS=16
CONFIG_MMCSD=y
CONFIG_MMCSD_SDIO=y
CONFIG_MM_REGIONS=2
CONFIG_NET=y
CONFIG_NETDB_DNSCLIENT=y
CONFIG_NETDEVICES=y
CONFIG_NETDEV_LATEINIT=y
CONFIG_NETDEV_WIRELESS_IOCTL=y
CONFIG_NETINIT_DHCPC=y
CONFIG_NETINIT_DRIPADDR=0xc0a80001
CONFIG_NETUTILS_DHCPC=y
CONFIG_NETUTILS_TELNETD=y
CONFIG_NET_BROADCAST=y
CONFIG_NET_ETH_PKTSIZE=800
CONFIG_NET_GUARDSIZE=32
CONFIG_NET_ICMP=y
CONFIG_NET_ICMP_SOCKET=y
CONFIG_NET_PKT=y
CONFIG_NET_TCP=y
CONFIG_NET_UDP=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
CONFIG_NSH_READLINE=y
CONFIG_PREALLOC_TIMERS=4
CONFIG_RAM_SIZE=114688
CONFIG_RAM_START=0x20000000
CONFIG_RAW_BINARY=y
CONFIG_RR_INTERVAL=200
CONFIG_RTC_DATETIME=y
CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_WAITPID=y
CONFIG_SDCLONE_DISABLE=y
CONFIG_SDIO_BLOCKSETUP=y
CONFIG_START_DAY=6
CONFIG_START_MONTH=12
CONFIG_START_YEAR=2011
CONFIG_STM32_DMA2=y
CONFIG_STM32_JTAG_SW_ENABLE=y
CONFIG_STM32_PWR=y
CONFIG_STM32_RTC=y
CONFIG_STM32_SDIO=y
CONFIG_STM32_SDIO_CARD=y
CONFIG_STM32_USART1=y
CONFIG_SYSLOG_CHAR=y
CONFIG_SYSLOG_DEVPATH="/dev/ttyS0"
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_PING=y
CONFIG_USART1_SERIAL_CONSOLE=y
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_WIRELESS_WAPI=y
CONFIG_WIRELESS_WAPI_CMDTOOL=y
Loading

0 comments on commit fd46d7a

Please sign in to comment.