From 3e52f2eb382999f5ac4983272a09005bb3d9ddde Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 5 Jan 2013 13:19:53 +0000 Subject: [PATCH] Correct some errors in the LPC17xx SYSCON register bit definitions (from Rommel Marcello) git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5479 42af7a65-404d-4744-a932-0658087f49c3 --- ChangeLog | 2 ++ Documentation/NuttX.html | 2 +- Documentation/NuttxPortingGuide.html | 2 +- README.txt | 2 +- TODO | 2 +- arch/arm/src/lpc17xx/lpc17_syscon.h | 16 ++++++++-------- tools/configure.c | 22 +++++++--------------- tools/configure.sh | 21 +++++++-------------- 8 files changed, 28 insertions(+), 41 deletions(-) diff --git a/ChangeLog b/ChangeLog index 710ffdceb7..cce0915872 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3871,3 +3871,5 @@ thin layer that execuates configure.exe if it is available. If configure.exe is not available, then configure.bat will attempt to build it first. + * arch/arm/src/lpc17xx/lpc17_syscon.h: Correct some typos in bit + definitions (from Rommel Marcelo). diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index dc454c0b61..876aa2a0ac 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -8,7 +8,7 @@

NuttX RTOS

-

Last Updated: December 28, 2012

+

Last Updated: January 4, 2012

diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index 559253d45b..24b4852e03 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -12,7 +12,7 @@

NuttX RTOS Porting Guide

-

Last Updated: December 18, 2012

+

Last Updated: January 4, 2012

