mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Nucleo-F401RE: With these changes and the changes from previous commits, the basic Nucleo-F401RE NSH configuration is working.
This commit is contained in:
@@ -342,6 +342,18 @@ Serial Consoles
|
||||
TXD: PA10 CN9 pin 3, CN10 pin 33
|
||||
PB6 CN5 pin 3, CN10 pin 17
|
||||
|
||||
NOTE: You may need to edit the include/board.h to select different USART1
|
||||
pin selections.
|
||||
|
||||
TTL to RS-232 converter connection:
|
||||
|
||||
Nucleo CN10 STM32F401RE
|
||||
----------- ------------
|
||||
Pin 21 PA9 USART2_RX
|
||||
Pin 33 PA10 USART2_TX
|
||||
Pin 20 GND
|
||||
Pin 8 U5V
|
||||
|
||||
To configure USART1 as the console:
|
||||
|
||||
CONFIG_STM32_USART1=y
|
||||
@@ -363,9 +375,9 @@ Serial Consoles
|
||||
TXD: PA2 CN9 pin 2(See SB13, 14, 62, 63). CN10 pin 35
|
||||
PD5
|
||||
|
||||
If you have a 3.3 V TTL to RS-232 converter then this is the most convenient
|
||||
serial console to use. UART2 is the default in all of these
|
||||
configurations.
|
||||
UART2 is the default in all of these configurations.
|
||||
|
||||
TTL to RS-232 converter connection:
|
||||
|
||||
Nucleo CN9 STM32F401RE
|
||||
----------- ------------
|
||||
@@ -462,8 +474,46 @@ Shields
|
||||
Configurations
|
||||
==============
|
||||
|
||||
Composite: The composite is a super set of all the functions in nsh,
|
||||
usbserial, usbmsc. (usbnsh has not been rung out).
|
||||
nsh:
|
||||
---
|
||||
Configures the NuttShell (nsh) located at apps/examples/nsh. The
|
||||
Configuration enables the serial interfaces on UART2. Support for
|
||||
builtin applications is enabled, but in the base configuration no
|
||||
builtin applications are selected (see NOTES below).
|
||||
|
||||
NOTES:
|
||||
|
||||
1. This configuration uses the mconf-based configuration tool. To
|
||||
change this configuration using that tool, you should:
|
||||
|
||||
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
|
||||
and misc/tools/
|
||||
|
||||
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
||||
reconfiguration process.
|
||||
|
||||
2. By default, this configuration uses the CodeSourcery toolchain
|
||||
for Linux. That can easily be reconfigured, of course.
|
||||
|
||||
CONFIG_HOST_LINUX=y : Builds under Linux
|
||||
CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y : CodeSourcery for Linux
|
||||
|
||||
3. Although the default console is USART2 (which would correspond to
|
||||
the Virtual COM port) I have done all testing with the console
|
||||
device configured for USART1 (see instruction above under "Serial
|
||||
Consoles). I have been using a TTL-to-RS-232 converted connected
|
||||
as shown below:
|
||||
|
||||
Nucleo CN10 STM32F401RE
|
||||
----------- ------------
|
||||
Pin 21 PA9 USART2_RX
|
||||
Pin 33 PA10 USART2_TX
|
||||
Pin 20 GND
|
||||
Pin 8 U5V
|
||||
|
||||
cc3000:
|
||||
------
|
||||
This configuration adds support for the CC3000 Shield.
|
||||
|
||||
Build it with
|
||||
|
||||
@@ -475,28 +525,6 @@ Configurations
|
||||
|
||||
$ make qconfig
|
||||
|
||||
N.B. Memory is tight, both Flash and RAM are taxed. If you enable
|
||||
debugging you will need to add -Os following the line -g in the line:
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = -g
|
||||
|
||||
in the top level Make.degs or the code will not fit.
|
||||
|
||||
Stack space has been hand optimized using the stack coloring by enabling
|
||||
"Stack usage debug hooks" (CONFIG_DEBUG_STACK) in Build Setup-> Debug
|
||||
Options. I have selected values that have 8-16 bytes of headroom with
|
||||
network debugging on. If you enable more debugging and get a hard fault
|
||||
or any weirdness like commands hanging. Then the Idle, main or Interrupt
|
||||
stack my be too small. Stop the target and have a look a memory for a
|
||||
blown stack: No DEADBEEF at the lowest address of a given stack.
|
||||
|
||||
Given the RAM memory constraints it is not possible to be running the
|
||||
network and USB CDC/ACM and MSC at the same time. But on the bright
|
||||
side, you can export the FLASH memory to the PC. Write files on the
|
||||
Flash. Reboot and mount the FAT FS and run network code that will have
|
||||
access the files.
|
||||
|
||||
You can use the scripts/cdc-acm.inf file to install the windows
|
||||
composite device.
|
||||
|
||||
|
||||
@@ -228,14 +228,19 @@
|
||||
/* Alternate function pin selections ************************************************/
|
||||
|
||||
/* USART1:
|
||||
* RXD: PA11 CN10 pin 14
|
||||
* RXD: PA10 CN9 pin 3, CN10 pin 33
|
||||
* PB7 CN7 pin 21
|
||||
* TXD: PA10 CN9 pin 3, CN10 pin 33
|
||||
* TXD: PA9 CN5 pin 1, CN10 pin 21
|
||||
* PB6 CN5 pin 3, CN10 pin 17
|
||||
*/
|
||||
|
||||
#define GPIO_USART1_RX GPIO_USART1_RX_1 /* PA10 */
|
||||
#define GPIO_USART1_TX GPIO_USART1_TX_2 /* PA9 */
|
||||
#if 1
|
||||
# define GPIO_USART1_RX GPIO_USART1_RX_1 /* PA10 */
|
||||
# define GPIO_USART1_TX GPIO_USART1_TX_1 /* PA9 */
|
||||
#else
|
||||
# define GPIO_USART1_RX GPIO_USART1_RX_2 /* PB7 */
|
||||
# define GPIO_USART1_TX GPIO_USART1_TX_2 /* PB6 */
|
||||
#endif
|
||||
|
||||
/* USART2:
|
||||
* RXD: PA3 CN9 pin 1 (See SB13, 14, 62, 63). CN10 pin 37
|
||||
@@ -259,24 +264,11 @@
|
||||
#define GPIO_USART6_RX GPIO_USART6_RX_1 /* PC7 */
|
||||
#define GPIO_USART6_TX GPIO_USART6_TX_1 /* PC6 */
|
||||
|
||||
/* UART8 has no alternate pin config */
|
||||
|
||||
/* UART RX DMA configurations */
|
||||
|
||||
#define DMAMAP_USART1_RX DMAMAP_USART1_RX_2
|
||||
#define DMAMAP_USART6_RX DMAMAP_USART6_RX_2
|
||||
|
||||
/* CAN
|
||||
*
|
||||
* CAN1 is routed to the onboard transceiver.
|
||||
* CAN2 is routed to the expansion connector.
|
||||
*/
|
||||
|
||||
#define GPIO_CAN1_RX GPIO_CAN1_RX_3
|
||||
#define GPIO_CAN1_TX GPIO_CAN1_TX_3
|
||||
#define GPIO_CAN2_RX GPIO_CAN2_RX_1
|
||||
#define GPIO_CAN2_TX GPIO_CAN2_TX_2
|
||||
|
||||
/* I2C
|
||||
*
|
||||
* The optional _GPIO configurations allow the I2C driver to manually
|
||||
|
||||
Reference in New Issue
Block a user