Skip to content

Commit

Permalink
Add XML RPC server plus NXWM build fixes from Max Holtzberg
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5150 42af7a65-404d-4744-a932-0658087f49c3
  • Loading branch information
patacongo committed Sep 14, 2012
1 parent 3fcb8d9 commit 5f470bd
Show file tree
Hide file tree
Showing 16 changed files with 1,305 additions and 21 deletions.
9 changes: 8 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3341,4 +3341,11 @@
is enabled and (2) some data was obtained from read-ahead buffers.
Blocking is a bad idea in that case because there is no timeout!
(submitted by Max Holtzberg).

* configs/stm3240g-eval/xmlrpc: An example configuration for the
Embeddable Lightweight XML-RPC Server at apps/examples/xmlrpc.
See http://www.drdobbs.com/web-development/\
an-embeddable-lightweight-xml-rpc-server/184405364 for more info.
Contributed by Max Holtzberg.
* configs/*/nxwm/defconfig and sched/task_exithook.c: Fixes for
bugs that crept in during recent changes. (Submitted by Max
Holtzberg).
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ distclean: clean subdir_distclean clean_context
ifeq ($(CONFIG_BUILD_2PASS),y)
@$(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean
endif
@rm -f Make.defs setenv.sh .config
@rm -f Make.defs setenv.sh .config .config.old

# Application housekeeping targets. The APPDIR variable refers to the user
# application directory. A sample apps/ directory is included with NuttX,
Expand Down
38 changes: 38 additions & 0 deletions arch/arm/src/stm32/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,12 @@ config STM32_MII_MCO2
---help---
Use MCO2 to clock the MII interface. Default: Use MC01

config STM32_MII_EXTCLK
bool "External MII clock"
---help---
Clocking is provided by external logic. Don't use MCO for MII
clock. Default: Use MC0[1]

endchoice

config STM32_AUTONEG
Expand Down Expand Up @@ -1746,6 +1752,38 @@ config STM32_RMII
default y if !STM32_MII
depends on STM32_ETHMAC

choice
prompt "RMII clock configuration"
default STM32_RMII_MCO if STM32_STM32F10XX
default STM32_RMII_MCO1 if STM32_STM32F20XX || STM32_STM32F40XX
depends on STM32_RMII

config STM32_RMII_MCO
bool "Use MC0 as RMII clock"
depends on STM32_STM32F10XX
---help---
Use MCO to clock the RMII interface. Default: Use MC0

config STM32_RMII_MCO1
bool "Use MC01 as RMII clock"
depends on (STM32_STM32F20XX || STM32_STM32F40XX)
---help---
Use MCO1 to clock the RMII interface. Default: Use MC01

config STM32_RMII_MCO2
bool "Use MC02 as RMII clock"
depends on (STM32_STM32F20XX || STM32_STM32F40XX)
---help---
Use MCO2 to clock the RMII interface. Default: Use MC01

config STM32_RMII_EXTCLK
bool "External RMII clock"
---help---
Clocking is provided by external logic. Don't use MCO for RMII
clock. Default: Use MC0[1]

endchoice

menu "USB Host Configuration"

config STM32_OTGFS_RXFIFO_SIZE
Expand Down
60 changes: 50 additions & 10 deletions arch/arm/src/stm32/stm32_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,30 @@

#ifdef CONFIG_STM32_MII
# if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX)
# if !defined(CONFIG_STM32_MII_MCO1) && !defined(CONFIG_STM32_MII_MCO2)
# warning "Neither CONFIG_STM32_MII_MCO1 nor CONFIG_STM32_MII_MCO2 defined"
# if !defined(CONFIG_STM32_MII_MCO1) && !defined(CONFIG_STM32_MII_MCO2) && !defined(CONFIG_STM32_MII_EXTCLK)
# warning "Neither CONFIG_STM32_MII_MCO1, CONFIG_STM32_MII_MCO2, nor CONFIG_STM32_MII_EXTCLK defined"
# endif
# if defined(CONFIG_STM32_MII_MCO1) && defined(CONFIG_STM32_MII_MCO2)
# error "Both CONFIG_STM32_MII_MCO1 and CONFIG_STM32_MII_MCO2 defined"
# endif
# elif defined(CONFIG_STM32_CONNECTIVITYLINE)
# if !defined(CONFIG_STM32_MII_MCO)
# warning "CONFIG_STM32_MII_MCO not defined"
# if !defined(CONFIG_STM32_MII_MCO) && !defined(CONFIG_STM32_MII_EXTCLK)
# warning "Neither CONFIG_STM32_MII_MCO nor CONFIG_STM32_MII_EXTCLK defined"
# endif
# endif
#endif

#ifdef CONFIG_STM32_RMII
# if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX)
# if !defined(CONFIG_STM32_RMII_MCO1) && !defined(CONFIG_STM32_RMII_MCO2) && !defined(CONFIG_STM32_RMII_EXTCLK)
# warning "Neither CONFIG_STM32_RMII_MCO1, CONFIG_STM32_RMII_MCO2, nor CONFIG_STM32_RMII_EXTCLK defined"
# endif
# if defined(CONFIG_STM32_RMII_MCO1) && defined(CONFIG_STM32_RMII_MCO2)
# error "Both CONFIG_STM32_RMII_MCO1 and CONFIG_STM32_RMII_MCO2 defined"
# endif
# elif defined(CONFIG_STM32_CONNECTIVITYLINE)
# if !defined(CONFIG_STM32_RMII_MCO) && !defined(CONFIG_STM32_RMII_EXTCLK)
# warning "Neither CONFIG_STM32_RMII_MCO nor CONFIG_STM32_RMII_EXTCLK defined"
# endif
# endif
#endif
Expand Down Expand Up @@ -2735,16 +2750,41 @@ static inline void stm32_ethgpioconfig(FAR struct stm32_ethmac_s *priv)

#elif defined(CONFIG_STM32_RMII)

/* Select the RMII interface */