diff --git a/README.txt b/README.txt index 717c129b08..0348f7f303 100644 --- a/README.txt +++ b/README.txt @@ -687,7 +687,7 @@ Native Windows Build Build Tools. The build still relies on some Unix-like commands. I use the GNUWin32 tools that can be downloaded from http://gnuwin32.sourceforge.net/. - Host Compiler: I use the MingGW compiler which can be downloaded from + Host Compiler: I use the MingGW GCC compiler which can be downloaded from http://www.mingw.org/. If you are using GNUWin32, then it is recommended the you not install the optional MSYS components as there may be conflicts. diff --git a/TODO b/TODO index 4a70e577fb..02100e97e2 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -NuttX TODO List (Last updated December 20, 2012) +NuttX TODO List (Last updated January 4, 2013) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This file summarizes known NuttX bugs, limitations, inconsistencies with diff --git a/arch/arm/src/lpc17xx/lpc17_syscon.h b/arch/arm/src/lpc17xx/lpc17_syscon.h index ce8654645d..3b9c325260 100644 --- a/arch/arm/src/lpc17xx/lpc17_syscon.h +++ b/arch/arm/src/lpc17xx/lpc17_syscon.h @@ -242,29 +242,29 @@ #define SYSCON_PLL0STAT_MSEL_SHIFT (0) /* Bit 0-14: PLL0 Multiplier value readback */ #define SYSCON_PLL0STAT_MSEL_MASK (0x7fff << SYSCON_PLL0STAT_MSEL_SHIFT) - /* Bit 15: Reserved */ + /* Bit 15: Reserved */ #define SYSCON_PLL0STAT_NSEL_SHIFT (16) /* Bit 16-23: PLL0 Pre-Divider value readback */ #define SYSCON_PLL0STAT_NSEL_MASK (0xff << SYSCON_PLL0STAT_NSEL_SHIFT) #define SYSCON_PLL0STAT_PLLE (1 << 24) /* Bit 24: PLL0 enable readback */ #define SYSCON_PLL0STAT_PLLC (1 << 25) /* Bit 25: PLL0 connect readback */ #define SYSCON_PLL0STAT_PLOCK (1 << 26) /* Bit 26: PLL0 lock status */ - /* Bits 27-31: Reserved */ + /* Bits 27-31: Reserved */ /* PLL1 Status register */ -#define SYSCON_PLL1STAT_MSEL_SHIFT (0) /* Bit 0-4: PLL01Multiplier value readback */ +#define SYSCON_PLL1STAT_MSEL_SHIFT (0) /* Bit 0-4: PLL1 Multiplier value readback */ #define SYSCON_PLL1STAT_MSEL_MASK (0x1f << SYSCON_PLL1STAT_MSEL_SHIFT) #define SYSCON_PLL1STAT_NSEL_SHIFT (5) /* Bit 5-6: PLL1 Pre-Divider value readback */ #define SYSCON_PLL1STAT_NSEL_MASK (3 << SYSCON_PLL1STAT_NSEL_SHIFT) /* Bit 7: Reserved */ -#define SYSCON_PLL1STAT_PLLE (1 << 24) /* Bit 8: PLL1 enable readback */ -#define SYSCON_PLL1STAT_PLLC (1 << 25) /* Bit 9: PLL1 connect readback */ -#define SYSCON_PLL1STAT_PLOCK (1 << 26) /* Bit 10: PLL1 lock status */ - /* Bits 11-31: Reserved */ +#define SYSCON_PLL1STAT_PLLE (1 << 8) /* Bit 8: PLL1 enable readback */ +#define SYSCON_PLL1STAT_PLLC (1 << 9) /* Bit 9: PLL1 connect readback */ +#define SYSCON_PLL1STAT_PLOCK (1 << 10) /* Bit 10: PLL1 lock status */ + /* Bits 11-31: Reserved */ /* PLL0/1 Feed register */ #define SYSCON_PLLFEED_SHIFT (0) /* Bit 0-7: PLL0/1 feed sequence */ #define SYSCON_PLLFEED_MASK (0xff << SYSCON_PLLFEED_SHIFT) - /* Bits 8-31: Reserved */ + /* Bits 8-31: Reserved */ /* Clocking and power control -- Clock dividers */ /* CPU Clock Configuration register */ diff --git a/tools/configure.c b/tools/configure.c index f189f5b98b..eb8268f19a 100644 --- a/tools/configure.c +++ b/tools/configure.c @@ -549,7 +549,7 @@ static void check_configuration(void) } } -static void copy_file(const char *srcpath, const char *destpath) +static void copy_file(const char *srcpath, const char *destpath, mode_t mode) { int nbytesread; int nbyteswritten; @@ -567,7 +567,7 @@ static void copy_file(const char *srcpath, const char *destpath) /* Now open the destination for writing*/ - wrfd = open(destpath, O_WRONLY|O_CREAT|O_TRUNC, 0666); + wrfd = open(destpath, O_WRONLY|O_CREAT|O_TRUNC, mode); if (wrfd < 0) { fprintf(stderr, "ERROR: Failed to open %s for writing: %s\n", destpath, strerror(errno)); @@ -638,13 +638,13 @@ static void configure(void) snprintf(g_buffer, BUFFER_SIZE, "%s%c.config", g_topdir, g_delim); destconfig = strdup(g_buffer); debug("configure: Copying from %s to %s\n", g_srcdefconfig, destconfig); - copy_file(g_srcdefconfig, destconfig); + copy_file(g_srcdefconfig, destconfig, 0644); /* Copy the Make.defs file as Make.defs */ snprintf(g_buffer, BUFFER_SIZE, "%s%cMake.defs", g_topdir, g_delim); debug("configure: Copying from %s to %s\n", g_srcmakedefs, g_buffer); - copy_file(g_srcmakedefs, g_buffer); + copy_file(g_srcmakedefs, g_buffer, 0644); /* Copy the setenv.sh file if have one and need one */ @@ -652,15 +652,7 @@ static void configure(void) { snprintf(g_buffer, BUFFER_SIZE, "%s%csetenv.sh", g_topdir, g_delim); debug("configure: Copying from %s to %s\n", g_srcsetenvsh, g_buffer); - copy_file(g_srcsetenvsh, g_buffer); - - /* Mark the file executable */ - - if (chmod(g_buffer, 0777) != 0) - { - fprintf(stderr, "ERROR: Failed to make setenv.sh executable: %s\n", strerror(errno)); - exit(EXIT_FAILURE); - } + copy_file(g_srcsetenvsh, g_buffer, 0755); } /* Copy the setenv.bat file if have one and need one */ @@ -669,7 +661,7 @@ static void configure(void) { snprintf(g_buffer, BUFFER_SIZE, "%s%csetenv.bat", g_topdir, g_delim); debug("configure: Copying from %s to %s\n", g_srcsetenvbat, g_buffer); - copy_file(g_srcsetenvbat, g_buffer); + copy_file(g_srcsetenvbat, g_buffer, 0644); } /* Copy the appconfig file to ../apps/.config if have one and need one */ @@ -678,7 +670,7 @@ static void configure(void) { snprintf(g_buffer, BUFFER_SIZE, "%s%c.config", g_apppath, g_delim); debug("configure: Copying from %s to %s\n", g_srcappconfig, g_buffer); - copy_file(g_srcappconfig, g_buffer); + copy_file(g_srcappconfig, g_buffer, 0644); } /* If we did not use the CONFIG_APPS_DIR that was in the defconfig config file, diff --git a/tools/configure.sh b/tools/configure.sh index ffa997178e..89f2e2fbc0 100755 --- a/tools/configure.sh +++ b/tools/configure.sh @@ -125,7 +125,6 @@ else fi src_config="${configpath}/defconfig" -tmp_config="${TOPDIR}/.configX" dest_config="${TOPDIR}/.config" if [ ! -r "${src_config}" ]; then @@ -201,7 +200,7 @@ if [ "X${have_setenv}" = "Xy" ]; then { echo "Failed to copy ${src_setenv}" ; exit 8 ; } chmod 755 "${dest_setenv}" fi -install "${src_config}" "${tmp_config}" || \ +install "${src_config}" "${dest_config}" || \ { echo "Failed to copy \"${src_config}\"" ; exit 9 ; } # If we did not use the CONFIG_APPS_DIR that was in the defconfig config file, @@ -209,14 +208,14 @@ install "${src_config}" "${tmp_config}" || \ # file if [ "X${defappdir}" = "Xy" ]; then - sed -i -e "/^CONFIG_APPS_DIR/d" "${tmp_config}" - echo "" >> "${tmp_config}" - echo "# Application configuration" >> "${tmp_config}" - echo "" >> "${tmp_config}" + sed -i -e "/^CONFIG_APPS_DIR/d" "${dest_config}" + echo "" >> "${dest_config}" + echo "# Application configuration" >> "${dest_config}" + echo "" >> "${dest_config}" if [ "X${winnative}" = "Xy" ]; then - echo "CONFIG_APPS_DIR=\"$winappdir\"" >> "${tmp_config}" + echo "CONFIG_APPS_DIR=\"$winappdir\"" >> "${dest_config}" else - echo "CONFIG_APPS_DIR=\"$posappdir\"" >> "${tmp_config}" + echo "CONFIG_APPS_DIR=\"$posappdir\"" >> "${dest_config}" fi fi @@ -232,9 +231,3 @@ if [ ! -z "${appdir}" -a "X${newconfig}" != "Xy" ]; then { echo "Failed to copy ${configpath}/appconfig" ; exit 10 ; } fi fi - -# install the final .configX only if it differs from any existing -# .config file. - -install "${tmp_config}" "${dest_config}" -rm -f "${tmp_config}"