mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Converted all configurations to use the kconfig-frontends tools, cleaned up the directory structure and naming to match some of the more recent configurations, and added a segment LCD driver for the board. The initial checkin of the LCD driver is just a clone of configs/pcblogic-pic32mx/src/pic32mx_lcd1602 and it not yet expected to be functional.
This commit is contained in:
@@ -599,8 +599,7 @@ Configuration sub-directories
|
||||
|
||||
2. By default, this configuration uses an older Microchip C32 toolchain
|
||||
for Windows (the newer ones seem to be incompatible) and builds under
|
||||
Cygwin (or probably MSYS). That
|
||||
can easily be reconfigured, of course.
|
||||
Cygwin (or probably MSYS). That can easily be reconfigured, of course.
|
||||
|
||||
Build Setup:
|
||||
CONFIG_HOST_WINDOWS=y : Builds under Windows
|
||||
@@ -634,8 +633,7 @@ Configuration sub-directories
|
||||
|
||||
3. By default, this configuration uses an older Microchip C32 toolchain
|
||||
for Windows (the newer ones seem to be incompatible) and builds under
|
||||
Cygwin (or probably MSYS). That
|
||||
can easily be reconfigured, of course.
|
||||
Cygwin (or probably MSYS). That can easily be reconfigured, of course.
|
||||
|
||||
Build Setup:
|
||||
CONFIG_HOST_WINDOWS=y : Builds under Windows
|
||||
|
||||
@@ -4,4 +4,37 @@
|
||||
#
|
||||
|
||||
if ARCH_BOARD_SUREPIC32MX
|
||||
|
||||
choice
|
||||
prompt "Select Sure PIC32MX Board"
|
||||
default ARCH_DBDP11215
|
||||
|
||||
config ARCH_DBDP11215
|
||||
bool "DB_DP11215 PIC32 Storage Demo Board"
|
||||
---help---
|
||||
DB_DP11215 PIC32 Storage Demo Board
|
||||
|
||||
- PIC32MX44F512H
|
||||
- SD card slot
|
||||
- RS-2323 Interface
|
||||
- USB (MINI-B)
|
||||
- 2x16 LCD display
|
||||
- Three tactile switches
|
||||
- Four user LEDs
|
||||
|
||||
config ARCH_DBDP11212
|
||||
bool "DB-DP11212 PIC32 General Purpose Demo Board"
|
||||
---help---
|
||||
DB-DP11212 PIC32 General Purpose Demo Board
|
||||
|
||||
- PIC32MX44F512H
|
||||
- LM75A temperature sensor and temperature resistor (NTC-SMD thermistor)
|
||||
- SPI FLASH: AT25DF041A
|
||||
- USB (MINI-B)
|
||||
- 2x16 LCD display
|
||||
- 4 digit, 8 segment LED display
|
||||
- Three tactile switches
|
||||
- Four user LEDs
|
||||
|
||||
endchoice
|
||||
endif
|
||||
|
||||
+198
-57
@@ -36,6 +36,7 @@ Contents
|
||||
PIC32MX440F512H Pin Out
|
||||
Toolchains
|
||||
Loading NuttX with PICkit2
|
||||
LCD1602
|
||||
PIC32MX Configuration Options
|
||||
Configurations
|
||||
|
||||
@@ -391,6 +392,37 @@ Loading NuttX with PICkit2
|
||||
# to the top-level build directory. It is the only
|
||||
# required input to mkpichex.
|
||||
|
||||
LCD1602
|
||||
=======
|
||||
|
||||
The on-board LCD is a 2x16 segment LCD and appears to be compatible with
|
||||
the LCD1602 and is like an LCD1602 LCD here.
|
||||
|
||||
LCD pin mapping (see configs/pcblogic-pic32mx/README.txt)
|
||||
|
||||
--------------------- ---------- ----------------------------------
|
||||
PIC32 Sure JP1 Sure Signal Description
|
||||
PIN SIGNAL NAME PIN NAME(s)
|
||||
--------------------- ---------- ----------------------------------
|
||||
34 Vbus 1. +5V +5V VBUS device mode
|
||||
To GND via capacitor
|
||||
2. GND GND
|
||||
49 RD1 3. Vo Transistor circuit driven by PWM2
|
||||
44 PMA0/AN15/RB15 4. RS PMA0, Selects registers
|
||||
53 PMRD/RD5 5. RW PMRD/PMWR, Selects read or write
|
||||
45 PMPCS1/RD11 6. E Starts data read/write
|
||||
60 PMD0/RE0 7. DB0 PMD0
|
||||
61 PMD1/RE1 8. DB1 PMD1
|
||||
62 PMD2/RE2 9. DB2 PMD2
|
||||
63 PMD3/RE3 10. DB3 PMD3
|
||||
64 PMD4/RE4 11. DB4 PMD4
|
||||
1 PMD5/RE5 12. DB5 PMD5
|
||||
2 PMD6/RE6 13. DB6 PMD6
|
||||
3 PMD7/RE7 14. DB7 PMD7
|
||||
15. A +5V_DUSB
|
||||
46 INT0/RD0 16. K Transistor circuit driven by PWM1
|
||||
--------------------- ---------- ----------------------------------
|
||||
|
||||
PIC32MX Configuration Options
|
||||
=============================
|
||||
|
||||
@@ -596,14 +628,28 @@ PIC32MX Configuration Options
|
||||
Configurations
|
||||
==============
|
||||
|
||||
Each PIC32MX configuration is maintained in a sub-directory and can be
|
||||
selected as follow:
|
||||
Each PIC32MX configuration is maintained in a sub-directory and can be
|
||||
selected as follow:
|
||||
|
||||
cd tools
|
||||
./configure.sh sure-pic32mx/<subdir>
|
||||
cd -
|
||||
. ./setenv.sh
|
||||
|
||||
Where <subdir> is one of the following sub-directories.
|
||||
|
||||
NOTE: These configurations use the mconf-based configuration tool. To
|
||||
change any of these configurations using that tool, you should:
|
||||
|
||||
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
|
||||
and misc/tools/
|
||||
|
||||
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
||||
reconfiguration process.
|
||||
|
||||
Configuration sub-directories
|
||||
-----------------------------
|
||||
|
||||
Where <subdir> is one of the following:
|
||||
|
||||
ostest:
|
||||
@@ -613,6 +659,20 @@ Where <subdir> is one of the following:
|
||||
This configuration directory, performs a simple OS test using
|
||||
apps/examples/ostest.
|
||||
|
||||
Notes.
|
||||
-----
|
||||
1. By default, this configuration uses an older Microchip C32 toolchain
|
||||
for Windows (the newer ones seem to be incompatible) and builds under
|
||||
Cygwin (or probably MSYS). That
|
||||
can easily be reconfigured, of course.
|
||||
|
||||
Build Setup:
|
||||
CONFIG_HOST_WINDOWS=y : Builds under Windows
|
||||
CONFIG_WINDOWS_CYGWIN=y : Using Cygwin
|
||||
|
||||
System Type:
|
||||
CONFIG_MIPS32_TOOLCHAIN_MICROCHIPW_LITE=y : Older C32 toolchain
|
||||
|
||||
nsh:
|
||||
====
|
||||
Description.
|
||||
@@ -620,54 +680,122 @@ Where <subdir> is one of the following:
|
||||
Configures the NuttShell (nsh) located at apps/examples/nsh. The
|
||||
Configuration enables only the serial NSH interface.
|
||||
|
||||
USB Configuations.
|
||||
-----------------
|
||||
Several USB device configurations can be enabled and included
|
||||
as NSH built-in built in functions. All require the following
|
||||
basic setup in your .config to enable USB device support:
|
||||
Notes.
|
||||
-----
|
||||
1. By default, this configuration uses an older Microchip C32 toolchain
|
||||
for Windows (the newer ones seem to be incompatible) and builds under
|
||||
Cygwin (or probably MSYS). That can easily be reconfigured, of course.
|
||||
|
||||
Build Setup:
|
||||
CONFIG_HOST_WINDOWS=y : Builds under Windows
|
||||
CONFIG_WINDOWS_CYGWIN=y : Using Cygwin
|
||||
|
||||
System Type:
|
||||
CONFIG_MIPS32_TOOLCHAIN_MICROCHIPW_LITE=y : Older C32 toolchain
|
||||
|
||||
2. USB Configuations.
|
||||
|
||||
Several USB device configurations can be enabled and included
|
||||
as NSH built-in built in functions. All require the following
|
||||
basic setup in your .config to enable USB device support:
|
||||
|
||||
CONFIG_USBDEV=y : Enable basic USB device support
|
||||
CONFIG_PIC32MX_USBDEV=y : Enable PIC32 USB device support
|
||||
Drivers:
|
||||
CONFIG_USBDEV=y : Enable basic USB device support
|
||||
|
||||
examples/usbterm - This option can be enabled by uncommenting
|
||||
the following line in the appconfig file:
|
||||
System Type -> PIC32MX Peripheral Support:
|
||||
CONFIG_PIC32MX_USBDEV=y : Enable PIC32 USB device support
|
||||
|
||||
CONFIGURED_APPS += examples/usbterm
|
||||
examples/usbterm - This option can be enabled by uncommenting
|
||||
the following line in the appconfig file:
|
||||
|
||||
And by enabling one of the USB serial devices:
|
||||
Application Configuration->Examples:
|
||||
CONFIG_EXAMPLES_USBTERM=y : Selects /apps/examples/usbterm
|
||||
|
||||
CONFIG_PL2303=y : Enable the Prolifics PL2303 emulation
|
||||
CONFIG_CDCACM=y : or the CDC/ACM serial driver (not both)
|
||||
And by enabling one of the USB serial devices:
|
||||
|
||||
examples/cdcacm - The examples/cdcacm program can be included as an
|
||||
function by uncommenting the following line in the appconfig file:
|
||||
Drivers->USB Device Driver Support
|
||||
CONFIG_PL2303=y : Enable the Prolifics PL2303 emulation
|
||||
CONFIG_CDCACM=y : or the CDC/ACM serial driver (not both)
|
||||
|
||||
examples/cdcacm - The examples/cdcacm program can be included as an
|
||||
function by uncommenting the following line in the appconfig file:
|
||||
|
||||
CONFIGURED_APPS += examples/cdcacm
|
||||
Application Configuration->Examples:
|
||||
CONFIG_EXAMPLES_CDCACM=y : Select apps/examples/cdcacm
|
||||
|
||||
and defining the following in your .config file:
|
||||
and defining the following in your .config file:
|
||||
|
||||
CONFIG_CDCACM=y : Enable the CDCACM device
|
||||
Drivers->USB Device Driver Support
|
||||
CONFIG_CDCACM=y : Enable the CDCACM device
|
||||
|
||||
examples/usbstorage - There are some hooks in the appconfig file
|
||||
to enable the USB mass storage device. However, this device cannot
|
||||
work until support for the SD card is also incorporated.
|
||||
examples/usbstorage - There are some hooks in the appconfig file
|
||||
to enable the USB mass storage class (MSC)device. However, this device
|
||||
cannot work until support for the SD card is also incorporated.
|
||||
|
||||
SD Card Support.
|
||||
----------------
|
||||
Support for the on-board, SPI-based SD card is available but is
|
||||
not yet functional (at least at the time of this writing). SD
|
||||
card support can be enabled for testing by simply enabling SPI2
|
||||
support in the configuration file:
|
||||
Drivers->USB Device Driver Support
|
||||
CONFIG_USBMSC=y : Enables the USB MSC class
|
||||
|
||||
-CONFIG_PIC32MX_SPI2=n
|
||||
+CONFIG_PIC32MX_SPI2=y
|
||||
Application Configuration->Examples:
|
||||
CONFIG_EXAMPLES_USBSTORAGE=y : Enhables apps/examples/usbstorage
|
||||
|
||||
3. SD Card Support.
|
||||
|
||||
Support for the on-board, SPI-based SD card is available but is
|
||||
not yet functional (at least at the time of this writing). SD
|
||||
card support can be enabled for testing by simply enabling SPI2
|
||||
support in the configuration file:
|
||||
|
||||
System Type -> PIC32MX Peripheral Support:
|
||||
CONFIG_PIC32MX_SPI2=y : Enable SPI2
|
||||
|
||||
Drivers:
|
||||
CONFIG_MMCSD=y : MMC/SD support
|
||||
CONFIG_MMCSD_SPI=y : SPI-based MMC/SD support
|
||||
|
||||
File Systems:
|
||||
CONFIG_FS_FAT=y : FAT file system
|
||||
: Other FAT options
|
||||
|
||||
Debug output for testing the SD card can be enabled using:
|
||||
|
||||
-CONFIG_DEBUG_FS=n
|
||||
-CONFIG_DEBUG_SPI=n
|
||||
+CONFIG_DEBUG_FS=y
|
||||
+CONFIG_DEBUG_SPI=y
|
||||
Build Setup:
|
||||
CONFIG_DEBUG=y : Enable debug features
|
||||
CONFIG_DEBUG_VERBOSE=y : Enable verbose debug output
|
||||
CONFIG_DEBUG_FS=y : Enable file system debug
|
||||
CONFIG_DEBUG_SPI=y : Enable SPI debug
|
||||
|
||||
4. To enable LCD1602 support:
|
||||
|
||||
Device Drivers:
|
||||
CONFIG_LCD=y : Enable LCD menus
|
||||
CONFIG_LCD_LCD1602=y : Select LCD1602
|
||||
|
||||
Library Routines:
|
||||
CONFIG_LIB_SLCDCODEC=y : Enable the SLCD CODEC
|
||||
|
||||
System Type -> PIC32MX Peripheral Support:
|
||||
CONFIG_PIC32MX_PMP=y : Enable PMP support
|
||||
|
||||
To enable apps/examples/slcd to test the LCD:
|
||||
|
||||
Application Configuration:
|
||||
CONFIG_NSH_ARCHINIT=y : Needed to initialize the SLCD
|
||||
CONFIG_EXAMPLES_SLCD=y : Enable apps/examples/slcd use /dev/lcd1602
|
||||
CONFIG_EXAMPLES_SLCD_DEVNAME="/dev/lcd1602"
|
||||
|
||||
To enable LCD debug output:
|
||||
|
||||
Build Setup:
|
||||
CONFIG_DEBUG=y : Enable debug features
|
||||
CONFIG_DEBUG_VERBOSE=y : Enable LCD debug
|
||||
|
||||
NOTES:
|
||||
a. I do not have the LCD1602 working. I may just be getting lost in the
|
||||
tangle of wires or perhaps there is something fundamentally wrong with
|
||||
the code.
|
||||
b. At this point in time, testing of the SLCD is very limited because
|
||||
there is not much in apps/examples/slcd. Basically driver with a working
|
||||
test setup and ready to be tested and debugged.
|
||||
|
||||
usbnsh:
|
||||
=======
|
||||
@@ -681,29 +809,42 @@ Where <subdir> is one of the following:
|
||||
"DB_DP11215 PIC32 Storage Demo Board" and has only be testing on that
|
||||
board.
|
||||
|
||||
Comparison to nsh
|
||||
-----------------
|
||||
Below summarizes the key configuration differences between the 'nsh'
|
||||
and the 'upnsh' configurations:
|
||||
Notes.
|
||||
-----
|
||||
1. By default, this configuration uses an older Microchip C32 toolchain
|
||||
for Windows (the newer ones seem to be incompatible) and builds under
|
||||
Cygwin (or probably MSYS). That can easily be reconfigured, of course.
|
||||
|
||||
CONFIG_USBDEV=y : NuttX USB device support is enabled
|
||||
CONFIG_PIC32MX_USBDEV=y : The PIC32MX USB device driver is built
|
||||
CONFIG_UART1_SERIAL_CONSOLE=n : There is no serial console
|
||||
CONFIG_UART2_SERIAL_CONSOLE=n :
|
||||
CONFIG_CDCACM=y : The CDC/ACM serial device class is enabled
|
||||
CONFIG_CDCACM_CONSOLE=y : The CDC/ACM serial device is the console
|
||||
Build Setup:
|
||||
CONFIG_HOST_WINDOWS=y : Builds under Windows
|
||||
CONFIG_WINDOWS_CYGWIN=y : Using Cygwin
|
||||
|
||||
Using the Prolifics PL2303 Emulation
|
||||
------------------------------------
|
||||
You could also use the non-standard PL2303 serial device instead of
|
||||
the standard CDC/ACM serial device by changing:
|
||||
System Type:
|
||||
CONFIG_MIPS32_TOOLCHAIN_MICROCHIPW_LITE=y : Older C32 toolchain
|
||||
|
||||
CONFIG_CDCACM=y : Disable the CDC/ACM serial device class
|
||||
CONFIG_CDCACM_CONSOLE=y : The CDC/ACM serial device is NOT the console
|
||||
CONFIG_PL2303=y : The Prolifics PL2303 emulation is enabled
|
||||
CONFIG_PL2303_CONSOLE=y : The PL2303 serial device is the console
|
||||
2. Comparison to nsh
|
||||
|
||||
Why would you want to use a non-standard USB serial driver? You might
|
||||
to use the PL2303 driver with a Windows host because it should
|
||||
automatically install the PL2303 driver (you might have to go through
|
||||
some effort to get Windows to recognize the CDC/ACM device).
|
||||
Below summarizes the key configuration differences between the 'nsh'
|
||||
and the 'upnsh' configurations:
|
||||
|
||||
CONFIG_USBDEV=y : NuttX USB device support is enabled
|
||||
CONFIG_PIC32MX_USBDEV=y : The PIC32MX USB device driver is built
|
||||
CONFIG_UART1_SERIAL_CONSOLE=n : There is no serial console
|
||||
CONFIG_UART2_SERIAL_CONSOLE=n :
|
||||
CONFIG_CDCACM=y : The CDC/ACM serial device class is enabled
|
||||
CONFIG_CDCACM_CONSOLE=y : The CDC/ACM serial device is the console
|
||||
|
||||
Using the Prolifics PL2303 Emulation
|
||||
|
||||
You could also use the non-standard PL2303 serial device instead of
|
||||
the standard CDC/ACM serial device by changing:
|
||||
|
||||
CONFIG_CDCACM=n : Disable the CDC/ACM serial device class
|
||||
CONFIG_CDCACM_CONSOLE=n : The CDC/ACM serial device is NOT the console
|
||||
CONFIG_PL2303=y : The Prolifics PL2303 emulation is enabled
|
||||
CONFIG_PL2303_CONSOLE=y : The PL2303 serial device is the console
|
||||
|
||||
Why would you want to use a non-standard USB serial driver? You might
|
||||
to use the PL2303 driver with a Windows host because it should
|
||||
automatically install the PL2303 driver (you might have to go through
|
||||
some effort to get Windows to recognize the CDC/ACM device).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# configs/sure-pic32mx/nsh/Make.defs
|
||||
#
|
||||
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -44,13 +44,13 @@ ifeq ($(WINTOOL),y)
|
||||
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)/nsh/ld.script}"
|
||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}"
|
||||
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)/nsh/ld.script
|
||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script
|
||||
endif
|
||||
|
||||
CC = $(CROSSDEV)gcc
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
############################################################################
|
||||
# configs/sure-pic32mx/nsh/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.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
############################################################################
|
||||
# Path to example in apps/examples containing the user_start entry point
|
||||
############################################################################
|
||||
|
||||
CONFIGURED_APPS += examples/nsh
|
||||
|
||||
############################################################################
|
||||
# The NSH application library
|
||||
############################################################################
|
||||
|
||||
CONFIGURED_APPS += system/readline
|
||||
CONFIGURED_APPS += nshlib
|
||||
|
||||
############################################################################
|
||||
# USB device configurations
|
||||
############################################################################
|
||||
|
||||
ifeq ($(CONFIG_PIC32MX_USBDEV),y)
|
||||
|
||||
# USB Mass Storage Class device configurations
|
||||
|
||||
ifeq ($(CONFIG_USBMSC),y)
|
||||
# Uncomment to enable the examples/usbstorage built-in
|
||||
# CONFIGURED_APPS += examples/usbstorage
|
||||
endif
|
||||
|
||||
# USB CDC/ACM serial device configurations
|
||||
|
||||
ifeq ($(CONFIG_CDCACM),y)
|
||||
# Uncomment to enable the examples/cdcacm built-in
|
||||
# CONFIGURED_APPS += examples/cdcacm
|
||||
# Uncomment the following to enable the examples/usbterm built-in
|
||||
# CONFIGURED_APPS += examples/usbterm
|
||||
endif
|
||||
|
||||
# Prolifics PL2303 emulation configurations
|
||||
|
||||
ifeq ($(CONFIG_PL2303),y)
|
||||
# Uncomment the following to enable the examples/usbterm built-in
|
||||
# CONFIGURED_APPS += examples/usbterm
|
||||
endif
|
||||
endif
|
||||
+669
-466
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# configs/sure-pic32mx/ostest/Make.defs
|
||||
#
|
||||
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2011,2013 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -44,13 +44,13 @@ ifeq ($(WINTOOL),y)
|
||||
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)/ostest/ld.script}"
|
||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}"
|
||||
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)/ostest/ld.script
|
||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script
|
||||
endif
|
||||
|
||||
CC = $(CROSSDEV)gcc
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
############################################################################
|
||||
# configs/sure-pic32mx/ostest/appconfig
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# Path to example in apps/examples containing the user_start entry point
|
||||
|
||||
CONFIGURED_APPS += examples/ostest
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,317 +0,0 @@
|
||||
/****************************************************************************
|
||||
* configs/sure-pic32mx/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.
|
||||
*
|
||||
****************************************************************************/
|
||||
/* Memory Regions ***********************************************************/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
/* The PIC32MX440F512H has 512Kb of program FLASH at physical address
|
||||
* 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000
|
||||
*/
|
||||
|
||||
kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 512K
|
||||
|
||||
/* The PIC32MX440F512H has 12Kb of boot FLASH at physical address
|
||||
* 0x1fc00000. The initial reset vector is in KSEG1, but all other
|
||||
* accesses are in KSEG0.
|
||||
*
|
||||
* REGION PHYSICAL KSEG SIZE
|
||||
* DESCRIPTION START ADDR (BYTES)
|
||||
* ------------- ---------- ------ ----------------------
|
||||
* Exceptions:*
|
||||
* Reset 0x1fc00000 KSEG1 512 512
|
||||
* TLB Refill 0x1fc00200 KSEG1 256 768
|
||||
* Cache Error 0x1fc00300 KSEG1 128 896
|
||||
* Others 0x1fc00380 KSEG1 128 1024 (1Kb)
|
||||
* Interrupt 0x1fc00400 KSEG1 128 1152
|
||||
* JTAG 0x1fc00480 KSEG1 16 1168
|
||||
* Exceptions 0x1fc00490 KSEG0 8192-1168 8192 (4Kb)
|
||||
* Debug code 0x1fc02000 KSEG1 4096-16 12272
|
||||
* DEVCFG3-0 0x1fc02ff0 KSEG1 16 12288 (12Kb)
|
||||
*
|
||||
* Exceptions assume:
|
||||
*
|
||||
* STATUS: BEV=0/1 and EXL=0
|
||||
* CAUSE: IV=1
|
||||
* JTAG: ProbEn=0
|
||||
* And multi-vector support disabled
|
||||
*/
|
||||
|
||||
kseg1_reset (rx) : ORIGIN = 0xbfc00000, LENGTH = 384
|
||||
kseg1_genexcpt (rx) : ORIGIN = 0xbfc00180, LENGTH = 128
|
||||
kseg1_ebexcpt (rx) : ORIGIN = 0xbfc00200, LENGTH = 128
|
||||
kseg1_bevexcpt (rx) : ORIGIN = 0xbfc00380, LENGTH = 128
|
||||
kseg1_intexcpt (rx) : ORIGIN = 0xbfc00400, LENGTH = 128
|
||||
kseg1_dbgexcpt (rx) : ORIGIN = 0xbfc00480, LENGTH = 16
|
||||
kseg0_bootmem (rx) : ORIGIN = 0x9fc00490, LENGTH = 8192-1168
|
||||
kseg1_dbgcode (rx) : ORIGIN = 0xbfc02000, LENGTH = 4096-16
|
||||
kseg1_devcfg (r) : ORIGIN = 0xbfc02ff0, LENGTH = 16
|
||||
|
||||
/* The PIC32MX440F512H has 32Kb of data memory at physical address
|
||||
* 0x00000000. Since the PIC32MX has no data cache, this memory is
|
||||
* always accessed through KSEG1.
|
||||
*
|
||||
* When used with MPLAB, we need to set aside 512 bytes of memory
|
||||
* for use by MPLAB.
|
||||
*/
|
||||
|
||||
kseg1_datamem (w!x) : ORIGIN = 0xa0000200, LENGTH = 32K - 512
|
||||
}
|
||||
|
||||
OUTPUT_FORMAT("elf32-tradlittlemips")
|
||||
OUTPUT_ARCH(pic32mx)
|
||||
ENTRY(__start)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
/* Boot FLASH sections */
|
||||
|
||||
.reset :
|
||||
{
|
||||
KEEP (*(.reset))
|
||||
} > kseg1_reset
|
||||
|
||||
/* Exception handlers. The following is assumed:
|
||||
*
|
||||
* STATUS: BEV=1 and EXL=0
|
||||
* CAUSE: IV=1
|
||||
* JTAG: ProbEn=0
|
||||
* And multi-vector support disabled
|
||||
*
|
||||
* In that configuration, the vector locations become:
|
||||
*
|
||||
* Reset, Soft Reset bfc0:0000
|
||||
* TLB Refill bfc0:0200
|
||||
* Cache Error bfc0:0300
|
||||
* All others bfc0:0380
|
||||
* Interrupt bfc0:0400
|
||||
* EJTAG Debug bfc0:0480
|
||||
*/
|
||||
|
||||
/* KSEG1 exception handler "trampolines" */
|
||||
|
||||
.gen_excpt :
|
||||
{
|
||||
KEEP (*(.gen_excpt))
|
||||
} > kseg1_genexcpt
|
||||
|
||||
.ebase_excpt :
|
||||
{
|
||||
KEEP (*(.ebase_excpt))
|
||||
} > kseg1_ebexcpt
|
||||
|
||||
.bev_excpt :
|
||||
{
|
||||
KEEP (*(.bev_excpt))
|
||||
} > kseg1_bevexcpt
|
||||
|
||||
.int_excpt :
|
||||
{
|
||||
KEEP (*(.int_excpt))
|
||||
} > kseg1_intexcpt
|
||||
|
||||
.dbg_excpt = ORIGIN(kseg1_dbgexcpt);
|
||||
|
||||
.start :
|
||||
{
|
||||
/* KSEG0 Reset startup logic */
|
||||
|
||||
*(.start)
|
||||
|
||||
/* KSEG0 exception handlers */
|
||||
|
||||
*(.nmi_handler)
|
||||
*(.bev_handler)
|
||||
*(.int_handler)
|
||||
} > kseg0_bootmem
|
||||
|
||||
.dbg_code = ORIGIN(kseg1_dbgcode);
|
||||
|
||||
.devcfg :
|
||||
{
|
||||
KEEP (*(.devcfg))
|
||||
} > kseg1_devcfg
|
||||
|
||||
/* Program FLASH sections */
|
||||
|
||||
.text :
|
||||
{
|
||||
_stext = ABSOLUTE(.);
|
||||
*(.text .text.*)
|
||||
*(.stub)
|
||||
KEEP (*(.text.*personality*))
|
||||
*(.gnu.linkonce.t.*)
|
||||
*(.gnu.warning)
|
||||
*(.mips16.fn.*)
|
||||
*(.mips16.call.*)
|
||||
|
||||
/* Read-only data is included in the text section */
|
||||
|
||||
*(.rodata .rodata.*)
|
||||
*(.rodata1)
|
||||
*(.gnu.linkonce.r.*)
|
||||
|
||||
/* Small initialized constant global and static data */
|
||||
|
||||
*(.sdata2 .sdata2.*)
|
||||
*(.gnu.linkonce.s2.*)
|
||||
|
||||
/* Uninitialized constant global and static data */
|
||||
|
||||
*(.sbss2 .sbss2.*)
|
||||
*(.gnu.linkonce.sb2.*)
|
||||
_etext = ABSOLUTE(.);
|
||||
} > kseg0_progmem
|
||||
|
||||
/* Initialization data begins here in progmem */
|
||||
|
||||
_data_loaddr = LOADADDR(.data);
|
||||
|
||||
.eh_frame_hdr : { *(.eh_frame_hdr) }
|
||||
.eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
|
||||
|
||||
/* RAM functions are positioned at the beginning of RAM so that
|
||||
* they can be guaranteed to satisfy the 2Kb alignment requirement.
|
||||
*/
|
||||
|
||||
/* This causes failures if there are no RAM functions
|
||||
.ramfunc ALIGN(2K) :
|
||||
{
|
||||
_sramfunc = ABSOLUTE(.);
|
||||
*(.ramfunc .ramfunc.*)
|
||||
_eramfunc = ABSOLUTE(.);
|
||||
} > kseg1_datamem AT > kseg0_progmem
|
||||
|
||||
_ramfunc_loadaddr = LOADADDR(.ramfunc);
|
||||
_ramfunc_sizeof = SIZEOF(.ramfunc);
|
||||
_bmxdkpba_address = _sramfunc - ORIGIN(kseg1_datamem) ;
|
||||
_bmxdudba_address = LENGTH(kseg1_datamem) ;
|
||||
_bmxdupba_address = LENGTH(kseg1_datamem) ;
|
||||
*/
|
||||
|
||||
.data :
|
||||
{
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
KEEP (*(.gnu.linkonce.d.*personality*))
|
||||
*(.data1)
|
||||
} > kseg1_datamem AT > kseg0_progmem
|
||||
|
||||
.eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
|
||||
_gp = ALIGN(16) + 0x7FF0 ;
|
||||
|
||||
.got :
|
||||
{
|
||||
*(.got.plt) *(.got)
|
||||
} > kseg1_datamem AT > kseg0_progmem
|
||||
|
||||
.sdata :
|
||||
{
|
||||
*(.sdata .sdata.* .gnu.linkonce.s.*)
|
||||
} > kseg1_datamem AT > kseg0_progmem
|
||||
|
||||
.lit8 :
|
||||
{
|
||||
*(.lit8)
|
||||
} > kseg1_datamem AT > kseg0_progmem
|
||||
|
||||
.lit4 :
|
||||
{
|
||||
*(.lit4)
|
||||
_edata = ABSOLUTE(.);
|
||||
} >kseg1_datamem AT>kseg0_progmem
|
||||
|
||||
.sbss :
|
||||
{
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.dynsbss)
|
||||
*(.sbss .sbss.* .gnu.linkonce.sb.*)
|
||||
*(.scommon)
|
||||
} >kseg1_datamem
|
||||
|
||||
.bss :
|
||||
{
|
||||
*(.dynbss)
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > kseg1_datamem
|
||||
|
||||
/* 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) }
|
||||
|
||||
/* DWARF debug sections */
|
||||
/* DWARF 1 */
|
||||
|
||||
.debug 0 : { *(.debug) }
|
||||
.line 0 : { *(.line) }
|
||||
|
||||
/* GNU DWARF 1 extensions */
|
||||
|
||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||
|
||||
/* DWARF 1.1 and DWARF 2 */
|
||||
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
|
||||
/* DWARF 2 */
|
||||
|
||||
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_frame 0 : { *(.debug_frame) }
|
||||
.debug_str 0 : { *(.debug_str) }
|
||||
.debug_loc 0 : { *(.debug_loc) }
|
||||
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||
|
||||
/* SGI/MIPS DWARF 2 extensions */
|
||||
|
||||
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||
.debug_typenames 0 : { *(.debug_typenames) }
|
||||
.debug_varnames 0 : { *(.debug_varnames) }
|
||||
|
||||
/DISCARD/ : { *(.note.GNU-stack) }
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# configs/sure-pic32mx/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -35,48 +35,52 @@
|
||||
|
||||
-include $(TOPDIR)/Make.defs
|
||||
|
||||
CFLAGS += -I$(TOPDIR)/sched
|
||||
CFLAGS += -I$(TOPDIR)/sched
|
||||
|
||||
ASRCS =
|
||||
CSRCS = up_boot.c up_spi.c
|
||||
ASRCS =
|
||||
CSRCS = pic32mx_boot.c pic32mx_spi.c
|
||||
|
||||
# Only the DB_DP11215 PIC32 Storage Demo Board board has user controllable
|
||||
# LEDs
|
||||
|
||||
ifeq ($(CONFIG_ARCH_DBDP11215),y)
|
||||
ifeq ($(CONFIG_ARCH_LEDS),y)
|
||||
CSRCS += up_leds.c
|
||||
CSRCS += pic32mx_autoleds.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_BUTTONS),y)
|
||||
CSRCS += up_buttons.c
|
||||
CSRCS += pic32mx_buttons.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PIC32MX_USBDEV),y)
|
||||
CSRCS += up_usbdev.c
|
||||
CSRCS += pic32mx_usbdev.c
|
||||
ifeq ($(CONFIG_EXAMPLES_USBTERM_DEVINIT),y)
|
||||
CSRCS += up_usbterm.c
|
||||
CSRCS += pic32mx_usbterm.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LCD_LCD1602),y)
|
||||
CSRCS += pic32mx_lcd1602.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NSH_ARCHINIT),y)
|
||||
CSRCS += up_nsh.c
|
||||
CSRCS += pic32mx_nsh.c
|
||||
endif
|
||||
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
|
||||
SRCS = $(ASRCS) $(CSRCS)
|
||||
OBJS = $(AOBJS) $(COBJS)
|
||||
SRCS = $(ASRCS) $(CSRCS)
|
||||
OBJS = $(AOBJS) $(COBJS)
|
||||
|
||||
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
|
||||
ifeq ($(WINTOOL),y)
|
||||
CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \
|
||||
-I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \
|
||||
-I "${shell cygpath -w $(ARCH_SRCDIR)/mips32}"
|
||||
CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \
|
||||
-I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \
|
||||
-I "${shell cygpath -w $(ARCH_SRCDIR)/mips32}"
|
||||
else
|
||||
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/mips32
|
||||
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/mips32
|
||||
endif
|
||||
|
||||
all: libboard$(LIBEXT)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/sure-pic32mx/src/up_leds.c
|
||||
* arch/arm/src/board/up_leds.c
|
||||
* configs/sure-pic32mx/src/pic32mx_leds.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -52,7 +51,7 @@
|
||||
|
||||
#include "pic32mx-internal.h"
|
||||
#include "pic32mx-ioport.h"
|
||||
#include "sure-internal.h"
|
||||
#include "sure-pic32mx.h"
|
||||
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/************************************************************************************
|
||||
* configs/sure-pic32mx/src/up_boot.c
|
||||
* arch/mips/src/board/up_boot.c
|
||||
* configs/sure-pic32mx/src/pic32mx_boot.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -48,7 +47,7 @@
|
||||
#include "up_internal.h"
|
||||
|
||||
#include "pic32mx-internal.h"
|
||||
#include "sure-internal.h"
|
||||
#include "sure-pic32mx.h"
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/sure-pic32mx/src/up_buttons.c
|
||||
* configs/sure-pic32mx/src/pic32mx_buttons.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -51,7 +51,7 @@
|
||||
#include "pic32mx-internal.h"
|
||||
#include "pic32mx-ioport.h"
|
||||
#include "pic32mx-adc.h"
|
||||
#include "sure-internal.h"
|
||||
#include "sure-pic32mx.h"
|
||||
|
||||
#ifdef CONFIG_ARCH_BUTTONS
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,5 @@
|
||||
/****************************************************************************
|
||||
* config/sure-pic32mx/src/up_nsh.c
|
||||
* arch/arm/src/board/up_nsh.c
|
||||
* config/sure-pic32mx/src/pic32mx_nsh.c
|
||||
*
|
||||
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -47,10 +46,11 @@
|
||||
|
||||
#include <nuttx/spi.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/lcd/hd4478ou.h>
|
||||
#include <nuttx/usb/usbhost.h>
|
||||
|
||||
#include "pic32mx-internal.h"
|
||||
#include "sure-internal.h"
|
||||
#include "sure-pic32mx.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
@@ -60,27 +60,13 @@
|
||||
|
||||
/* PORT and SLOT number probably depend on the board configuration */
|
||||
|
||||
#ifdef CONFIG_ARCH_BOARD_SUREPIC32MX
|
||||
# define NSH_HAVEMMCSD 1
|
||||
# define NSH_HAVEUSBHOST 1
|
||||
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 2
|
||||
# error "The Sure PIC32MX MMC/SD is on SPI2"
|
||||
# undef CONFIG_NSH_MMCSDSPIPORTNO
|
||||
# define CONFIG_NSH_MMCSDSPIPORTNO 2
|
||||
# endif
|
||||
# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0
|
||||
# error "The Sure PIC32MX MMC/SD has only one slot (0)"
|
||||
# undef CONFIG_NSH_MMCSDSLOTNO
|
||||
# define CONFIG_NSH_MMCSDSLOTNO 0
|
||||
# endif
|
||||
# ifndef CONFIG_PIC32MX_SPI2
|
||||
# warning "CONFIG_PIC32MX_SPI2 is not enabled"
|
||||
# undef NSH_HAVEMMCSD
|
||||
# endif
|
||||
#else
|
||||
# error "Unrecognized board"
|
||||
#define NSH_HAVEMMCSD 1
|
||||
#define NSH_HAVEUSBHOST 1
|
||||
|
||||
/* Can't support MMC/SD if SPI2 is not enabled */
|
||||
|
||||
#ifndef CONFIG_PIC32MX_SPI2
|
||||
# undef NSH_HAVEMMCSD
|
||||
# undef NSH_HAVEUSBHOST
|
||||
#endif
|
||||
|
||||
/* Can't support MMC/SD features if mountpoints are disabled */
|
||||
@@ -89,21 +75,37 @@
|
||||
# undef NSH_HAVEMMCSD
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NSH_MMCSDMINOR
|
||||
# define CONFIG_NSH_MMCSDMINOR 0
|
||||
/* MMC/SD configuration */
|
||||
|
||||
#ifdef NSH_HAVEMMCSD
|
||||
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 2
|
||||
# warning "The Sure PIC32MX MMC/SD is on SPI2"
|
||||
# undef CONFIG_NSH_MMCSDSPIPORTNO
|
||||
# define CONFIG_NSH_MMCSDSPIPORTNO 2
|
||||
# endif
|
||||
# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0
|
||||
# error "The Sure PIC32MX MMC/SD has only one slot (0)"
|
||||
# warning CONFIG_NSH_MMCSDSLOTNO
|
||||
# define CONFIG_NSH_MMCSDSLOTNO 0
|
||||
# endif
|
||||
# ifndef CONFIG_NSH_MMCSDMINOR
|
||||
# define CONFIG_NSH_MMCSDMINOR 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* USB Host */
|
||||
|
||||
#ifdef CONFIG_USBHOST
|
||||
# ifndef CONFIG_PIC32MX_USBHOST
|
||||
# error "CONFIG_PIC32MX_USBHOST is not selected"
|
||||
# warning "CONFIG_PIC32MX_USBHOST is not selected"
|
||||
# undef CONFIG_USBHOST
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PIC32MX_USBHOST
|
||||
# ifndef CONFIG_USBHOST
|
||||
# warning "CONFIG_USBHOST is not selected"
|
||||
# undef CONFIG_PIC32MX_USBHOST
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -340,9 +342,18 @@ int nsh_archinitialize(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Initialize SPI-based microSD */
|
||||
/* Initialize the LCD1602 and register the device as /dev/lcd1602 */
|
||||
|
||||
#ifdef CONFIG_LCD_LCD1602
|
||||
ret = up_lcd1602_initialize();
|
||||
if (ret == OK)
|
||||
#endif
|
||||
{
|
||||
/* Initialize SPI-based microSD */
|
||||
|
||||
ret = nsh_sdinitialize();
|
||||
}
|
||||
|
||||
ret = nsh_sdinitialize();
|
||||
if (ret == OK)
|
||||
{
|
||||
/* Initialize USB host */
|
||||
@@ -356,5 +367,6 @@ int nsh_archinitialize(void)
|
||||
|
||||
ret = nsh_usbdevinitialize();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
/************************************************************************************
|
||||
* configs/sure-pic32mx/src/up_spi.c
|
||||
* arch/arm/src/board/up_spi.c
|
||||
* configs/sure-pic32mx/src/pic32mx_spi.c
|
||||
*
|
||||
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -50,7 +49,7 @@
|
||||
#include "up_arch.h"
|
||||
#include "chip.h"
|
||||
#include "pic32mx-internal.h"
|
||||
#include "sure-internal.h"
|
||||
#include "sure-pic32mx.h"
|
||||
|
||||
#if defined(CONFIG_PIC32MX_SPI2)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/************************************************************************************
|
||||
* configs/sure-pic32mx/src/up_usbdev.c
|
||||
* arch/arm/src/board/up_usbdev.c
|
||||
* configs/sure-pic32mx/src/pic32mx_usbdev.c
|
||||
*
|
||||
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* References:
|
||||
@@ -49,7 +48,7 @@
|
||||
#include <nuttx/usb/usbdev.h>
|
||||
|
||||
#include "pic32mx-internal.h"
|
||||
#include "sure-internal.h"
|
||||
#include "sure-pic32mx.h"
|
||||
|
||||
#if defined(CONFIG_PIC32MX_USBDEV)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/************************************************************************************
|
||||
* configs/sure-pic32mx/src/up_usbterm.c
|
||||
* arch/arm/src/board/up_usbterm.c
|
||||
* configs/sure-pic32mx/src/pic32mx_usbterm.c
|
||||
*
|
||||
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* References:
|
||||
@@ -49,7 +48,7 @@
|
||||
#include <nuttx/usb/usbdev.h>
|
||||
|
||||
#include "pic32mx-internal.h"
|
||||
#include "sure-internal.h"
|
||||
#include "sure-pic32mx.h"
|
||||
|
||||
#if defined(CONFIG_PIC32MX_USBDEV) && defined(CONFIG_EXAMPLES_USBTERM_DEVINIT)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/sure-pic32mx/src/sure-internal.h
|
||||
* configs/sure-pic32mx/src/sure-pic32mx.h
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -33,8 +33,8 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CONFIGS_SURE_PIC32MX_SRC_SURE_INTERNAL_H
|
||||
#define __CONFIGS_SURE_PIC32MX_SRC_SURE_INTERNAL_H
|
||||
#ifndef __CONFIGS_SURE_PIC32MX_SRC_SURE_PIC32MXL_H
|
||||
#define __CONFIGS_SURE_PIC32MX_SRC_SURE_PIC32MXL_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
@@ -86,7 +86,7 @@ extern "C" {
|
||||
************************************************************************************/
|
||||
|
||||
#if defined(CONFIG_PIC32MX_SPI2)
|
||||
EXTERN void weak_function pic32mx_spiinitialize(void);
|
||||
void weak_function pic32mx_spiinitialize(void);
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
@@ -98,7 +98,7 @@ EXTERN void weak_function pic32mx_spiinitialize(void);
|
||||
************************************************************************************/
|
||||
|
||||
#if defined(CONFIG_PIC32MX_USBDEV)
|
||||
EXTERN void weak_function pic32mx_usbdevinitialize(void);
|
||||
void weak_function pic32mx_usbdevinitialize(void);
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
@@ -110,7 +110,7 @@ EXTERN void weak_function pic32mx_usbdevinitialize(void);
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
EXTERN void pic32mx_ledinit(void);
|
||||
void pic32mx_ledinit(void);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
@@ -119,4 +119,4 @@ EXTERN void pic32mx_ledinit(void);
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __CONFIGS_SURE_PIC32MX_SRC_SURE_INTERNAL_H */
|
||||
#endif /* __CONFIGS_SURE_PIC32MX_SRC_SURE_PIC32MXL_H */
|
||||
@@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# configs/sure-pic32mx/usbnsh/Make.defs
|
||||
#
|
||||
# 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
|
||||
@@ -44,13 +44,13 @@ ifeq ($(WINTOOL),y)
|
||||
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)/usbnsh/ld.script}"
|
||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}"
|
||||
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)/usbnsh/ld.script
|
||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script
|
||||
endif
|
||||
|
||||
CC = $(CROSSDEV)gcc
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
############################################################################
|
||||
# configs/sure-pic32mx/usbnsh/appconfig
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
############################################################################
|
||||
# Path to example in apps/examples containing the user_start entry point
|
||||
############################################################################
|
||||
|
||||
CONFIGURED_APPS += examples/nsh
|
||||
|
||||
############################################################################
|
||||
# The NSH application library
|
||||
############################################################################
|
||||
|
||||
CONFIGURED_APPS += system/readline
|
||||
CONFIGURED_APPS += nshlib
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,317 +0,0 @@
|
||||
/****************************************************************************
|
||||
* configs/sure-pic32mx/usbnsh/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.
|
||||
*
|
||||
****************************************************************************/
|
||||
/* Memory Regions ***********************************************************/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
/* The PIC32MX440F512H has 512Kb of program FLASH at physical address
|
||||
* 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000
|
||||
*/
|
||||
|
||||
kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 512K
|
||||
|
||||
/* The PIC32MX440F512H has 12Kb of boot FLASH at physical address
|
||||
* 0x1fc00000. The initial reset vector is in KSEG1, but all other
|
||||
* accesses are in KSEG0.
|
||||
*
|
||||
* REGION PHYSICAL KSEG SIZE
|
||||
* DESCRIPTION START ADDR (BYTES)
|
||||
* ------------- ---------- ------ ----------------------
|
||||
* Exceptions:*
|
||||
* Reset 0x1fc00000 KSEG1 512 512
|
||||
* TLB Refill 0x1fc00200 KSEG1 256 768
|
||||
* Cache Error 0x1fc00300 KSEG1 128 896
|
||||
* Others 0x1fc00380 KSEG1 128 1024 (1Kb)
|
||||
* Interrupt 0x1fc00400 KSEG1 128 1152
|
||||
* JTAG 0x1fc00480 KSEG1 16 1168
|
||||
* Exceptions 0x1fc00490 KSEG0 8192-1168 8192 (4Kb)
|
||||
* Debug code 0x1fc02000 KSEG1 4096-16 12272
|
||||
* DEVCFG3-0 0x1fc02ff0 KSEG1 16 12288 (12Kb)
|
||||
*
|
||||
* Exceptions assume:
|
||||
*
|
||||
* STATUS: BEV=0/1 and EXL=0
|
||||
* CAUSE: IV=1
|
||||
* JTAG: ProbEn=0
|
||||
* And multi-vector support disabled
|
||||
*/
|
||||
|
||||
kseg1_reset (rx) : ORIGIN = 0xbfc00000, LENGTH = 384
|
||||
kseg1_genexcpt (rx) : ORIGIN = 0xbfc00180, LENGTH = 128
|
||||
kseg1_ebexcpt (rx) : ORIGIN = 0xbfc00200, LENGTH = 128
|
||||
kseg1_bevexcpt (rx) : ORIGIN = 0xbfc00380, LENGTH = 128
|
||||
kseg1_intexcpt (rx) : ORIGIN = 0xbfc00400, LENGTH = 128
|
||||
kseg1_dbgexcpt (rx) : ORIGIN = 0xbfc00480, LENGTH = 16
|
||||
kseg0_bootmem (rx) : ORIGIN = 0x9fc00490, LENGTH = 8192-1168
|
||||
kseg1_dbgcode (rx) : ORIGIN = 0xbfc02000, LENGTH = 4096-16
|
||||
kseg1_devcfg (r) : ORIGIN = 0xbfc02ff0, LENGTH = 16
|
||||
|
||||
/* The PIC32MX440F512H has 32Kb of data memory at physical address
|
||||
* 0x00000000. Since the PIC32MX has no data cache, this memory is
|
||||
* always accessed through KSEG1.
|
||||
*
|
||||
* When used with MPLAB, we need to set aside 512 bytes of memory
|
||||
* for use by MPLAB.
|
||||
*/
|
||||
|
||||
kseg1_datamem (w!x) : ORIGIN = 0xa0000200, LENGTH = 32K - 512
|
||||
}
|
||||
|
||||
OUTPUT_FORMAT("elf32-tradlittlemips")
|
||||
OUTPUT_ARCH(pic32mx)
|
||||
ENTRY(__start)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
/* Boot FLASH sections */
|
||||
|
||||
.reset :
|
||||
{
|
||||
KEEP (*(.reset))
|
||||
} > kseg1_reset
|
||||
|
||||
/* Exception handlers. The following is assumed:
|
||||
*
|
||||
* STATUS: BEV=1 and EXL=0
|
||||
* CAUSE: IV=1
|
||||
* JTAG: ProbEn=0
|
||||
* And multi-vector support disabled
|
||||
*
|
||||
* In that configuration, the vector locations become:
|
||||
*
|
||||
* Reset, Soft Reset bfc0:0000
|
||||
* TLB Refill bfc0:0200
|
||||
* Cache Error bfc0:0300
|
||||
* All others bfc0:0380
|
||||
* Interrupt bfc0:0400
|
||||
* EJTAG Debug bfc0:0480
|
||||
*/
|
||||
|
||||
/* KSEG1 exception handler "trampolines" */
|
||||
|
||||
.gen_excpt :
|
||||
{
|
||||
KEEP (*(.gen_excpt))
|
||||
} > kseg1_genexcpt
|
||||
|
||||
.ebase_excpt :
|
||||
{
|
||||
KEEP (*(.ebase_excpt))
|
||||
} > kseg1_ebexcpt
|
||||
|
||||
.bev_excpt :
|
||||
{
|
||||
KEEP (*(.bev_excpt))
|
||||
} > kseg1_bevexcpt
|
||||
|
||||
.int_excpt :
|
||||
{
|
||||
KEEP (*(.int_excpt))
|
||||
} > kseg1_intexcpt
|
||||
|
||||
.dbg_excpt = ORIGIN(kseg1_dbgexcpt);
|
||||
|
||||
.start :
|
||||
{
|
||||
/* KSEG0 Reset startup logic */
|
||||
|
||||
*(.start)
|
||||
|
||||
/* KSEG0 exception handlers */
|
||||
|
||||
*(.nmi_handler)
|
||||
*(.bev_handler)
|
||||
*(.int_handler)
|
||||
} > kseg0_bootmem
|
||||
|
||||
.dbg_code = ORIGIN(kseg1_dbgcode);
|
||||
|
||||
.devcfg :
|
||||
{
|
||||
KEEP (*(.devcfg))
|
||||
} > kseg1_devcfg
|
||||
|
||||
/* Program FLASH sections */
|
||||
|
||||
.text :
|
||||
{
|
||||
_stext = ABSOLUTE(.);
|
||||
*(.text .text.*)
|
||||
*(.stub)
|
||||
KEEP (*(.text.*personality*))
|
||||
*(.gnu.linkonce.t.*)
|
||||
*(.gnu.warning)
|
||||
*(.mips16.fn.*)
|
||||
*(.mips16.call.*)
|
||||
|
||||
/* Read-only data is included in the text section */
|
||||
|
||||
*(.rodata .rodata.*)
|
||||
*(.rodata1)
|
||||
*(.gnu.linkonce.r.*)
|
||||
|
||||
/* Small initialized constant global and static data */
|
||||
|
||||
*(.sdata2 .sdata2.*)
|
||||
*(.gnu.linkonce.s2.*)
|
||||
|
||||
/* Uninitialized constant global and static data */
|
||||
|
||||
*(.sbss2 .sbss2.*)
|
||||
*(.gnu.linkonce.sb2.*)
|
||||
_etext = ABSOLUTE(.);
|
||||
} > kseg0_progmem
|
||||
|
||||
/* Initialization data begins here in progmem */
|
||||
|
||||
_data_loaddr = LOADADDR(.data);
|
||||
|
||||
.eh_frame_hdr : { *(.eh_frame_hdr) }
|
||||
.eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
|
||||
|
||||
/* RAM functions are positioned at the beginning of RAM so that
|
||||
* they can be guaranteed to satisfy the 2Kb alignment requirement.
|
||||
*/
|
||||
|
||||
/* This causes failures if there are no RAM functions
|
||||
.ramfunc ALIGN(2K) :
|
||||
{
|
||||
_sramfunc = ABSOLUTE(.);
|
||||
*(.ramfunc .ramfunc.*)
|
||||
_eramfunc = ABSOLUTE(.);
|
||||
} > kseg1_datamem AT > kseg0_progmem
|
||||
|
||||
_ramfunc_loadaddr = LOADADDR(.ramfunc);
|
||||
_ramfunc_sizeof = SIZEOF(.ramfunc);
|
||||
_bmxdkpba_address = _sramfunc - ORIGIN(kseg1_datamem) ;
|
||||
_bmxdudba_address = LENGTH(kseg1_datamem) ;
|
||||
_bmxdupba_address = LENGTH(kseg1_datamem) ;
|
||||
*/
|
||||
|
||||
.data :
|
||||
{
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
KEEP (*(.gnu.linkonce.d.*personality*))
|
||||
*(.data1)
|
||||
} > kseg1_datamem AT > kseg0_progmem
|
||||
|
||||
.eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
|
||||
_gp = ALIGN(16) + 0x7FF0 ;
|
||||
|
||||
.got :
|
||||
{
|
||||
*(.got.plt) *(.got)
|
||||
} > kseg1_datamem AT > kseg0_progmem
|
||||
|
||||
.sdata :
|
||||
{
|
||||
*(.sdata .sdata.* .gnu.linkonce.s.*)
|
||||
} > kseg1_datamem AT > kseg0_progmem
|
||||
|
||||
.lit8 :
|
||||
{
|
||||
*(.lit8)
|
||||
} > kseg1_datamem AT > kseg0_progmem
|
||||
|
||||
.lit4 :
|
||||
{
|
||||
*(.lit4)
|
||||
_edata = ABSOLUTE(.);
|
||||
} >kseg1_datamem AT>kseg0_progmem
|
||||
|
||||
.sbss :
|
||||
{
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.dynsbss)
|
||||
*(.sbss .sbss.* .gnu.linkonce.sb.*)
|
||||
*(.scommon)
|
||||
} >kseg1_datamem
|
||||
|
||||
.bss :
|
||||
{
|
||||
*(.dynbss)
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > kseg1_datamem
|
||||
|
||||
/* 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) }
|
||||
|
||||
/* DWARF debug sections */
|
||||
/* DWARF 1 */
|
||||
|
||||
.debug 0 : { *(.debug) }
|
||||
.line 0 : { *(.line) }
|
||||
|
||||
/* GNU DWARF 1 extensions */
|
||||
|
||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||
|
||||
/* DWARF 1.1 and DWARF 2 */
|
||||
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
|
||||
/* DWARF 2 */
|
||||
|
||||
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_frame 0 : { *(.debug_frame) }
|
||||
.debug_str 0 : { *(.debug_str) }
|
||||
.debug_loc 0 : { *(.debug_loc) }
|
||||
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||
|
||||
/* SGI/MIPS DWARF 2 extensions */
|
||||
|
||||
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||
.debug_typenames 0 : { *(.debug_typenames) }
|
||||
.debug_varnames 0 : { *(.debug_varnames) }
|
||||
|
||||
/DISCARD/ : { *(.note.GNU-stack) }
|
||||
}
|
||||
Reference in New Issue
Block a user