Update README, some comments, and fix some spacing.

This commit is contained in:
Gregory Nutt 2017-01-07 10:36:18 -06:00
parent 530ec2e967
commit e568253eb3
4 changed files with 110 additions and 32 deletions

View File

@ -35,8 +35,10 @@ Contents
- Development Environment - Development Environment
- GNU Toolchain Options - GNU Toolchain Options
- Setup and Programming Flash
- LEDs - LEDs
- UARTs - UARTs
- Ser
- Timer Inputs/Outputs - Timer Inputs/Outputs
- FPU - FPU
- FSMC SRAM - FSMC SRAM
@ -46,10 +48,27 @@ Contents
Development Environment Development Environment
======================= =======================
The Development environments for the STM32F429I-DISCO board are identical The Development environments for the STM32F429I-DISCO board are identical
to the environments for other STM32F boards. For full details on the to the environments for other STM32F boards. For full details on the
environment options and setup, see the README.txt file in the environment options and setup, see the README.txt file in the
config/stm32f4discovery directory. config/stm32f4discovery directory.
Setup and Programming Flash
===========================
I use a USB cable to power and program it. And I use a USB/Serial
connected to pins PA9 and PA10 for the serial console.
FLASH may be programmed:
- Via USB using STM32 ST-Link Utility
- Via USB using OpenOCD. This command may be used to flash the
firmware using OpenOCD:
$ sudo openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg -c init -c "reset halt" -c "flash write_image erase nuttx.bin 0x08000000"
- Via JTAG/SWD connected to the SWD connector CN2.
LEDs LEDs
==== ====
@ -132,7 +151,7 @@ Default USART/UART Configuration
-------------------------------- --------------------------------
USART1 is enabled in all configurations (see */defconfig). RX and TX are USART1 is enabled in all configurations (see */defconfig). RX and TX are
configured on pins PA3 and PA2, respectively (see include/board.h). configured on pins PA10 and PA9, respectively (see include/board.h).
Timer Inputs/Outputs Timer Inputs/Outputs
==================== ====================
@ -240,7 +259,7 @@ the following lines in each Make.defs file:
Configuration Changes Configuration Changes
--------------------- ---------------------
Below are all of the configuration changes that I had to make to configs/stm3240g-eval/nsh2 Below are all of the configuration changes that I had to make to configs/stm32f429i-disco/nsh2
in order to successfully build NuttX using the Atollic toolchain WITH FPU support: in order to successfully build NuttX using the Atollic toolchain WITH FPU support:
-CONFIG_ARCH_FPU=n : Enable FPU support -CONFIG_ARCH_FPU=n : Enable FPU support
@ -598,6 +617,30 @@ instead of configure.sh:
Where <subdir> is one of the following: Where <subdir> is one of the following:
extflash:
---------
This is another NSH example. If differs from other 'nsh' configurations
in that this configuration defines an external 8 MByte SPI FLASH (the
SST25VF064C part from Silicon Storage Technology, Inc.) which must be
be connected to the Discovery board's SPI4 pins on the expansion pins.
Additionally, this demo uses UART1 for the console
NOTES:
1. This configuration assumes an SST25VF064C 8Mbyte SPI FLASH is
connected to SPI4 on the following Discovery board Pins:
SCK: Port PE2 Board Connector P1, Pin 15
MOSI: Port PE6 Board Connector P1, Pin 11
MISO: Port PE5 Board Connector P1, Pin 14
CS: Port PE4 Board Connector P1, Pin 13
2. This configuration does have UART1 output enabled and set up as
the system logging device. To use this UART, you must add an
external RS-232 line driver to the UART1 pins of the DISCO board
on PA9 and PA10 of connector P1.
ltdc: ltdc:
---- ----
STM32F429I-DISCO LTDC Framebuffer demo example. See STM32F429I-DISCO LTDC Framebuffer demo example. See
@ -843,29 +886,60 @@ Where <subdir> is one of the following:
2015-04-30 2015-04-30
Appears to be fully functional. Appears to be fully functional.
extflash: nxwm
--------- ----
This is a special configuration setup for the NxWM window manager
UnitTest. The NxWM window manager can be found here:
This is another NSH example. If differs from other 'nsh' configurations nuttx-code/NxWidgets/nxwm
in that this configuration defines an external 8 MByte SPI FLASH (the
SST25VF064C part from Silicon Storage Technology, Inc.) which must be
be connected to the Discovery board's SPI4 pins on the expansion pins.
Additionally, this demo uses UART1 for the console
NOTES: The NxWM unit test can be found at:
1. This configuration assumes an SST25VF064C 8Mbyte SPI FLASH is nuttx-code/NxWidgets/UnitTests/nxwm
connected to SPI4 on the following Discovery board Pins:
SCK: Port PE2 Board Connector P1, Pin 15 Documentation for installing the NxWM unit test can be found here:
MOSI: Port PE6 Board Connector P1, Pin 11
MISO: Port PE5 Board Connector P1, Pin 14
CS: Port PE4 Board Connector P1, Pin 13
2. This configuration does have UART1 output enabled and set up as nuttx-code/NxWidgets/UnitTests/README.txt
the system logging device. To use this UART, you must add an
external RS-232 line driver to the UART1 pins of the DISCO board Here is the quick summary of the build steps (Assuming that all of
on PA9 and PA10 of connector P1. the required packages are available in a directory ~/nuttx-code):
1. Install the nxwm configuration
$ cd ~/nuttx-code/nuttx/tools
$ ./configure.sh stm32f429i-disco/nxwm
2. Make the build context (only)
$ cd ..
$ . ./setenv.sh
$ make context
...
3. Install the nxwm unit test
$ cd ~/nuttx-code/NxWidgets
$ tools/install.sh ~/nuttx-code/apps nxwm
Creating symbolic link
- To ~/nuttx-code/NxWidgets/UnitTests/nxwm
- At ~/nuttx-code/apps/external
4. Build the NxWidgets library
$ cd ~/nuttx-code/NxWidgets/libnxwidgets
$ make TOPDIR=~/nuttx-code/nuttx
...
5. Build the NxWM library
$ cd ~/nuttx-code/NxWidgets/nxwm
$ make TOPDIR=~/nuttx-code/nuttx
...
6. Built NuttX with the installed unit test as the application
$ cd ~/nuttx-code/nuttx
$ make
usbnsh: usbnsh:
------ ------

