Documentation: migrate STM32F2

This commit is contained in:
raiden00pl
2023-08-23 10:08:47 +02:00
committed by Xiang Xiao
parent fc8848ec18
commit d3b727eec3
11 changed files with 1094 additions and 1131 deletions
@@ -0,0 +1,78 @@
=======
emw3162
=======
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 1MB Flash
memory and 128KB RAM.
Configuring NuttX for the EMW3162 board
=======================================
::
$ cd nuttx
$ make apps_distclean
$ make distclean
$ ./tools/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.
@@ -0,0 +1,3 @@
================
ST Nucleo F207ZG
================
@@ -0,0 +1,35 @@
=================
Olimex STM32-P207
=================
The NuttX configuration for the Olimex STM32-P207 is assembled mainly
from the configurations stm32f4discovery and stm3240g-eval.
It was tested with the NuttX EABI "buildroot" Toolchain.
Debugging with OpenOCD via an Olimex ARM-USB-TINY-H works. Note that
CONFIG_DEBUG_SYMBOLS and CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG
are enabled so that the JTAG connection is not disconnected by the idle
loop.
The following peripherals are enabled in this configuration.
- LEDs: show the system status
- Buttons: TAMPER-button, WKUP-button, J1-Joystick (consists of RIGHT-,
UP-, LEFT-, DOWN-, and CENTER-button). Built in app
'buttons' works.
- ADC: ADC1 samples the red trim potentiometer AN_TR
Built in app 'adc' works.
- USB-FS-OTG: Enabled but not really tested, since there is only a
USB-A-connector (host) connected to the full speed STM32
inputs.
- USB-HS_OTG:The other connector (device) is connected to the high speed
STM32 inputs (not enabled).
- CAN: Built in app 'can' works, but apart from that not really tested.
- Ethernet: Ping to other station on the network works.
@@ -0,0 +1,135 @@
==================
Particle.io Photon
==================
This page discusses issues unique to NuttX configurations for the
Particle.io Photon board featuring the STM32F205RG MCU.
The STM32F205RG is a 120 MHz Cortex-M3 operation with 1MB Flash
memory and 128KB RAM. The board includes a Broadcom BCM43362 WiFi.
Selecting the Photon board on NuttX
===================================
NOTICE: We will not discuss about toolchains and environment configuration
here, please take a look at STM32F4Discovery board README or other
STM32 board because it should work for Photon board as well.
Let us to consider that you cloned the nuttx and apps repositories, then
follow these steps:
1) Clear your build system before to start::
$ make apps_distclean
$ make distclean
2) Enter inside nuttx/tools and configure to use the Photon board::
$ cd nuttx
$ tools/configure.sh photon:wlan
Configuring NuttX to use your Wireless Router (aka Access Point)
================================================================
Since you are already in the root of nuttx/ repository, execute
make menuconfig to define your Wireless Router and your password::
$ make menuconfig
Browser 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 your configuration.
Finally just compile NuttX::
$ make
Flashing NuttX in the Photon board
==================================
Connect the Photon board in your computer using a MicroUSB cable. Press and
hold both board's buttons (SETUP and RESET), then release the RESET button,
the board will start blinking in the Purple color, waiting until it starts
blinking in Yellow color. Now you can release the SETUP button as well.
1) You can verify if DFU mode in your board is working, using this command::
$ sudo dfu-util -l
dfu-util 0.8
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org
Found DFU: [2b04:d006] ver=0200, devnum=15, cfg=1, intf=0, alt=1, name="@DCT Flash /0x00000000/01*016Kg", serial="00000000010C"
Found DFU: [2b04:d006] ver=0200, devnum=15, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/03*016Ka,01*016Kg,01*064Kg,07*128Kg", serial="00000000010C"
2) Flash the nuttx.bin inside the Internal Flash::
$ sudo dfu-util -d 2b04:d006 -a 0 -s 0x08020000 -D nuttx.bin
dfu-util 0.8
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08020000, size = 331348
Download [=========================] 100% 331348 bytes
Download done.
File downloaded successfully
3) Restore the original firmware
If you config to use the stock bootloader of Photon, you may
reload the original firmware with dfu-utils as you like. Otherwise
you must have backuped the whole image beforehand, and reload it
via SWD debug port.
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 Photon::
$ telnet 192.168.1.111
Trying 192.168.1.111...
Connected to 192.168.1.111.
Escape character is '^]'
NuttShell (NSH) NuttX-7.24
nsh>
Serial console configuration
============================
Connect a USB/Serial 3.3V dongle to GND, TX and RX pins of Photon 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.
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,308 @@
==========
ST STM32F2
==========
Supported MCUs
==============
TODO
Peripheral Support
==================
The following list indicates peripherals supported in NuttX:
========== ======= =====
Peripheral Support Notes
========== ======= =====
IRQs Yes
GPIO Yes
EXTI Yes
HSE Yes
PLL Yes
HSI Yes
MSI Yes
LSE Yes
RCC Yes
SYSCFG Yes
USART Yes
FLASH Yes
DMA Yes
SPI Yes
I2S Yes
I2C Yes
RTC Yes
Timers Yes
PM Yes
RNG Yes
CRC No
CRYPTO Yes
HASH No
ADC Yes
DAC Yes
WWDG Yes
IWDG Yes
CAN Yes
USB FS Yes
USB HS Yes
ETH Yes
FSMC Yes
========== ======= =====
Memory
======
CONFIG_RAM_SIZE - Describes the installed DRAM (SRAM in this case)::
CONFIG_RAM_SIZE=0x00010000 (64Kb)
CONFIG_RAM_START - The start address of installed DRAM::
CONFIG_RAM_START=0x20000000
In addition to internal SRAM, SRAM may also be available through the FSMC.
In order to use FSMC SRAM, the following additional things need to be
present in the NuttX configuration file:
CONFIG_STM32_EXTERNAL_RAM - Indicates that SRAM is available via the
FSMC (as opposed to an LCD or FLASH).
CONFIG_HEAP2_BASE - The base address of the SRAM in the FSMC address space (hex)
CONFIG_HEAP2_SIZE - The size of the SRAM in the FSMC address space (decimal)
CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to boards that have LEDs
CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
stack. If defined, this symbol is the size of the interrupt
stack in bytes. If not defined, the user task stacks will be
used during interrupt handling.
CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions
CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to board architecture.
Clock
=====
CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG - Enables special STM32 clock
configuration features.::
CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=n
CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation
of delay loops
CAN
===
CONFIG_CAN - Enables CAN support (one or both of CONFIG_STM32_CAN1 or
CONFIG_STM32_CAN2 must also be defined)
CONFIG_CAN_EXTID - Enables support for the 29-bit extended ID.
Default Standard 11-bit IDs.
CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages.
Default: 8
CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests.
Default: 4
CONFIG_STM32_CAN1 - Enable support for CAN1
CONFIG_STM32_CAN2 - Enable support for CAN2
CONFIG_STM32_CAN1_BAUD - CAN1 BAUD rate.
Required if CONFIG_STM32_CAN1 is defined.
CONFIG_STM32_CAN2_BAUD - CAN1 BAUD rate.
Required if CONFIG_STM32_CAN2 is defined.
CONFIG_STM32_CAN_TSEG1 - The number of CAN time quanta in segment 1.
Default: 6
CONFIG_STM32_CAN_TSEG2 - the number of CAN time quanta in segment 2.
Default: 7
CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an
dump of all CAN registers.
FSMC SRAM
=========
Internal SRAM is available in all members of the STM32 family. In addition
to internal SRAM, SRAM may also be available through the FSMC. In order to
use FSMC SRAM, the following additional things need to be present in the
NuttX configuration file::
CONFIG_STM32_FSMC=y : Enables the FSMC
CONFIG_STM32_EXTERNAL_RAM=y : Indicates that SRAM is available via the
FSMC (as opposed to an LCD or FLASH).
CONFIG_HEAP2_BASE : The base address of the SRAM in the FSMC
address space
CONFIG_HEAP2_SIZE : The size of the SRAM in the FSMC
address space
CONFIG_MM_REGIONS : Must be set to a large enough value to
include the FSMC SRAM
TIMER
=====
Timer devices may be used for different purposes. One special purpose is
to generate modulated outputs for such things as motor control. If CONFIG_STM32_TIMn
is defined (as above) then the following may also be defined to indicate that
the timer is intended to be used for pulsed output modulation, ADC conversion,
or DAC conversion. Note that ADC/DAC require two definition: Not only do you have
to assign the timer (n) for used by the ADC or DAC, but then you also have to
configure which ADC or DAC (m) it is assigned to.::
CONFIG_STM32_TIMn_PWM Reserve timer n for use by PWM, n=1,..,14
CONFIG_STM32_TIMn_ADC Reserve timer n for use by ADC, n=1,..,14
CONFIG_STM32_TIMn_ADCm Reserve timer n to trigger ADCm, n=1,..,14, m=1,..,3
CONFIG_STM32_TIMn_DAC Reserve timer n for use by DAC, n=1,..,14
CONFIG_STM32_TIMn_DACm Reserve timer n to trigger DACm, n=1,..,14, m=1,..,2
For each timer that is enabled for PWM usage, we need the following additional
configuration settings::
CONFIG_STM32_TIMx_CHANNEL - Specifies the timer output channel {1,..,4}
NOTE: The STM32 timers are each capable of generating different signals on
each of the four channels with different duty cycles. That capability is
not supported by this driver: Only one output channel per timer.
JTAG
====
JTAG Enable settings (by default JTAG-DP and SW-DP are disabled)::
CONFIG_STM32_JTAG_FULL_ENABLE - Enables full SWJ (JTAG-DP + SW-DP)
CONFIG_STM32_JTAG_NOJNTRST_ENABLE - Enables full SWJ (JTAG-DP + SW-DP)
but without JNTRST.
CONFIG_STM32_JTAG_SW_ENABLE - Set JTAG-DP disabled and SW-DP enabled
USART
=====
CONFIG_U[S]ARTn_SERIAL_CONSOLE - selects the USARTn (n=1,2,3) or UART
m (m=4,5) for the console and ttys0 (default is the USART1).
CONFIG_U[S]ARTn_RXBUFSIZE - Characters are buffered as received.
This specific the size of the receive buffer
CONFIG_U[S]ARTn_TXBUFSIZE - Characters are buffered before
being sent. This specific the size of the transmit buffer
CONFIG_U[S]ARTn_BAUD - The configure BAUD of the UART. Must be
CONFIG_U[S]ARTn_BITS - The number of bits. Must be either 7 or 8.
CONFIG_U[S]ARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity
CONFIG_U[S]ARTn_2STOP - Two stop bits
SPI
===
CONFIG_STM32_SPI_INTERRUPTS - Select to enable interrupt driven SPI
support. Non-interrupt-driven, poll-waiting is recommended if the
interrupt rate would be to high in the interrupt driven case.
CONFIG_STM32_SPIx_DMA - Use DMA to improve SPIx transfer performance.
Cannot be used with CONFIG_STM32_SPI_INTERRUPT.
SDIO
====
CONFIG_SDIO_DMA - Support DMA data transfers. Requires CONFIG_STM32_SDIO
and CONFIG_STM32_DMA2.
CONFIG_STM32_SDIO_PRI - Select SDIO interrupt priority. Default: 128
CONFIG_STM32_SDIO_DMAPRIO - Select SDIO DMA interrupt priority.
Default: Medium
CONFIG_STM32_SDIO_WIDTH_D1_ONLY - Select 1-bit transfer mode. Default:
4-bit transfer mode.
ETH
===
CONFIG_STM32_PHYADDR - The 5-bit address of the PHY on the board
CONFIG_STM32_MII - Support Ethernet MII interface
CONFIG_STM32_MII_MCO1 - Use MCO1 to clock the MII interface
CONFIG_STM32_MII_MCO2 - Use MCO2 to clock the MII interface
CONFIG_STM32_RMII - Support Ethernet RMII interface
CONFIG_STM32_AUTONEG - Use PHY autonegotiation to determine speed and mode
CONFIG_STM32_ETHFD - If CONFIG_STM32_AUTONEG is not defined, then this
may be defined to select full duplex mode. Default: half-duplex
CONFIG_STM32_ETH100MBPS - If CONFIG_STM32_AUTONEG is not defined, then this
may be defined to select 100 MBps speed. Default: 10 Mbps
CONFIG_STM32_PHYSR - This must be provided if CONFIG_STM32_AUTONEG is
defined. The PHY status register address may diff from PHY to PHY. This
configuration sets the address of the PHY status register.
CONFIG_STM32_PHYSR_SPEED - This must be provided if CONFIG_STM32_AUTONEG is
defined. This provides bit mask indicating 10 or 100MBps speed.
CONFIG_STM32_PHYSR_100MBPS - This must be provided if CONFIG_STM32_AUTONEG is
defined. This provides the value of the speed bit(s) indicating 100MBps speed.
CONFIG_STM32_PHYSR_MODE - This must be provided if CONFIG_STM32_AUTONEG is
defined. This provide bit mask indicating full or half duplex modes.
CONFIG_STM32_PHYSR_FULLDUPLEX - This must be provided if CONFIG_STM32_AUTONEG is
defined. This provides the value of the mode bits indicating full duplex mode.
CONFIG_STM32_ETH_PTP - Precision Time Protocol (PTP). Not supported
but some hooks are indicated with this condition.
USB OTG FS
==========
STM32 USB OTG FS Host Driver Support
Pre-requisites::
CONFIG_USBHOST - Enable general USB host support
CONFIG_STM32_OTGFS - Enable the STM32 USB OTG FS block
CONFIG_STM32_SYSCFG - Needed
CONFIG_STM32_OTGFS_RXFIFO_SIZE - Size of the RX FIFO in 32-bit words.
Default 128 (512 bytes)
CONFIG_STM32_OTGFS_NPTXFIFO_SIZE - Size of the non-periodic Tx FIFO
in 32-bit words. Default 96 (384 bytes)
CONFIG_STM32_OTGFS_PTXFIFO_SIZE - Size of the periodic Tx FIFO in 32-bit
words. Default 96 (384 bytes)
CONFIG_STM32_OTGFS_DESCSIZE - Maximum size of a descriptor. Default: 128
CONFIG_STM32_OTGFS_SOFINTR - Enable SOF interrupts. Why would you ever
want to do that?
CONFIG_STM32_USBHOST_REGDEBUG - Enable very low-level register access
debug. Depends on CONFIG_DEBUG_FEATURES.
CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB
packets. Depends on CONFIG_DEBUG_FEATURES.
Supported Boards
================
.. toctree::
:glob:
:maxdepth: 1
boards/*/*
-82
View File
@@ -1,82 +0,0 @@
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 1MB Flash
memory and 128KB RAM.
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
$ ./tools/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.
-26
View File
@@ -1,26 +0,0 @@
Nucleo-144 Boards:
================
The Nucleo-F207ZG is a member of the Nucleo-144 board family. The Nucleo-144
is a standard board for use with several STM32 parts in the LQFP144 package.
Variants include
Order code Targeted STM32
------------- --------------
NUCLEO-F207ZG STM32F207ZGT6
NUCLEO-F303ZE STM32F303ZET6
NUCLEO-F412ZG STM32F412ZGT6
NUCLEO-F413ZH STM32F413ZHT6
NUCLEO-F429ZI STM32F429ZIT6
NUCLEO-F439ZI STM32F439ZIT6
NUCLEO-F446ZE STM32F446ZET6
NUCLEO-F722ZE STM32F722ZET6
NUCLEO-F746ZG STM32F746ZGT6
NUCLEO-F756ZG STM32F756ZGT6
NUCLEO-F767ZI STM32F767ZIT6
NUCLEO-H743ZI STM32H743ZIT6
NUCLEO-L496ZG STM32L496ZGT6
NUCLEO-L496ZG-P STM32L496ZGT6P
NUCLEO-L4A6ZG STM32L4A6ZGT6
NUCLEO-L4R5ZI STM32L4R5ZIT6
NUCLEO-L4R5ZI-P STM32L4R5ZIT6-P
@@ -1,34 +0,0 @@
README
======
The NuttX configuration for the Olimex STM32-P207 is assembled mainly
from the configurations stm32f4discovery and stm3240g-eval.
It was tested with the NuttX EABI "buildroot" Toolchain.
Debugging with OpenOCD via an Olimex ARM-USB-TINY-H works. Note that
CONFIG_DEBUG_SYMBOLS and CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG
are enabled so that the JTAG connection is not disconnected by the idle
loop.
The following peripherals are enabled in this configuration.
- LEDs: show the system status
- Buttons: TAMPER-button, WKUP-button, J1-Joystick (consists of RIGHT-,
UP-, LEFT-, DOWN-, and CENTER-button). Built in app
'buttons' works.
- ADC: ADC1 samples the red trim potentiometer AN_TR
Built in app 'adc' works.
- USB-FS-OTG: Enabled but not really tested, since there is only a
USB-A-connector (host) connected to the full speed STM32
inputs.
- USB-HS_OTG: The other connector (device) is connected to the high speed
STM32 inputs (not enabled).
- CAN: Built in app 'can' works, but apart from that not really tested.
- Ethernet: Ping to other station on the network works.
-143
View File
@@ -1,143 +0,0 @@
README
======
This README discusses issues unique to NuttX configurations for the
Particle.io Photon board featuring the STM32F205RG MCU.
The STM32F205RG is a 120 MHz Cortex-M3 operation with 1MB Flash
memory and 128KB RAM. The board includes a Broadcom BCM43362 WiFi.
Contents
========
- Selecting the Photon board on NuttX
- Configuring NuttX to use your Wireless Router (aka Access Point)
- Flashing NuttX in the Photon board
- Serial console configuration
Selecting the Photon board on NuttX
===================================
NOTICE: We will not discuss about toolchains and environment configuration
here, please take a look at STM32F4Discovery board README or other
STM32 board because it should work for Photon board as well.
Let us to consider that you cloned the nuttx and apps repositories, then
follow these steps:
1) Clear your build system before to start:
$ make apps_distclean
$ make distclean
2) Enter inside nuttx/tools and configure to use the Photon board:
$ cd nuttx
$ tools/configure.sh photon:wlan
Configuring NuttX to use your Wireless Router (aka Access Point)
================================================================
Since you are already in the root of nuttx/ repository, execute
make menuconfig to define your Wireless Router and your password:
$ make menuconfig
Browser 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 your configuration.
Finally just compile NuttX:
$ make
Flashing NuttX in the Photon board
==================================
Connect the Photon board in your computer using a MicroUSB cable. Press and
hold both board's buttons (SETUP and RESET), then release the RESET button,
the board will start blinking in the Purple color, waiting until it starts
blinking in Yellow color. Now you can release the SETUP button as well.
1) You can verify if DFU mode in your board is working, using this command:
$ sudo dfu-util -l
dfu-util 0.8
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org
Found DFU: [2b04:d006] ver=0200, devnum=15, cfg=1, intf=0, alt=1, name="@DCT Flash /0x00000000/01*016Kg", serial="00000000010C"
Found DFU: [2b04:d006] ver=0200, devnum=15, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/03*016Ka,01*016Kg,01*064Kg,07*128Kg", serial="00000000010C"
2) Flash the nuttx.bin inside the Internal Flash:
$ sudo dfu-util -d 2b04:d006 -a 0 -s 0x08020000 -D nuttx.bin
dfu-util 0.8
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08020000, size = 331348
Download [=========================] 100% 331348 bytes
Download done.
File downloaded successfully
3) Restore the original firmware
If you config to use the stock bootloader of Photon, you may
reload the original firmware with dfu-utils as you like. Otherwise
you must have backuped the whole image beforehand, and reload it
via SWD debug port.
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 Photon:
$ telnet 192.168.1.111
Trying 192.168.1.111...
Connected to 192.168.1.111.
Escape character is '^]'
NuttShell (NSH) NuttX-7.24
nsh>
Serial console configuration
============================
Connect a USB/Serial 3.3V dongle to GND, TX and RX pins of Photon 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.
File diff suppressed because it is too large Load Diff