From f6069328b3a44919ae6a2253e0c9fc34ea0b424c Mon Sep 17 00:00:00 2001 From: Fanda Date: Tue, 17 Jul 2018 16:43:51 +0000 Subject: [PATCH] Merged in fvacek/nuttx (pull request #685) stm32f746g-disco/nxdemo configuration to build working nxdemo application related to #109 Approved-by: GregoryN --- configs/stm32f746g-disco/nxdemo/README.txt | 53 ++++++++++ configs/stm32f746g-disco/nxdemo/defconfig | 96 +++++++++++++++++++ .../src/stm32_appinitialize.c | 1 + 3 files changed, 150 insertions(+) create mode 100644 configs/stm32f746g-disco/nxdemo/README.txt create mode 100644 configs/stm32f746g-disco/nxdemo/defconfig diff --git a/configs/stm32f746g-disco/nxdemo/README.txt b/configs/stm32f746g-disco/nxdemo/README.txt new file mode 100644 index 0000000000..ded83917fe --- /dev/null +++ b/configs/stm32f746g-disco/nxdemo/README.txt @@ -0,0 +1,53 @@ +README.txt +========== + +STM32F746G-DISCO NX demo example + +Configure and build +------------------- + +tools/configure.sh stm32f746g-disco/nxdemo +make + + +Configuration +------------ + +This configuration provides 1 LTDC with +16bpp pixel format and a resolution of 480x272. + +Trickiest part of config is increasing max message size (CONFIG_MQ_MAXMSGSIZE=256). +NX server - client communication cannot be established with default value 8 bytes. + + +Loading +------- + +st-flash write nuttx.bin 0x8000000 + +or + +openocd -f interface/stlink.cfg -f target/stm32f7x.cfg +telnet localhost 4444 +> program nuttx verify reset + + +Executing +--------- + +The ltdc is initialized during boot up. Interaction with NSH is via the serial +console provided by ST-LINK USB at 115200 8N1 baud. + +There are two graphics examples provided in this configuration: +- nxdemo +- nxhello + +Use help command to show list of examples available: + + nsh> help + +From the nsh comandline execute the example: + + nsh> nxdemo + +The test will draw animated lines, squares and circles on the device screen. diff --git a/configs/stm32f746g-disco/nxdemo/defconfig b/configs/stm32f746g-disco/nxdemo/defconfig new file mode 100644 index 0000000000..b18d0223a8 --- /dev/null +++ b/configs/stm32f746g-disco/nxdemo/defconfig @@ -0,0 +1,96 @@ +# CONFIG_ARCH_FPU is not set +# CONFIG_NSH_DISABLE_IFCONFIG is not set +# CONFIG_NSH_DISABLE_PS is not set +# CONFIG_STM32F7_FB_CMAP is not set +# CONFIG_STM32F7_LTDC_L2 is not set +CONFIG_ARCH="arm" +CONFIG_ARCH_BOARD="stm32f746g-disco" +CONFIG_ARCH_BOARD_STM32F746G_DISCO=y +CONFIG_ARCH_BUTTONS=y +CONFIG_ARCH_CHIP_STM32F746NG=y +CONFIG_ARCH_CHIP_STM32F7=y +CONFIG_ARCH_STACKDUMP=y +CONFIG_ARMV7M_DCACHE=y +CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y +CONFIG_ARMV7M_DTCM=y +CONFIG_ARMV7M_ICACHE=y +CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y +CONFIG_BOARD_INITIALIZE=y +CONFIG_BOARD_LOOPSPERMSEC=43103 +CONFIG_BUILTIN=y +CONFIG_DEBUG_FULLOPT=y +CONFIG_DEBUG_SYMBOLS=y +CONFIG_DISABLE_POLL=y +CONFIG_DRIVERS_VIDEO=y +CONFIG_HAVE_CXX=y +CONFIG_HAVE_CXXINITIALIZE=y +CONFIG_INTELHEX_BINARY=y +CONFIG_MAX_TASKS=16 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_MM_REGIONS=3 +CONFIG_NSH_BUILTIN_APPS=y +CONFIG_NSH_FILEIOSIZE=512 +CONFIG_NSH_LINELEN=64 +CONFIG_NSH_READLINE=y +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_PREALLOC_TIMERS=4 +CONFIG_PREALLOC_WDOGS=4 +CONFIG_RAM_SIZE=245760 +CONFIG_RAM_START=0x20010000 +CONFIG_RAW_BINARY=y +CONFIG_RR_INTERVAL=200 +CONFIG_SCHED_WAITPID=y +CONFIG_SDCLONE_DISABLE=y +CONFIG_STM32F7_FMC=y +CONFIG_STM32F7_LTDC=y +CONFIG_STM32F7_LTDC_FB_BASE=0xc0000000 +CONFIG_STM32F7_LTDC_FB_SIZE=261120 +CONFIG_STM32F7_USART1=y +CONFIG_USART1_SERIAL_CONSOLE=y +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_VIDEO_FB=y +CONFIG_WDOG_INTRESERVE=0 + +#CONFIG_EXAMPLES_FB=y +#CONFIG_EXAMPLES_NSH=y +#CONFIG_HOST_WINDOWS=y +#CONFIG_LCD=y +#CONFIG_TASK_NAME_SIZE=0 +#CONFIG_SPI=y +#CONFIG_START_DAY=6 +#CONFIG_START_MONTH=12 +#CONFIG_START_YEAR=2011 +#CONFIG_NFILE_DESCRIPTORS=8 +#CONFIG_NFILE_STREAMS=8 + +CONFIG_LIB_BOARDCTL=y +CONFIG_MQ_MAXMSGSIZE=256 + +CONFIG_NX=y +CONFIG_NX_BLOCKING=y +CONFIG_NXFONT_SANS28X37=y + +CONFIG_NX_DISABLE_2BPP=y +CONFIG_NX_DISABLE_4BPP=y +CONFIG_NX_DISABLE_8BPP=y +CONFIG_NX_DISABLE_16BPP=n +CONFIG_NX_DISABLE_24BPP=y +CONFIG_NX_DISABLE_32BPP=y + +CONFIG_EXAMPLES_NSH=y +CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y + +CONFIG_EXAMPLES_NXHELLO=y +CONFIG_EXAMPLES_NXHELLO_BPP=16 + +CONFIG_EXAMPLES_NXDEMO=y +CONFIG_EXAMPLES_NXDEMO_BPP=16 + +CONFIG_EXAMPLES_NXIMAGE=y +CONFIG_EXAMPLES_NXIMAGE_BPP=16 + +CONFIG_EXAMPLES_NX=y +CONFIG_EXAMPLES_NX_BPP=16 + +CONFIG_EXAMPLES_NXLINES=y +CONFIG_EXAMPLES_NXLINES_BPP=16 diff --git a/configs/stm32f746g-disco/src/stm32_appinitialize.c b/configs/stm32f746g-disco/src/stm32_appinitialize.c index 1e4a539362..9d9f145b28 100644 --- a/configs/stm32f746g-disco/src/stm32_appinitialize.c +++ b/configs/stm32f746g-disco/src/stm32_appinitialize.c @@ -38,6 +38,7 @@ ****************************************************************************/ #include +#include #include "stm32f746g-disco.h"