View File

@ -70,6 +70,7 @@
# define HAVE_NXSTART # define HAVE_NXSTART
# include <nuttx/nx/nx.h> # include <nuttx/nx/nx.h>
#endif #endif
/* Should we initialize the touchscreen for the NxWM (CONFIG_NXWM=y)? This /* Should we initialize the touchscreen for the NxWM (CONFIG_NXWM=y)? This
* is done if we have a touchscreen (CONFIG_INPUT_STMPE811=y), NxWM uses the * is done if we have a touchscreen (CONFIG_INPUT_STMPE811=y), NxWM uses the
* touchscreen (CONFIG_NXWM_TOUCHSCREEN=y), and if we were asked to * touchscreen (CONFIG_NXWM_TOUCHSCREEN=y), and if we were asked to
@ -122,11 +123,6 @@
# endif # endif
#endif #endif
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************ /************************************************************************************
* Public Functions * Public Functions
************************************************************************************/ ************************************************************************************/

View File

@ -591,6 +591,7 @@ static int cmp(Bigint * a, Bigint * b)
break; break;
} }
} }
return 0; return 0;
} }
@ -784,6 +785,7 @@ static Bigint *d2b(double d, int *e, int *bits)
} }
while (!x[i]) while (!x[i])
--i; --i;
b->wds = i + 1; b->wds = i + 1;
#endif #endif
if (de) if (de)
@ -855,6 +857,7 @@ static int quorem(Bigint * b, Bigint * S)
lerr("ERROR: oversize b in quorem\n"); lerr("ERROR: oversize b in quorem\n");
} }
#endif #endif
`
if (b->wds < n) if (b->wds < n)
{ {
return 0; return 0;
@ -867,15 +870,16 @@ static int quorem(Bigint * b, Bigint * S)
q = *bxe / (*sxe + 1); /* ensure q <= true quotient */ q = *bxe / (*sxe + 1); /* ensure q <= true quotient */
#ifdef CONFIG_DEBUG_LIB #ifdef CONFIG_DEBUG_LIB
if (q > 9) if (q > 9)
{ {
lerr("ERROR: oversized quotient in quorem\n"); lerr("ERROR: oversized quotient in quorem\n");
} }
#endif #endif
if (q) if (q)
{ {
borrow = 0; borrow = 0;
carry = 0; carry = 0;
do do
{ {
#ifdef Pack_32 #ifdef Pack_32
@ -912,6 +916,7 @@ static int quorem(Bigint * b, Bigint * S)
b->wds = n; b->wds = n;
} }
} }
if (cmp(b, S) >= 0) if (cmp(b, S) >= 0)
{ {
q++; q++;
@ -919,6 +924,7 @@ static int quorem(Bigint * b, Bigint * S)
carry = 0; carry = 0;
bx = b->x; bx = b->x;
sx = S->x; sx = S->x;
do do
{ {
#ifdef Pack_32 #ifdef Pack_32
@ -943,6 +949,7 @@ static int quorem(Bigint * b, Bigint * S)
#endif #endif
} }
while (sx <= sxe); while (sx <= sxe);
bx = b->x; bx = b->x;
bxe = bx + n; bxe = bx + n;
if (!*bxe) if (!*bxe)

View File

@ -52,6 +52,7 @@
/**************************************************************************** /****************************************************************************
* Private Types * Private Types
****************************************************************************/ ****************************************************************************/
/* This describes a rendering function */ /* This describes a rendering function */
typedef CODE int (*nxf_renderer_t)(FAR nxgl_mxpixel_t *dest, uint16_t height, typedef CODE int (*nxf_renderer_t)(FAR nxgl_mxpixel_t *dest, uint16_t height,