Misc changes for clean built od mikroe-stm32f4 configurations

This commit is contained in:
Gregory Nutt 2013-05-01 09:21:13 -06:00
parent bec2c3e162
commit ba52f8d3ec
9 changed files with 116 additions and 43 deletions

View File

@ -64,7 +64,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@ -208,7 +209,20 @@ static inline void stm32_mco2config(uint32_t source, uint32_t div)
*
************************************************************************************/
EXTERN void stm32_clockconfig(void);
void stm32_clockconfig(void);
/************************************************************************************
* Name: stm32_board_clockconfig
*
* Description:
* Any STM32 board may replace the "standard" board clock configuration logic with
* its own, custom clock cofiguration logic.
*
************************************************************************************/
#ifdef CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG
void stm32_board_clockconfig(void);
#endif
/************************************************************************************
* Name: stm32_clockenable
@ -236,7 +250,7 @@ EXTERN void stm32_clockconfig(void);
************************************************************************************/
#ifdef CONFIG_PM
EXTERN void stm32_clockenable(void);
void stm32_clockenable(void);
#endif
/************************************************************************************
@ -254,7 +268,7 @@ EXTERN void stm32_clockenable(void);
*
************************************************************************************/
EXTERN void stm32_rcc_enablelse(void);
void stm32_rcc_enablelse(void);
/****************************************************************************
* Name: stm32_rcc_enablelsi
@ -264,7 +278,7 @@ EXTERN void stm32_rcc_enablelse(void);
*
****************************************************************************/
EXTERN void stm32_rcc_enablelsi(void);
void stm32_rcc_enablelsi(void);
#undef EXTERN
#if defined(__cplusplus)

View File

@ -38,8 +38,9 @@
****************************************************************************/
#include <stdint.h>
#include <stdio.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <debug.h>
#include <errno.h>

View File