stm32_selectrmii();

/* Provide clocking via MCO, MCO1 or MCO2:
*
* "MCO1 (microcontroller clock output), used to output HSI, LSE, HSE or PLL
* clock (through a configurable prescaler) on PA8 pin."
*
* "MCO2 (microcontroller clock output), used to output HSE, PLL, SYSCLK or
* PLLI2S clock (through a configurable prescaler) on PC9 pin."
*/

# if defined(CONFIG_STM32_RMII_MCO1)
/* Configure MC01 to drive the PHY. Board logic must provide MC01 clocking
* info.
*/

stm32_configgpio(GPIO_MCO1);
stm32_mco1config(BOARD_CFGR_MC01_SOURCE, BOARD_CFGR_MC01_DIVIDER);

# elif defined(CONFIG_STM32_RMII_MCO2)
/* Configure MC02 to drive the PHY. Board logic must provide MC02 clocking
* info.
*/

stm32_configgpio(GPIO_MCO2);
stm32_mco2config(BOARD_CFGR_MC02_SOURCE, BOARD_CFGR_MC02_DIVIDER);

# elif defined(CONFIG_STM32_RMII_MCO)
/* Setup MCO pin for alternative usage */

#if defined(CONFIG_STM32_MII_MCO)
stm32_configgpio(GPIO_MCO);
stm32_mcoconfig(BOARD_CFGR_MCO_SOURCE);
#endif

/* Select the RMII interface */

stm32_selectrmii();
# endif

/* RMII interface pins (7):
*
Expand Down
2 changes: 1 addition & 1 deletion configs/olimex-stm32-p107/nsh/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ CONFIG_NET_MULTICAST=n
CONFIG_STM32_PHYADDR=1
CONFIG_STM32_MII=n
CONFIG_STM32_RMII=y
CONFIG_STM32_MII_MCO=y
CONFIG_STM32_RMII_MCO=y
CONFIG_STM32_AUTONEG=y
#CONFIG_STM32_ETHFD
#CONFIG_STM32_ETH100MB
Expand Down
2 changes: 1 addition & 1 deletion configs/sim/nxwm/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ CONFIG_SIM_TOUCHSCREEN=n
#
# General OS setup
#
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_USER_ENTRYPOINT="user_start"
CONFIG_DEBUG=n
CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_SYMBOLS=y
Expand Down
2 changes: 1 addition & 1 deletion configs/stm3220g-eval/nxwm/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ CONFIG_HAVE_LIBM=n
#
# General OS setup
#
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_USER_ENTRYPOINT="user_start"
CONFIG_DEBUG=n
CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_SYMBOLS=n
Expand Down
8 changes: 8 additions & 0 deletions configs/stm3240g-eval/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1320,3 +1320,11 @@ Where <subdir> is one of the following:
use NSH, then you don't care about this. This test is good for
testing the Telnet daemon only because it works in a simpler
environment than does the nsh configuration.

xmlrpc
------

An example configuration for the Embeddable Lightweight XML-RPC
Server at apps/examples/xmlrpc. See http://www.drdobbs.com/web-development/\
an-embeddable-lightweight-xml-rpc-server/184405364 for more info.
Contributed by Max Holtzberg.
2 changes: 1 addition & 1 deletion configs/stm3240g-eval/nxwm/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ CONFIG_HAVE_LIBM=n
#
# General OS setup
#
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_USER_ENTRYPOINT="user_start"
CONFIG_DEBUG=n
CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_SYMBOLS=n
Expand Down
Loading

0 comments on commit 5f470bd

Please sign in to comment.