mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
The content for uIP web server demo is no longer canned, but is not built dynameically (Thanks to Max Holtzberg)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5073 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -3234,4 +3234,10 @@
|
|||||||
exits (thanks Ronen Vainish). Also, improved some error reporting:
|
exits (thanks Ronen Vainish). Also, improved some error reporting:
|
||||||
the generic ERROR was being used instead of the specific errno
|
the generic ERROR was being used instead of the specific errno
|
||||||
value; the errno variable was not always set correctly.
|
value; the errno variable was not always set correctly.
|
||||||
|
* tools/mkfsdata.pl: The uIP web server CGI image making perl script was
|
||||||
|
moved from apps/netutils/webserver/makefsdata to nuttx/tools/mkfsdata.pl
|
||||||
|
(Part of a larger change submitted by Max Holtzberg).
|
||||||
|
* configs/stm3240g-eval/script/ld.script: All of the identical ld.script
|
||||||
|
files for the STM3240G-EVAL were replaced by one version in this directory.
|
||||||
|
* configs/stm3240g-eval/webserver: Configuration submitted by Max Holtzberg
|
||||||
|
for testing the changes to the uIP web server (see apps/ChangeLog.txt).
|
||||||
|
|||||||
@@ -370,7 +370,7 @@ There are two version of the FPU support built into the STM32 port.
|
|||||||
CONFIG_ARCH_FPU=y
|
CONFIG_ARCH_FPU=y
|
||||||
CONFIG_ARMV7M_CMNVECTOR=y
|
CONFIG_ARMV7M_CMNVECTOR=y
|
||||||
|
|
||||||
You will probably also changes to the ld.script in if this option is selected.
|
You will probably also changes to the scripts/ld.script in if this option is selected.
|
||||||
This should work:
|
This should work:
|
||||||
|
|
||||||
-ENTRY(_stext)
|
-ENTRY(_stext)
|
||||||
|
|||||||
@@ -105,14 +105,14 @@ ifeq ($(WINTOOL),y)
|
|||||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||||
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/dhcpd/$(LDSCRIPT)}"
|
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||||
MAXOPTIMIZATION = -O2
|
MAXOPTIMIZATION = -O2
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/dhcpd/$(LDSCRIPT)
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = $(CROSSDEV)gcc
|
CC = $(CROSSDEV)gcc
|
||||||
|
|||||||
@@ -105,14 +105,14 @@ ifeq ($(WINTOOL),y)
|
|||||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||||
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nettest/$(LDSCRIPT)}"
|
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||||
MAXOPTIMIZATION = -O2
|
MAXOPTIMIZATION = -O2
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nettest/$(LDSCRIPT)
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = $(CROSSDEV)gcc
|
CC = $(CROSSDEV)gcc
|
||||||
|
|||||||
@@ -1,122 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
* configs/stm3240g-eval/nettest/ld.script
|
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/* The STM32F103ZET6 has 1024Kb of FLASH beginning at address 0x0800:0000 and
|
|
||||||
* 192Kb of SRAM. SRAM is split up into three blocks:
|
|
||||||
*
|
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
|
||||||
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
|
||||||
*
|
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
|
||||||
* the 0x0800:0000 address
|
|
||||||
* range.
|
|
||||||
*/
|
|
||||||
|
|
||||||
MEMORY
|
|
||||||
{
|
|
||||||
flash (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
|
|
||||||
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 112K
|
|
||||||
}
|
|
||||||
|
|
||||||
OUTPUT_ARCH(arm)
|
|
||||||
ENTRY(_stext)
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
.text : {
|
|
||||||
_stext = ABSOLUTE(.);
|
|
||||||
*(.vectors)
|
|
||||||
*(.text .text.*)
|
|
||||||
*(.fixup)
|
|
||||||
*(.gnu.warning)
|
|
||||||
*(.rodata .rodata.*)
|
|
||||||
*(.gnu.linkonce.t.*)
|
|
||||||
*(.glue_7)
|
|
||||||
*(.glue_7t)
|
|
||||||
*(.got)
|
|
||||||
*(.gcc_except_table)
|
|
||||||
*(.gnu.linkonce.r.*)
|
|
||||||
_etext = ABSOLUTE(.);
|
|
||||||
} > flash
|
|
||||||
|
|
||||||
.init_section : {
|
|
||||||
_sinit = ABSOLUTE(.);
|
|
||||||
*(.init_array .init_array.*)
|
|
||||||
_einit = ABSOLUTE(.);
|
|
||||||
} > flash
|
|
||||||
|
|
||||||
__exidx_start = ABSOLUTE(.);
|
|
||||||
.ARM.exidx : {
|
|
||||||
*(.ARM.exidx*)
|
|
||||||
} > flash
|
|
||||||
__exidx_end = ABSOLUTE(.);
|
|
||||||
|
|
||||||
_eronly = ABSOLUTE(.);
|
|
||||||
|
|
||||||
.data : {
|
|
||||||
_sdata = ABSOLUTE(.);
|
|
||||||
*(.data .data.*)
|
|
||||||
*(.gnu.linkonce.d.*)
|
|
||||||
CONSTRUCTORS
|
|
||||||
_edata = ABSOLUTE(.);
|
|
||||||
} > sram AT > flash
|
|
||||||
|
|
||||||
.ARM.extab : {
|
|
||||||
*(.ARM.extab*)
|
|
||||||
} >sram
|
|
||||||
|
|
||||||
.bss : {
|
|
||||||
_sbss = ABSOLUTE(.);
|
|
||||||
*(.bss .bss.*)
|
|
||||||
*(.gnu.linkonce.b.*)
|
|
||||||
*(COMMON)
|
|
||||||
_ebss = ABSOLUTE(.);
|
|
||||||
} > sram
|
|
||||||
|
|
||||||
/* Stabs debugging sections. */
|
|
||||||
.stab 0 : { *(.stab) }
|
|
||||||
.stabstr 0 : { *(.stabstr) }
|
|
||||||
.stab.excl 0 : { *(.stab.excl) }
|
|
||||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
|
||||||
.stab.index 0 : { *(.stab.index) }
|
|
||||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
|
||||||
.comment 0 : { *(.comment) }
|
|
||||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
|
||||||
.debug_info 0 : { *(.debug_info) }
|
|
||||||
.debug_line 0 : { *(.debug_line) }
|
|
||||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
|
||||||
.debug_aranges 0 : { *(.debug_aranges) }
|
|
||||||
}
|
|
||||||
@@ -105,14 +105,14 @@ ifeq ($(WINTOOL),y)
|
|||||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||||
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/$(LDSCRIPT)}"
|
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||||
MAXOPTIMIZATION = -O2
|
MAXOPTIMIZATION = -O2
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/$(LDSCRIPT)
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = $(CROSSDEV)gcc
|
CC = $(CROSSDEV)gcc
|
||||||
|
|||||||
@@ -1,122 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
* configs/stm3240g-eval/nsh/ld.script
|
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/* The STM32F103ZET6 has 1024Kb of FLASH beginning at address 0x0800:0000 and
|
|
||||||
* 192Kb of SRAM. SRAM is split up into three blocks:
|
|
||||||
*
|
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
|
||||||
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
|
||||||
*
|
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
|
||||||
* the 0x0800:0000 address
|
|
||||||
* range.
|
|
||||||
*/
|
|
||||||
|
|
||||||
MEMORY
|
|
||||||
{
|
|
||||||
flash (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
|
|
||||||
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 112K
|
|
||||||
}
|
|
||||||
|
|
||||||
OUTPUT_ARCH(arm)
|
|
||||||
ENTRY(_stext)
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
.text : {
|
|
||||||
_stext = ABSOLUTE(.);
|
|
||||||
*(.vectors)
|
|
||||||
*(.text .text.*)
|
|
||||||
*(.fixup)
|
|
||||||
*(.gnu.warning)
|
|
||||||
*(.rodata .rodata.*)
|
|
||||||
*(.gnu.linkonce.t.*)
|
|
||||||
*(.glue_7)
|
|
||||||
*(.glue_7t)
|
|
||||||
*(.got)
|
|
||||||
*(.gcc_except_table)
|
|
||||||
*(.gnu.linkonce.r.*)
|
|
||||||
_etext = ABSOLUTE(.);
|
|
||||||
} > flash
|
|
||||||
|
|
||||||
.init_section : {
|
|
||||||
_sinit = ABSOLUTE(.);
|
|
||||||
*(.init_array .init_array.*)
|
|
||||||
_einit = ABSOLUTE(.);
|
|
||||||
} > flash
|
|
||||||
|
|
||||||
__exidx_start = ABSOLUTE(.);
|
|
||||||
.ARM.exidx : {
|
|
||||||
*(.ARM.exidx*)
|
|
||||||
} > flash
|
|
||||||
__exidx_end = ABSOLUTE(.);
|
|
||||||
|
|
||||||
_eronly = ABSOLUTE(.);
|
|
||||||
|
|
||||||
.data : {
|
|
||||||
_sdata = ABSOLUTE(.);
|
|
||||||
*(.data .data.*)
|
|
||||||
*(.gnu.linkonce.d.*)
|
|
||||||
CONSTRUCTORS
|
|
||||||
_edata = ABSOLUTE(.);
|
|
||||||
} > sram AT > flash
|
|
||||||
|
|
||||||
.ARM.extab : {
|
|
||||||
*(.ARM.extab*)
|
|
||||||
} >sram
|
|
||||||
|
|
||||||
.bss : {
|
|
||||||
_sbss = ABSOLUTE(.);
|
|
||||||
*(.bss .bss.*)
|
|
||||||
*(.gnu.linkonce.b.*)
|
|
||||||
*(COMMON)
|
|
||||||
_ebss = ABSOLUTE(.);
|
|
||||||
} > sram
|
|
||||||
|
|
||||||
/* Stabs debugging sections. */
|
|
||||||
.stab 0 : { *(.stab) }
|
|
||||||
.stabstr 0 : { *(.stabstr) }
|
|
||||||
.stab.excl 0 : { *(.stab.excl) }
|
|
||||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
|
||||||
.stab.index 0 : { *(.stab.index) }
|
|
||||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
|
||||||
.comment 0 : { *(.comment) }
|
|
||||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
|
||||||
.debug_info 0 : { *(.debug_info) }
|
|
||||||
.debug_line 0 : { *(.debug_line) }
|
|
||||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
|
||||||
.debug_aranges 0 : { *(.debug_aranges) }
|
|
||||||
}
|
|
||||||
@@ -105,14 +105,14 @@ ifeq ($(WINTOOL),y)
|
|||||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||||
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh2/$(LDSCRIPT)}"
|
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||||
MAXOPTIMIZATION = -O2
|
MAXOPTIMIZATION = -O2
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh2/$(LDSCRIPT)
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = $(CROSSDEV)gcc
|
CC = $(CROSSDEV)gcc
|
||||||
|
|||||||
@@ -1,122 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
* configs/stm3240g-eval/nsh2/ld.script
|
|
||||||
*
|
|
||||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/* The STM32F103ZET6 has 1024Kb of FLASH beginning at address 0x0800:0000 and
|
|
||||||
* 192Kb of SRAM. SRAM is split up into three blocks:
|
|
||||||
*
|
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
|
||||||
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
|
||||||
*
|
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
|
||||||
* the 0x0800:0000 address
|
|
||||||
* range.
|
|
||||||
*/
|
|
||||||
|
|
||||||
MEMORY
|
|
||||||
{
|
|
||||||
flash (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
|
|
||||||
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 112K
|
|
||||||
}
|
|
||||||
|
|
||||||
OUTPUT_ARCH(arm)
|
|
||||||
ENTRY(_stext)
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
.text : {
|
|
||||||
_stext = ABSOLUTE(.);
|
|
||||||
*(.vectors)
|
|
||||||
*(.text .text.*)
|
|
||||||
*(.fixup)
|
|
||||||
*(.gnu.warning)
|
|
||||||
*(.rodata .rodata.*)
|
|
||||||
*(.gnu.linkonce.t.*)
|
|
||||||
*(.glue_7)
|
|
||||||
*(.glue_7t)
|
|
||||||
*(.got)
|
|
||||||
*(.gcc_except_table)
|
|
||||||
*(.gnu.linkonce.r.*)
|
|
||||||
_etext = ABSOLUTE(.);
|
|
||||||
} > flash
|
|
||||||
|
|
||||||
.init_section : {
|
|
||||||
_sinit = ABSOLUTE(.);
|
|
||||||
*(.init_array .init_array.*)
|
|
||||||
_einit = ABSOLUTE(.);
|
|
||||||
} > flash
|
|
||||||
|
|
||||||
__exidx_start = ABSOLUTE(.);
|
|
||||||
.ARM.exidx : {
|
|
||||||
*(.ARM.exidx*)
|
|
||||||
} > flash
|
|
||||||
__exidx_end = ABSOLUTE(.);
|
|
||||||
|
|
||||||
_eronly = ABSOLUTE(.);
|
|
||||||
|
|
||||||
.data : {
|
|
||||||
_sdata = ABSOLUTE(.);
|
|
||||||
*(.data .data.*)
|
|
||||||
*(.gnu.linkonce.d.*)
|
|
||||||
CONSTRUCTORS
|
|
||||||
_edata = ABSOLUTE(.);
|
|
||||||
} > sram AT > flash
|
|
||||||
|
|
||||||
.ARM.extab : {
|
|
||||||
*(.ARM.extab*)
|
|
||||||
} >sram
|
|
||||||
|
|
||||||
.bss : {
|
|
||||||
_sbss = ABSOLUTE(.);
|
|
||||||
*(.bss .bss.*)
|
|
||||||
*(.gnu.linkonce.b.*)
|
|
||||||
*(COMMON)
|
|
||||||
_ebss = ABSOLUTE(.);
|
|
||||||
} > sram
|
|
||||||
|
|
||||||
/* Stabs debugging sections. */
|
|
||||||
.stab 0 : { *(.stab) }
|
|
||||||
.stabstr 0 : { *(.stabstr) }
|
|
||||||
.stab.excl 0 : { *(.stab.excl) }
|
|
||||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
|
||||||
.stab.index 0 : { *(.stab.index) }
|
|
||||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
|
||||||
.comment 0 : { *(.comment) }
|
|
||||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
|
||||||
.debug_info 0 : { *(.debug_info) }
|
|
||||||
.debug_line 0 : { *(.debug_line) }
|
|
||||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
|
||||||
.debug_aranges 0 : { *(.debug_aranges) }
|
|
||||||
}
|
|
||||||
@@ -105,14 +105,14 @@ ifeq ($(WINTOOL),y)
|
|||||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||||
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nxconsole/$(LDSCRIPT)}"
|
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||||
MAXOPTIMIZATION = -O2
|
MAXOPTIMIZATION = -O2
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nxconsole/$(LDSCRIPT)
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = $(CROSSDEV)gcc
|
CC = $(CROSSDEV)gcc
|
||||||
|
|||||||
@@ -1,122 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
* configs/stm3240g-eval/nxconsole/ld.script
|
|
||||||
*
|
|
||||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/* The STM32F103ZET6 has 1024Kb of FLASH beginning at address 0x0800:0000 and
|
|
||||||
* 192Kb of SRAM. SRAM is split up into three blocks:
|
|
||||||
*
|
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
|
||||||
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
|
||||||
*
|
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
|
||||||
* the 0x0800:0000 address
|
|
||||||
* range.
|
|
||||||
*/
|
|
||||||
|
|
||||||
MEMORY
|
|
||||||
{
|
|
||||||
flash (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
|
|
||||||
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 112K
|
|
||||||
}
|
|
||||||
|
|
||||||
OUTPUT_ARCH(arm)
|
|
||||||
ENTRY(_stext)
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
.text : {
|
|
||||||
_stext = ABSOLUTE(.);
|
|
||||||
*(.vectors)
|
|
||||||
*(.text .text.*)
|
|
||||||
*(.fixup)
|
|
||||||
*(.gnu.warning)
|
|
||||||
*(.rodata .rodata.*)
|
|
||||||
*(.gnu.linkonce.t.*)
|
|
||||||
*(.glue_7)
|
|
||||||
*(.glue_7t)
|
|
||||||
*(.got)
|
|
||||||
*(.gcc_except_table)
|
|
||||||
*(.gnu.linkonce.r.*)
|
|
||||||
_etext = ABSOLUTE(.);
|
|
||||||
} > flash
|
|
||||||
|
|
||||||
.init_section : {
|
|
||||||
_sinit = ABSOLUTE(.);
|
|
||||||
*(.init_array .init_array.*)
|
|
||||||
_einit = ABSOLUTE(.);
|
|
||||||
} > flash
|
|
||||||
|
|
||||||
__exidx_start = ABSOLUTE(.);
|
|
||||||
.ARM.exidx : {
|
|
||||||
*(.ARM.exidx*)
|
|
||||||
} > flash
|
|
||||||
__exidx_end = ABSOLUTE(.);
|
|
||||||
|
|
||||||
_eronly = ABSOLUTE(.);
|
|
||||||
|
|
||||||
.data : {
|
|
||||||
_sdata = ABSOLUTE(.);
|
|
||||||
*(.data .data.*)
|
|
||||||
*(.gnu.linkonce.d.*)
|
|
||||||
CONSTRUCTORS
|
|
||||||
_edata = ABSOLUTE(.);
|
|
||||||
} > sram AT > flash
|
|
||||||
|
|
||||||
.ARM.extab : {
|
|
||||||
*(.ARM.extab*)
|
|
||||||
} >sram
|
|
||||||
|
|
||||||
.bss : {
|
|
||||||
_sbss = ABSOLUTE(.);
|
|
||||||
*(.bss .bss.*)
|
|
||||||
*(.gnu.linkonce.b.*)
|
|
||||||
*(COMMON)
|
|
||||||
_ebss = ABSOLUTE(.);
|
|
||||||
} > sram
|
|
||||||
|
|
||||||
/* Stabs debugging sections. */
|
|
||||||
.stab 0 : { *(.stab) }
|
|
||||||
.stabstr 0 : { *(.stabstr) }
|
|
||||||
.stab.excl 0 : { *(.stab.excl) }
|
|
||||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
|
||||||
.stab.index 0 : { *(.stab.index) }
|
|
||||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
|
||||||
.comment 0 : { *(.comment) }
|
|
||||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
|
||||||
.debug_info 0 : { *(.debug_info) }
|
|
||||||
.debug_line 0 : { *(.debug_line) }
|
|
||||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
|
||||||
.debug_aranges 0 : { *(.debug_aranges) }
|
|
||||||
}
|
|
||||||
@@ -105,14 +105,14 @@ ifeq ($(WINTOOL),y)
|
|||||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||||
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nxwm/$(LDSCRIPT)}"
|
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||||
MAXOPTIMIZATION = -O2
|
MAXOPTIMIZATION = -O2
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nxwm/$(LDSCRIPT)
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = $(CROSSDEV)gcc
|
CC = $(CROSSDEV)gcc
|
||||||
|
|||||||
@@ -1,122 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
* configs/stm3240g-eval/nxwm/ld.script
|
|
||||||
*
|
|
||||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/* The STM32F103ZET6 has 1024Kb of FLASH beginning at address 0x0800:0000 and
|
|
||||||
* 192Kb of SRAM. SRAM is split up into three blocks:
|
|
||||||
*
|
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
|
||||||
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
|
||||||
*
|
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
|
||||||
* the 0x0800:0000 address
|
|
||||||
* range.
|
|
||||||
*/
|
|
||||||
|
|
||||||
MEMORY
|
|
||||||
{
|
|
||||||
flash (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
|
|
||||||
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 112K
|
|
||||||
}
|
|
||||||
|
|
||||||
OUTPUT_ARCH(arm)
|
|
||||||
ENTRY(_stext)
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
.text : {
|
|
||||||
_stext = ABSOLUTE(.);
|
|
||||||
*(.vectors)
|
|
||||||
*(.text .text.*)
|
|
||||||
*(.fixup)
|
|
||||||
*(.gnu.warning)
|
|
||||||
*(.rodata .rodata.*)
|
|
||||||
*(.gnu.linkonce.t.*)
|
|
||||||
*(.glue_7)
|
|
||||||
*(.glue_7t)
|
|
||||||
*(.got)
|
|
||||||
*(.gcc_except_table)
|
|
||||||
*(.gnu.linkonce.r.*)
|
|
||||||
_etext = ABSOLUTE(.);
|
|
||||||
} > flash
|
|
||||||
|
|
||||||
.init_section : {
|
|
||||||
_sinit = ABSOLUTE(.);
|
|
||||||
*(.init_array .init_array.*)
|
|
||||||
_einit = ABSOLUTE(.);
|
|
||||||
} > flash
|
|
||||||
|
|
||||||
__exidx_start = ABSOLUTE(.);
|
|
||||||
.ARM.exidx : {
|
|
||||||
*(.ARM.exidx*)
|
|
||||||
} > flash
|
|
||||||
__exidx_end = ABSOLUTE(.);
|
|
||||||
|
|
||||||
_eronly = ABSOLUTE(.);
|
|
||||||
|
|
||||||
.data : {
|
|
||||||
_sdata = ABSOLUTE(.);
|
|
||||||
*(.data .data.*)
|
|
||||||
*(.gnu.linkonce.d.*)
|
|
||||||
CONSTRUCTORS
|
|
||||||
_edata = ABSOLUTE(.);
|
|
||||||
} > sram AT > flash
|
|
||||||
|
|
||||||
.ARM.extab : {
|
|
||||||
*(.ARM.extab*)
|
|
||||||
} >sram
|
|
||||||
|
|
||||||
.bss : {
|
|
||||||
_sbss = ABSOLUTE(.);
|
|
||||||
*(.bss .bss.*)
|
|
||||||
*(.gnu.linkonce.b.*)
|
|
||||||
*(COMMON)
|
|
||||||
_ebss = ABSOLUTE(.);
|
|
||||||
} > sram
|
|
||||||
|
|
||||||
/* Stabs debugging sections. */
|
|
||||||
.stab 0 : { *(.stab) }
|
|
||||||
.stabstr 0 : { *(.stabstr) }
|
|
||||||
.stab.excl 0 : { *(.stab.excl) }
|
|
||||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
|
||||||
.stab.index 0 : { *(.stab.index) }
|
|
||||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
|
||||||
.comment 0 : { *(.comment) }
|
|
||||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
|
||||||
.debug_info 0 : { *(.debug_info) }
|
|
||||||
.debug_line 0 : { *(.debug_line) }
|
|
||||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
|
||||||
.debug_aranges 0 : { *(.debug_aranges) }
|
|
||||||
}
|
|
||||||
@@ -105,14 +105,14 @@ ifeq ($(WINTOOL),y)
|
|||||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||||
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/$(LDSCRIPT)}"
|
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||||
MAXOPTIMIZATION = -O2
|
MAXOPTIMIZATION = -O2
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/$(LDSCRIPT)
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = $(CROSSDEV)gcc
|
CC = $(CROSSDEV)gcc
|
||||||
|
|||||||
@@ -1,122 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
* configs/stm3240g-eval/ostest/ld.script
|
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/* The STM32F103ZET6 has 1024Kb of FLASH beginning at address 0x0800:0000 and
|
|
||||||
* 192Kb of SRAM. SRAM is split up into three blocks:
|
|
||||||
*
|
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
|
||||||
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
|
||||||
*
|
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
|
||||||
* the 0x0800:0000 address
|
|
||||||
* range.
|
|
||||||
*/
|
|
||||||
|
|
||||||
MEMORY
|
|
||||||
{
|
|
||||||
flash (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
|
|
||||||
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 112K
|
|
||||||
}
|
|
||||||
|
|
||||||
OUTPUT_ARCH(arm)
|
|
||||||
ENTRY(_stext)
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
.text : {
|
|
||||||
_stext = ABSOLUTE(.);
|
|
||||||
*(.vectors)
|
|
||||||
*(.text .text.*)
|
|
||||||
*(.fixup)
|
|
||||||
*(.gnu.warning)
|
|
||||||
*(.rodata .rodata.*)
|
|
||||||
*(.gnu.linkonce.t.*)
|
|
||||||
*(.glue_7)
|
|
||||||
*(.glue_7t)
|
|
||||||
*(.got)
|
|
||||||
*(.gcc_except_table)
|
|
||||||
*(.gnu.linkonce.r.*)
|
|
||||||
_etext = ABSOLUTE(.);
|
|
||||||
} > flash
|
|
||||||
|
|
||||||
.init_section : {
|
|
||||||
_sinit = ABSOLUTE(.);
|
|
||||||
*(.init_array .init_array.*)
|
|
||||||
_einit = ABSOLUTE(.);
|
|
||||||
} > flash
|
|
||||||
|
|
||||||
__exidx_start = ABSOLUTE(.);
|
|
||||||
.ARM.exidx : {
|
|
||||||
*(.ARM.exidx*)
|
|
||||||
} > flash
|
|
||||||
__exidx_end = ABSOLUTE(.);
|
|
||||||
|
|
||||||
_eronly = ABSOLUTE(.);
|
|
||||||
|
|
||||||
.data : {
|
|
||||||
_sdata = ABSOLUTE(.);
|
|
||||||
*(.data .data.*)
|
|
||||||
*(.gnu.linkonce.d.*)
|
|
||||||
CONSTRUCTORS
|
|
||||||
_edata = ABSOLUTE(.);
|
|
||||||
} > sram AT > flash
|
|
||||||
|
|
||||||
.ARM.extab : {
|
|
||||||
*(.ARM.extab*)
|
|
||||||
} >sram
|
|
||||||
|
|
||||||
.bss : {
|
|
||||||
_sbss = ABSOLUTE(.);
|
|
||||||
*(.bss .bss.*)
|
|
||||||
*(.gnu.linkonce.b.*)
|
|
||||||
*(COMMON)
|
|
||||||
_ebss = ABSOLUTE(.);
|
|
||||||
} > sram
|
|
||||||
|
|
||||||
/* Stabs debugging sections. */
|
|
||||||
.stab 0 : { *(.stab) }
|
|
||||||
.stabstr 0 : { *(.stabstr) }
|
|
||||||
.stab.excl 0 : { *(.stab.excl) }
|
|
||||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
|
||||||
.stab.index 0 : { *(.stab.index) }
|
|
||||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
|
||||||
.comment 0 : { *(.comment) }
|
|
||||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
|
||||||
.debug_info 0 : { *(.debug_info) }
|
|
||||||
.debug_line 0 : { *(.debug_line) }
|
|
||||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
|
||||||
.debug_aranges 0 : { *(.debug_aranges) }
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* configs/stm3240g-eval/dhcpd/ld.script
|
* configs/stm3240g-eval/scripts/ld.script
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -105,14 +105,14 @@ ifeq ($(WINTOOL),y)
|
|||||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||||
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/telnetd/$(LDSCRIPT)}"
|
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||||
MAXOPTIMIZATION = -O2
|
MAXOPTIMIZATION = -O2
|
||||||
else
|
else
|
||||||
# Linux/Cygwin-native toolchain
|
# Linux/Cygwin-native toolchain
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/telnetd/$(LDSCRIPT)
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = $(CROSSDEV)gcc
|
CC = $(CROSSDEV)gcc
|
||||||
|
|||||||
@@ -1,122 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
* configs/stm3240g-eval/telnetd/ld.script
|
|
||||||
*
|
|
||||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/* The STM32F103ZET6 has 1024Kb of FLASH beginning at address 0x0800:0000 and
|
|
||||||
* 192Kb of SRAM. SRAM is split up into three blocks:
|
|
||||||
*
|
|
||||||
* 1) 112Kb of SRAM beginning at address 0x2000:0000
|
|
||||||
* 2) 16Kb of SRAM beginning at address 0x2001:c000
|
|
||||||
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
|
|
||||||
*
|
|
||||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
|
||||||
* where the code expects to begin execution by jumping to the entry point in
|
|
||||||
* the 0x0800:0000 address
|
|
||||||
* range.
|
|
||||||
*/
|
|
||||||
|
|
||||||
MEMORY
|
|
||||||
{
|
|
||||||
flash (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
|
|
||||||
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 112K
|
|
||||||
}
|
|
||||||
|
|
||||||
OUTPUT_ARCH(arm)
|
|
||||||
ENTRY(_stext)
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
.text : {
|
|
||||||
_stext = ABSOLUTE(.);
|
|
||||||
*(.vectors)
|
|
||||||
*(.text .text.*)
|
|
||||||
*(.fixup)
|
|
||||||
*(.gnu.warning)
|
|
||||||
*(.rodata .rodata.*)
|
|
||||||
*(.gnu.linkonce.t.*)
|
|
||||||
*(.glue_7)
|
|
||||||
*(.glue_7t)
|
|
||||||
*(.got)
|
|
||||||
*(.gcc_except_table)
|
|
||||||
*(.gnu.linkonce.r.*)
|
|
||||||
_etext = ABSOLUTE(.);
|
|
||||||
} > flash
|
|
||||||
|
|
||||||
.init_section : {
|
|
||||||
_sinit = ABSOLUTE(.);
|
|
||||||
*(.init_array .init_array.*)
|
|
||||||
_einit = ABSOLUTE(.);
|
|
||||||
} > flash
|
|
||||||
|
|
||||||
__exidx_start = ABSOLUTE(.);
|
|
||||||
.ARM.exidx : {
|
|
||||||
*(.ARM.exidx*)
|
|
||||||
} > flash
|
|
||||||
__exidx_end = ABSOLUTE(.);
|
|
||||||
|
|
||||||
_eronly = ABSOLUTE(.);
|
|
||||||
|
|
||||||
.data : {
|
|
||||||
_sdata = ABSOLUTE(.);
|
|
||||||
*(.data .data.*)
|
|
||||||
*(.gnu.linkonce.d.*)
|
|
||||||
CONSTRUCTORS
|
|
||||||
_edata = ABSOLUTE(.);
|
|
||||||
} > sram AT > flash
|
|
||||||
|
|
||||||
.ARM.extab : {
|
|
||||||
*(.ARM.extab*)
|
|
||||||
} >sram
|
|
||||||
|
|
||||||
.bss : {
|
|
||||||
_sbss = ABSOLUTE(.);
|
|
||||||
*(.bss .bss.*)
|
|
||||||
*(.gnu.linkonce.b.*)
|
|
||||||
*(COMMON)
|
|
||||||
_ebss = ABSOLUTE(.);
|
|
||||||
} > sram
|
|
||||||
|
|
||||||
/* Stabs debugging sections. */
|
|
||||||
.stab 0 : { *(.stab) }
|
|
||||||
.stabstr 0 : { *(.stabstr) }
|
|
||||||
.stab.excl 0 : { *(.stab.excl) }
|
|
||||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
|
||||||
.stab.index 0 : { *(.stab.index) }
|
|
||||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
|
||||||
.comment 0 : { *(.comment) }
|
|
||||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
|
||||||
.debug_info 0 : { *(.debug_info) }
|
|
||||||
.debug_line 0 : { *(.debug_line) }
|
|
||||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
|
||||||
.debug_aranges 0 : { *(.debug_aranges) }
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,197 @@
|
|||||||
|
############################################################################
|
||||||
|
# configs/stm3240g-eval/webserver/Make.defs
|
||||||
|
#
|
||||||
|
# Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||||
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in
|
||||||
|
# the documentation and/or other materials provided with the
|
||||||
|
# distribution.
|
||||||
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
# used to endorse or promote products derived from this software
|
||||||
|
# without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
include ${TOPDIR}/.config
|
||||||
|
|
||||||
|
# Setup for the selected toolchain
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_STM32_CODESOURCERYW),y)
|
||||||
|
# CodeSourcery under Windows
|
||||||
|
CROSSDEV = arm-none-eabi-
|
||||||
|
ARCROSSDEV = arm-none-eabi-
|
||||||
|
WINTOOL = y
|
||||||
|
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||||
|
endif
|
||||||
|
ifeq ($(CONFIG_STM32_CODESOURCERYL),y)
|
||||||
|
# CodeSourcery under Linux
|
||||||
|
CROSSDEV = arm-none-eabi-
|
||||||
|
ARCROSSDEV = arm-none-eabi-
|
||||||
|
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||||
|
MAXOPTIMIZATION = -O2
|
||||||
|
endif
|
||||||
|
ifeq ($(CONFIG_STM32_ATOLLIC_LITE),y)
|
||||||
|
# Atollic toolchain under Windows
|
||||||
|
CROSSDEV = arm-atollic-eabi-
|
||||||
|
ARCROSSDEV =
|
||||||
|
WINTOOL = y
|
||||||
|
ifeq ($(CONFIG_ARCH_FPU),y)
|
||||||
|
ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard
|
||||||
|
else
|
||||||
|
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifeq ($(CONFIG_STM32_ATOLLIC_PRO),y)
|
||||||
|
# Atollic toolchain under Windows
|
||||||
|
CROSSDEV = arm-atollic-eabi-
|
||||||
|
ARCROSSDEV = arm-atollic-eabi-
|
||||||
|
WINTOOL = y
|
||||||
|
ifeq ($(CONFIG_ARCH_FPU),y)
|
||||||
|
ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard
|
||||||
|
else
|
||||||
|
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifeq ($(CONFIG_STM32_DEVKITARM),y)
|
||||||
|
# devkitARM under Windows
|
||||||
|
CROSSDEV = arm-eabi-
|
||||||
|
ARCROSSDEV = arm-eabi-
|
||||||
|
WINTOOL = y
|
||||||
|
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||||
|
endif
|
||||||
|
ifeq ($(CONFIG_STM32_RAISONANCE),y)
|
||||||
|
# Raisonance RIDE7 under Windows
|
||||||
|
CROSSDEV = arm-none-eabi-
|
||||||
|
ARCROSSDEV = arm-none-eabi-
|
||||||
|
WINTOOL = y
|
||||||
|
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||||
|
endif
|
||||||
|
ifeq ($(CONFIG_STM32_BUILDROOT),y)
|
||||||
|
# NuttX buildroot under Linux or Cygwin
|
||||||
|
CROSSDEV = arm-elf-
|
||||||
|
ARCROSSDEV = arm-elf-
|
||||||
|
ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
||||||
|
MAXOPTIMIZATION = -Os
|
||||||
|
endif
|
||||||
|
|
||||||
|
LDSCRIPT = ld.script
|
||||||
|
|
||||||
|
ifeq ($(WINTOOL),y)
|
||||||
|
# Windows-native toolchains
|
||||||
|
DIRLINK = $(TOPDIR)/tools/winlink.sh
|
||||||
|
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||||
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
|
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||||
|
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||||
|
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||||
|
MAXOPTIMIZATION = -O2
|
||||||
|
else
|
||||||
|
# Linux/Cygwin-native toolchain
|
||||||
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
|
endif
|
||||||
|
|
||||||
|
CC = $(CROSSDEV)gcc
|
||||||
|
CXX = $(CROSSDEV)g++
|
||||||
|
CPP = $(CROSSDEV)gcc -E
|
||||||
|
LD = $(CROSSDEV)ld
|
||||||
|
AR = $(ARCROSSDEV)ar rcs
|
||||||
|
NM = $(ARCROSSDEV)nm
|
||||||
|
OBJCOPY = $(CROSSDEV)objcopy
|
||||||
|
OBJDUMP = $(CROSSDEV)objdump
|
||||||
|
|
||||||
|
ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'}
|
||||||
|
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
|
||||||
|
|
||||||
|
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
||||||
|
ARCHOPTIMIZATION = -g
|
||||||
|
else
|
||||||
|
ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
||||||
|
endif
|
||||||
|
|
||||||
|
ARCHCFLAGS = -fno-builtin
|
||||||
|
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti
|
||||||
|
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
||||||
|
ARCHWARNINGSXX = -Wall -Wshadow
|
||||||
|
ARCHDEFINES =
|
||||||
|
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||||
|
|
||||||
|
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||||
|
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||||
|
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||||
|
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||||
|
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||||
|
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||||
|
|
||||||
|
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||||
|
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld -no-check-sections
|
||||||
|
LDNXFLATFLAGS = -e main -s 2048
|
||||||
|
|
||||||
|
OBJEXT = .o
|
||||||
|
LIBEXT = .a
|
||||||
|
EXEEXT =
|
||||||
|
|
||||||
|
ifneq ($(CROSSDEV),arm-elf-)
|
||||||
|
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||||
|
endif
|
||||||
|
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||||
|
LDFLAGS += -g
|
||||||
|
endif
|
||||||
|
|
||||||
|
define PREPROCESS
|
||||||
|
@echo "CPP: $1->$2"
|
||||||
|
@$(CPP) $(CPPFLAGS) $1 -o $2
|
||||||
|
endef
|
||||||
|
|
||||||
|
define COMPILE
|
||||||
|
@echo "CC: $1"
|
||||||
|
@$(CC) -c $(CFLAGS) $1 -o $2
|
||||||
|
endef
|
||||||
|
|
||||||
|
define COMPILEXX
|
||||||
|
@echo "CXX: $1"
|
||||||
|
@$(CXX) -c $(CXXFLAGS) $1 -o $2
|
||||||
|
endef
|
||||||
|
|
||||||
|
define ASSEMBLE
|
||||||
|
@echo "AS: $1"
|
||||||
|
@$(CC) -c $(AFLAGS) $1 -o $2
|
||||||
|
endef
|
||||||
|
|
||||||
|
define ARCHIVE
|
||||||
|
echo "AR: $2"; \
|
||||||
|
$(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; }
|
||||||
|
endef
|
||||||
|
|
||||||
|
define CLEAN
|
||||||
|
@rm -f *.o *.a
|
||||||
|
endef
|
||||||
|
|
||||||
|
HOSTCC = gcc
|
||||||
|
HOSTINCLUDES = -I.
|
||||||
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||||
|
HOSTLDFLAGS =
|
||||||
|
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
############################################################################
|
||||||
|
# configs/stm3240g-eval/webserver/appconfig
|
||||||
|
#
|
||||||
|
# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in
|
||||||
|
# the documentation and/or other materials provided with the
|
||||||
|
# distribution.
|
||||||
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
# used to endorse or promote products derived from this software
|
||||||
|
# without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
CONFIGURED_APPS += examples/uip
|
||||||
|
CONFIGURED_APPS += netutils/uiplib
|
||||||
|
CONFIGURED_APPS += netutils/webserver
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,75 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# configs/stm3240g-eval/webserver/setenv.sh
|
||||||
|
#
|
||||||
|
# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in
|
||||||
|
# the documentation and/or other materials provided with the
|
||||||
|
# distribution.
|
||||||
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
# used to endorse or promote products derived from this software
|
||||||
|
# without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
if [ "$_" = "$0" ] ; then
|
||||||
|
echo "You must source this script, not run it!" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
WD=`pwd`
|
||||||
|
if [ ! -x "setenv.sh" ]; then
|
||||||
|
echo "This script must be executed from the top-level NuttX build directory"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${PATH_ORIG}" ]; then
|
||||||
|
export PATH_ORIG="${PATH}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This the Cygwin path to the location where I installed the RIDE
|
||||||
|
# toolchain under windows. You will also have to edit this if you install
|
||||||
|
# the RIDE toolchain in any other location
|
||||||
|
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin"
|
||||||
|
|
||||||
|
# This the Cygwin path to the location where I installed the CodeSourcery
|
||||||
|
# toolchain under windows. You will also have to edit this if you install
|
||||||
|
# the CodeSourcery toolchain in any other location
|
||||||
|
export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
|
||||||
|
|
||||||
|
# These are the Cygwin paths to the locations where I installed the Atollic
|
||||||
|
# toolchain under windows. You will also have to edit this if you install
|
||||||
|
# the Atollic toolchain in any other location. /usr/bin is added before
|
||||||
|
# the Atollic bin path because there is are binaries named gcc.exe and g++.exe
|
||||||
|
# at those locations as well.
|
||||||
|
#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin"
|
||||||
|
#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/bin"
|
||||||
|
|
||||||
|
# This the Cygwin path to the location where I build the buildroot
|
||||||
|
# toolchain.
|
||||||
|
#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
|
||||||
|
|
||||||
|
# Add the path to the toolchain to the PATH varialble
|
||||||
|
export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
|
||||||
|
|
||||||
|
echo "PATH : ${PATH}"
|
||||||
@@ -109,7 +109,6 @@ ssize_t lib_fflush(FAR FILE *stream, bool bforce)
|
|||||||
FAR const unsigned char *src;
|
FAR const unsigned char *src;
|
||||||
ssize_t bytes_written;
|
ssize_t bytes_written;
|
||||||
ssize_t nbuffer;
|
ssize_t nbuffer;
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* Return EBADF if the file is not opened for writing */
|
/* Return EBADF if the file is not opened for writing */
|
||||||
|
|
||||||
|
|||||||
@@ -89,8 +89,6 @@
|
|||||||
int lib_wrflush(FAR FILE *stream)
|
int lib_wrflush(FAR FILE *stream)
|
||||||
{
|
{
|
||||||
#if CONFIG_STDIO_BUFFER_SIZE > 0
|
#if CONFIG_STDIO_BUFFER_SIZE > 0
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* Verify that we were passed a valid (i.e., non-NULL) stream */
|
/* Verify that we were passed a valid (i.e., non-NULL) stream */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
|
|||||||
Executable
+115
@@ -0,0 +1,115 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
# tools/mkfsdata.pl
|
||||||
|
#
|
||||||
|
# Extracted from uIP which has a license that is compatible with NuttX.
|
||||||
|
# There is no authorship, copyright, or licensing information in the
|
||||||
|
# original file. Possibly written by Adam Dunkels.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in
|
||||||
|
# the documentation and/or other materials provided with the
|
||||||
|
# distribution.
|
||||||
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
# used to endorse or promote products derived from this software
|
||||||
|
# without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
open(OUTPUT, "> httpd_fsdata.c");
|
||||||
|
|
||||||
|
chdir("httpd-fs");
|
||||||
|
|
||||||
|
opendir(DIR, ".");
|
||||||
|
@files = grep { !/^\./ && !/(CVS|~)/ } readdir(DIR);
|
||||||
|
closedir(DIR);
|
||||||
|
|
||||||
|
print(OUTPUT "#include <apps/netutils/httpd.h>\n\n");
|
||||||
|
print(OUTPUT "#ifndef NULL\n#define NULL 0\n#endif\n\n");
|
||||||
|
|
||||||
|
foreach $file (@files) {
|
||||||
|
|
||||||
|
if(-d $file && $file !~ /^\./) {
|
||||||
|
print "Processing directory $file\n";
|
||||||
|
opendir(DIR, $file);
|
||||||
|
@newfiles = grep { !/^\./ && !/(CVS|~)/ } readdir(DIR);
|
||||||
|
closedir(DIR);
|
||||||
|
printf "Adding files @newfiles\n";
|
||||||
|
@files = (@files, map { $_ = "$file/$_" } @newfiles);
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach $file (@files) {
|
||||||
|
if(-f $file) {
|
||||||
|
|
||||||
|
print "Adding file $file\n";
|
||||||
|
|
||||||
|
open(FILE, $file) || die "Could not open file $file\n";
|
||||||
|
|
||||||
|
$file =~ s-^-/-;
|
||||||
|
$fvar = $file;
|
||||||
|
$fvar =~ s-/-_-g;
|
||||||
|
$fvar =~ s-\.-_-g;
|
||||||
|
# for AVR, add PROGMEM here
|
||||||
|
print(OUTPUT "static const unsigned char data".$fvar."[] =\n");
|
||||||
|
print(OUTPUT "{\n /* $file */\n\n ");
|
||||||
|
for($j = 0; $j < length($file); $j++) {
|
||||||
|
printf(OUTPUT "%#02x, ", unpack("C", substr($file, $j, 1)));
|
||||||
|
}
|
||||||
|
printf(OUTPUT "0x00,\n ");
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
while(read(FILE, $data, 1)) {
|
||||||
|
printf(OUTPUT "%#02x, ", unpack("C", $data));
|
||||||
|
$i++;
|
||||||
|
if($i == 10) {
|
||||||
|
print(OUTPUT "\n");
|
||||||
|
$i = 0;
|
||||||
|
print(OUTPUT " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print(OUTPUT "0x00\n};\n\n");
|
||||||
|
close(FILE);
|
||||||
|
push(@fvars, $fvar);
|
||||||
|
push(@pfiles, $file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for($i = 0; $i < @fvars; $i++) {
|
||||||
|
$file = $pfiles[$i];
|
||||||
|
$fvar = $fvars[$i];
|
||||||
|
|
||||||
|
if($i == 0) {
|
||||||
|
$prevfile = "NULL";
|
||||||
|
} else {
|
||||||
|
$prevfile = "file" . $fvars[$i - 1];
|
||||||
|
}
|
||||||
|
if($i == @fvars-1) {
|
||||||
|
print(OUTPUT "const struct httpd_fsdata_file g_httpdfs_root[] =\n {{$prevfile, data$fvar, ");
|
||||||
|
} else {
|
||||||
|
print(OUTPUT "const struct httpd_fsdata_file file".$fvar."[] =\n {{$prevfile, data$fvar, ");
|
||||||
|
}
|
||||||
|
print(OUTPUT "data$fvar + ". (length($file) + 1) .", ");
|
||||||
|
print(OUTPUT "sizeof(data$fvar) - ". (length($file) + 1) ."}};\n\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
# print(OUTPUT "#define HTTPD_FS_ROOT file$fvars[$i - 1]\n\n");
|
||||||
|
print(OUTPUT "const int g_httpd_numfiles = $i;\n");
|
||||||
Reference in New Issue
Block a user