@ -1612,8 +1612,10 @@ static int up_interrupt_common(struct up_dev_s *priv)
static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
{
#if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_SERIAL_TIOCSERGSTRUCT)
struct inode *inode = filep->f_inode;
struct uart_dev_s *dev = inode->i_private;
#endif
#ifdef CONFIG_SERIAL_TERMIOS
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
#endif

View File

@ -69,12 +69,14 @@ CONFIG_ARCH="arm"
# CONFIG_ARCH_CHIP_DM320 is not set
# CONFIG_ARCH_CHIP_IMX is not set
# CONFIG_ARCH_CHIP_KINETIS is not set
# CONFIG_ARCH_CHIP_KL is not set
# CONFIG_ARCH_CHIP_LM is not set
# CONFIG_ARCH_CHIP_LPC17XX is not set
# CONFIG_ARCH_CHIP_LPC214X is not set
# CONFIG_ARCH_CHIP_LPC2378 is not set
# CONFIG_ARCH_CHIP_LPC31XX is not set
# CONFIG_ARCH_CHIP_LPC43XX is not set
# CONFIG_ARCH_CHIP_NUC1XX is not set
# CONFIG_ARCH_CHIP_SAM3U is not set
CONFIG_ARCH_CHIP_STM32=y
# CONFIG_ARCH_CHIP_STR71X is not set
@ -87,8 +89,6 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y
# CONFIG_ARCH_FPU is not set
CONFIG_ARCH_HAVE_MPU=y
# CONFIG_ARMV7M_MPU is not set
CONFIG_BOARD_LOOPSPERMSEC=16717
# CONFIG_ARCH_CALIBRATION is not set
#
# ARMV7M Configuration Options
@ -124,6 +124,18 @@ CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y
# CONFIG_ARCH_CHIP_STM32F105VBT7 is not set
# CONFIG_ARCH_CHIP_STM32F107VC is not set
# CONFIG_ARCH_CHIP_STM32F207IG is not set
# CONFIG_ARCH_CHIP_STM32F302CB is not set
# CONFIG_ARCH_CHIP_STM32F302CC is not set
# CONFIG_ARCH_CHIP_STM32F302RB is not set
# CONFIG_ARCH_CHIP_STM32F302RC is not set
# CONFIG_ARCH_CHIP_STM32F302VB is not set
# CONFIG_ARCH_CHIP_STM32F302VC is not set
# CONFIG_ARCH_CHIP_STM32F303CB is not set
# CONFIG_ARCH_CHIP_STM32F303CC is not set
# CONFIG_ARCH_CHIP_STM32F303RB is not set
# CONFIG_ARCH_CHIP_STM32F303RC is not set
# CONFIG_ARCH_CHIP_STM32F303VB is not set
# CONFIG_ARCH_CHIP_STM32F303VC is not set
# CONFIG_ARCH_CHIP_STM32F405RG is not set
# CONFIG_ARCH_CHIP_STM32F405VG is not set
# CONFIG_ARCH_CHIP_STM32F405ZG is not set
@ -133,6 +145,9 @@ CONFIG_ARCH_CHIP_STM32F407VG=y
# CONFIG_ARCH_CHIP_STM32F407ZG is not set
# CONFIG_ARCH_CHIP_STM32F407IE is not set
# CONFIG_ARCH_CHIP_STM32F407IG is not set
# CONFIG_ARCH_CHIP_STM32F427V is not set
# CONFIG_ARCH_CHIP_STM32F427Z is not set
# CONFIG_ARCH_CHIP_STM32F427I is not set
CONFIG_STM32_STM32F40XX=y
# CONFIG_STM32_DFU is not set
@ -160,7 +175,7 @@ CONFIG_STM32_STM32F40XX=y
# CONFIG_STM32_I2C2 is not set
# CONFIG_STM32_I2C3 is not set
# CONFIG_STM32_IWDG is not set
CONFIG_STM32_OTGFS=y
# CONFIG_STM32_OTGFS is not set
# CONFIG_STM32_OTGHS is not set
CONFIG_STM32_PWR=y
# CONFIG_STM32_RNG is not set
@ -221,6 +236,10 @@ CONFIG_STM32_USART=y
# USB Host Configuration
#
#
# USB Device Configuration
#
#
# External Memory Configuration
#
@ -238,10 +257,14 @@ CONFIG_ARCH_HAVE_VFORK=y
CONFIG_ARCH_STACKDUMP=y
# CONFIG_ENDIAN_BIG is not set
# CONFIG_ARCH_HAVE_RAMFUNCS is not set
CONFIG_ARCH_HAVE_RAMVECTORS=y
# CONFIG_ARCH_RAMVECTORS is not set
#
# Board Settings
#
CONFIG_BOARD_LOOPSPERMSEC=16717
# CONFIG_ARCH_CALIBRATION is not set
CONFIG_DRAM_START=0x20000000
CONFIG_DRAM_SIZE=114688
CONFIG_ARCH_HAVE_INTERRUPTSTACK=y
@ -260,6 +283,7 @@ CONFIG_BOOT_RUNFROMFLASH=y
# Board Selection
#
CONFIG_ARCH_BOARD_STM32F4_DISCOVERY=y
# CONFIG_ARCH_BOARD_MIKROE_STM32F4 is not set
# CONFIG_ARCH_BOARD_CUSTOM is not set
CONFIG_ARCH_BOARD="stm32f4discovery"
@ -281,6 +305,7 @@ CONFIG_NSH_MMCSDMINOR=0
#
# RTOS Features
#
# CONFIG_BOARD_INITIALIZE is not set
CONFIG_MSEC_PER_TICK=10
CONFIG_RR_INTERVAL=200
# CONFIG_SCHED_INSTRUMENTATION is not set
@ -296,7 +321,6 @@ CONFIG_DEV_CONSOLE=y
# CONFIG_FDCLONE_DISABLE is not set
# CONFIG_FDCLONE_STDIO is not set
CONFIG_SDCLONE_DISABLE=y
# CONFIG_SCHED_WORKQUEUE is not set
CONFIG_SCHED_WAITPID=y
# CONFIG_SCHED_STARTHOOK is not set
# CONFIG_SCHED_ATEXIT is not set
@ -418,11 +442,13 @@ CONFIG_USART2_2STOP=0
# CONFIG_FS_FAT is not set
# CONFIG_FS_NXFFS is not set
# CONFIG_FS_ROMFS is not set
# CONFIG_FS_SMARTFS is not set
# CONFIG_FS_BINFS is not set
#
# System Logging
#
# CONFIG_SYSLOG_ENABLE is not set
# CONFIG_SYSLOG is not set
#
@ -433,6 +459,7 @@ CONFIG_USART2_2STOP=0
#
# Memory Management
#
# CONFIG_MM_MULTIHEAP is not set
# CONFIG_MM_SMALL is not set
CONFIG_MM_REGIONS=2
# CONFIG_GRAN is not set
@ -462,11 +489,14 @@ CONFIG_LIB_HOMEDIR="/"
# CONFIG_LIBM is not set
# CONFIG_NOPRINTF_FIELDWIDTH is not set
# CONFIG_LIBC_FLOATINGPOINT is not set
CONFIG_LIB_RAND_ORDER=1
# CONFIG_EOL_IS_CR is not set
# CONFIG_EOL_IS_LF is not set
# CONFIG_EOL_IS_BOTH_CRLF is not set
CONFIG_EOL_IS_EITHER_CRLF=y
# CONFIG_LIBC_EXECFUNCS is not set
CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024
CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048
# CONFIG_LIBC_STRERROR is not set
# CONFIG_LIBC_PERROR_STDOUT is not set
CONFIG_ARCH_LOWPUTC=y
@ -475,8 +505,9 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
#
# Non-standard Helper Functions
# Non-standard Library Support
#
# CONFIG_SCHED_WORKQUEUE is not set
# CONFIG_LIB_KBDCODEC is not set
#
@ -506,7 +537,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
#
# CONFIG_EXAMPLES_BUTTONS is not set
# CONFIG_EXAMPLES_CAN is not set
# CONFIG_EXAMPLES_CDCACM is not set
# CONFIG_EXAMPLES_COMPOSITE is not set
# CONFIG_EXAMPLES_CXXTEST is not set
# CONFIG_EXAMPLES_DHCPD is not set
@ -521,8 +551,9 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
# CONFIG_EXAMPLES_IGMP is not set
# CONFIG_EXAMPLES_LCDRW is not set
# CONFIG_EXAMPLES_MM is not set
# CONFIG_EXAMPLES_MOUNT is not set
# CONFIG_EXAMPLES_MODBUS is not set
# CONFIG_EXAMPLES_MOUNT is not set
# CONFIG_EXAMPLES_MTDPART is not set
CONFIG_EXAMPLES_NSH=y
# CONFIG_EXAMPLES_NULL is not set
# CONFIG_EXAMPLES_NX is not set
@ -542,6 +573,7 @@ CONFIG_EXAMPLES_NSH=y
# CONFIG_EXAMPLES_ROMFS is not set
# CONFIG_EXAMPLES_SENDMAIL is not set
# CONFIG_EXAMPLES_SERLOOP is not set
# CONFIG_EXAMPLES_SMART_TEST is not set
# CONFIG_EXAMPLES_TELNETD is not set
# CONFIG_EXAMPLES_THTTPD is not set
# CONFIG_EXAMPLES_TIFF is not set
@ -554,8 +586,9 @@ CONFIG_EXAMPLES_NSH=y
# CONFIG_EXAMPLES_WATCHDOG is not set
#
# Interpreters
# Graphics Support
#
# CONFIG_TIFF is not set
#
# Interpreters
@ -585,11 +618,7 @@ CONFIG_EXAMPLES_NSH=y
# CONFIG_NETUTILS_WEBCLIENT is not set
#
# ModBus
#
#
# FreeModbus
# FreeModBus
#
# CONFIG_MODBUS is not set
@ -641,6 +670,11 @@ CONFIG_NSH_BUILTIN_APPS=y
# CONFIG_NSH_DISABLE_USLEEP is not set
# CONFIG_NSH_DISABLE_WGET is not set
# CONFIG_NSH_DISABLE_XD is not set
#
# Configure Command Options
#
# CONFIG_NSH_CMDOPT_DF_H is not set
CONFIG_NSH_CODECS_BUFSIZE=128
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
@ -648,6 +682,10 @@ CONFIG_NSH_NESTDEPTH=3
# CONFIG_NSH_DISABLESCRIPT is not set
# CONFIG_NSH_DISABLEBG is not set
CONFIG_NSH_CONSOLE=y
#
# USB Trace Support
#
# CONFIG_NSH_CONDEV is not set
# CONFIG_NSH_ARCHINIT is not set
@ -673,6 +711,10 @@ CONFIG_NSH_CONSOLE=y
#
# CONFIG_SYSTEM_INSTALL is not set
#
# FLASH Erase-all Command
#
#
# readline()
#
@ -698,3 +740,7 @@ CONFIG_READLINE_ECHO=y
# Sysinfo
#
# CONFIG_SYSTEM_SYSINFO is not set
#
# USB Monitor
#

View File

@ -57,7 +57,7 @@ CONFIG_DEBUG_FS=y
#
# CONFIG_DEBUG_ANALOG is not set
# CONFIG_DEBUG_SPI is not set
# CONFIG_DEBUG_DMA is not set
# CONFIG_DEBUG_GPIO is not set
CONFIG_DEBUG_SYMBOLS=y
#
@ -84,6 +84,7 @@ CONFIG_ARCH="arm"
# CONFIG_ARCH_CHIP_DM320 is not set
# CONFIG_ARCH_CHIP_IMX is not set
# CONFIG_ARCH_CHIP_KINETIS is not set
# CONFIG_ARCH_CHIP_KL is not set
# CONFIG_ARCH_CHIP_LM is not set
# CONFIG_ARCH_CHIP_LPC17XX is not set
# CONFIG_ARCH_CHIP_LPC214X is not set
@ -157,6 +158,9 @@ CONFIG_ARCH_CHIP_STM32F407VG=y
# CONFIG_ARCH_CHIP_STM32F407ZG is not set
# CONFIG_ARCH_CHIP_STM32F407IE is not set
# CONFIG_ARCH_CHIP_STM32F407IG is not set
# CONFIG_ARCH_CHIP_STM32F427V is not set
# CONFIG_ARCH_CHIP_STM32F427Z is not set
# CONFIG_ARCH_CHIP_STM32F427I is not set
CONFIG_STM32_STM32F40XX=y
# CONFIG_STM32_DFU is not set
@ -266,6 +270,8 @@ CONFIG_ARCH_HAVE_VFORK=y
CONFIG_ARCH_STACKDUMP=y
# CONFIG_ENDIAN_BIG is not set
# CONFIG_ARCH_HAVE_RAMFUNCS is not set
CONFIG_ARCH_HAVE_RAMVECTORS=y
# CONFIG_ARCH_RAMVECTORS is not set
#
# Board Settings
@ -402,6 +408,13 @@ CONFIG_MMCSD_SPI=y
CONFIG_MMCSD_SPICLOCK=20000000
# CONFIG_MMCSD_SDIO is not set
CONFIG_MTD=y
# CONFIG_MTD_PARTITION is not set
CONFIG_RAMMTD=y
CONFIG_RAMMTD_BLOCKSIZE=512
CONFIG_RAMMTD_ERASESIZE=4096
CONFIG_RAMMTD_ERASESTATE=0xff
# CONFIG_RAMMTD_FLASHSIM is not set
CONFIG_RAMMTD_SMART=y
# CONFIG_MTD_AT24XX is not set
# CONFIG_MTD_AT45DB is not set
CONFIG_MTD_MP25P=y
@ -413,8 +426,6 @@ CONFIG_MP25P_BYTEWRITE=y
CONFIG_MTD_SMART=y
CONFIG_MTD_SMART_SECTOR_SIZE=512
# CONFIG_MTD_RAMTRON is not set
CONFIG_RAMMTD=y
CONFIG_RAMMTD_SMART=y
# CONFIG_MTD_SST25 is not set
# CONFIG_MTD_SST39FV is not set
# CONFIG_MTD_W25 is not set
@ -430,6 +441,7 @@ CONFIG_SERIAL_REMOVABLE=y
CONFIG_ARCH_HAVE_USART2=y
CONFIG_MCU_SERIAL=y
CONFIG_STANDARD_SERIAL=y
# CONFIG_SERIAL_TIOCSERGSTRUCT is not set
# CONFIG_USART2_SERIAL_CONSOLE is not set
CONFIG_NO_SERIAL_CONSOLE=y
@ -451,6 +463,7 @@ CONFIG_USBDEV=y
# CONFIG_USBDEV_DUALSPEED is not set
CONFIG_USBDEV_SELFPOWERED=y
# CONFIG_USBDEV_BUSPOWERED is not set
CONFIG_USBDEV_MAXPOWER=100
# CONFIG_USBDEV_DMA is not set
# CONFIG_USBDEV_TRACE is not set
@ -513,11 +526,11 @@ CONFIG_FS_FAT=y
# CONFIG_FAT_DMAMEMORY is not set
# CONFIG_FS_NXFFS is not set
CONFIG_FS_ROMFS=y
# CONFIG_FS_BINFS is not set
CONFIG_FS_SMARTFS=y
CONFIG_SMARTFS_ERASEDSTATE=0xff
CONFIG_SMARTFS_MAXNAMLEN=16
CONFIG_SMARTFS_MULTI_ROOT_DIRS=y
# CONFIG_FS_BINFS is not set
#
# System Logging
@ -565,6 +578,7 @@ CONFIG_LIB_HOMEDIR="/"
# CONFIG_LIBM is not set
# CONFIG_NOPRINTF_FIELDWIDTH is not set
# CONFIG_LIBC_FLOATINGPOINT is not set
CONFIG_LIB_RAND_ORDER=1
# CONFIG_EOL_IS_CR is not set
# CONFIG_EOL_IS_LF is not set
# CONFIG_EOL_IS_BOTH_CRLF is not set
@ -628,8 +642,9 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
# CONFIG_EXAMPLES_IGMP is not set
# CONFIG_EXAMPLES_LCDRW is not set
# CONFIG_EXAMPLES_MM is not set
# CONFIG_EXAMPLES_MOUNT is not set
# CONFIG_EXAMPLES_MODBUS is not set
# CONFIG_EXAMPLES_MOUNT is not set
# CONFIG_EXAMPLES_MTDPART is not set
CONFIG_EXAMPLES_NSH=y
# CONFIG_EXAMPLES_NULL is not set
# CONFIG_EXAMPLES_NX is not set
@ -649,6 +664,8 @@ CONFIG_EXAMPLES_NSH=y
# CONFIG_EXAMPLES_ROMFS is not set
# CONFIG_EXAMPLES_SENDMAIL is not set
# CONFIG_EXAMPLES_SERLOOP is not set
CONFIG_EXAMPLES_FLASH_TEST=y
CONFIG_EXAMPLES_SMART_TEST=y
# CONFIG_EXAMPLES_TELNETD is not set
# CONFIG_EXAMPLES_THTTPD is not set
# CONFIG_EXAMPLES_TIFF is not set
@ -703,11 +720,6 @@ CONFIG_EXAMPLES_NSH=y
CONFIG_NSH_LIBRARY=y
CONFIG_NSH_BUILTIN_APPS=y
#
# Configure Command Options
#
CONFIG_NSH_CMDOPT_DF_H=y
#
# Disable Individual commands
#
@ -750,6 +762,11 @@ CONFIG_NSH_CMDOPT_DF_H=y
# CONFIG_NSH_DISABLE_USLEEP is not set
# CONFIG_NSH_DISABLE_WGET is not set
# CONFIG_NSH_DISABLE_XD is not set
#
# Configure Command Options
#
CONFIG_NSH_CMDOPT_DF_H=y
CONFIG_NSH_CODECS_BUFSIZE=128
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_STRERROR=y
@ -800,20 +817,10 @@ CONFIG_NSH_ARCHINIT=y
# CONFIG_SYSTEM_INSTALL is not set
#
# FLASH Eraseall Command
# FLASH Erase-all Command
#
CONFIG_SYSTEM_FLASH_ERASEALL=y
#
# FLASH Test Command
#
CONFIG_EXAMPLES_FLASH_TEST=y
#
# SMART Filesystem Test Command
#
CONFIG_EXAMPLES_SMART_TEST=y
#
# readline()
#

View File

@ -154,7 +154,7 @@ CONFIG_SDCLONE_DISABLE=y
# CONFIG_SCHED_STARTHOOK is not set
# CONFIG_SCHED_ATEXIT is not set
# CONFIG_SCHED_ONEXIT is not set
CONFIG_USER_ENTRYPOINT="mtdpart_main"
CONFIG_USER_ENTRYPOINT="nxffs_main"
CONFIG_DISABLE_OS_API=y
# CONFIG_DISABLE_CLOCK is not set
CONFIG_DISABLE_POSIX_TIMERS=y

View File

@ -2084,8 +2084,10 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd)
/* Set these to zero in case the device doesn't support them */
#ifdef CONFIG_MTD_SUBSECTOR_ERASE
dev->geo.subsectorsize= 0;
dev->geo.nsubsectors = 0;
#endif
ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&dev->geo));
if (ret < 0)
{

View File

@ -1,7 +1,7 @@
/****************************************************************************
* libc/stdio/lib_perror.c
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -40,6 +40,7 @@
#include <nuttx/config.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
/****************************************************************************

View File

@ -135,4 +135,4 @@ echo "" >>${OUTFILE}
echo "CONFIG_VERSION_STRING=\"${VERSION}\"" >>${OUTFILE}
echo "CONFIG_VERSION_MAJOR=${MAJOR}" >>${OUTFILE}
echo "CONFIG_VERSION_MINOR=${MINOR}" >>${OUTFILE}
echo "CONFIG_VERSION_BUILD=${BUILD}" >>${OUTFILE}
echo "CONFIG_VERSION_BUILD=\"${BUILD}\"" >>${OUTFILE}