9
0
Fork 0

Add configuration for Future Electronics Group NE64 Badge board

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3316 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2011-02-25 18:46:06 +00:00
parent 8d60b9d1bc
commit dfa74f08b9
21 changed files with 2962 additions and 6 deletions

View File

@ -1466,5 +1466,7 @@
* examples/nsh -- Correct an usage of getopt(): If you stop calling getopt()
before all parameters are parsed, you can leave getopt() in a strange state.
* Rename arch/pjrc-8051 to arch/8051
* configs/ne64badge -- Add a configuration for the Future Electronics Group
NE64 Badge development board (Freescale MC9S12NE64)

View File

@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
<p>Last Updated: February 24, 2011</p>
<p>Last Updated: February 25, 2011</p>
</td>
</tr>
</table>
@ -582,7 +582,7 @@
<td><br></td>
<td>
<p>
<li>Built-in USB trace functionality for USB debug.</li>
<li>Built-in <a href="UsbTrace.html">USB trace</a> functionality for USB debug.</li>
</p>
</tr>
@ -2043,6 +2043,8 @@ nuttx-5.18 2011-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
* examples/nsh -- Correct an usage of getopt(): If you stop calling getopt()
before all parameters are parsed, you can leave getopt() in a strange state.
* Rename arch/pjrc-8051 to arch/8051
* configs/ne64badge -- Add a configuration for the Future Electronics Group
NE64 Badge development board (Freescale MC9S12NE64)
pascal-2.1 2011-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
@ -2109,6 +2111,10 @@ buildroot-1.10 2011-xx-xx <spudmonkey@racsa.co.cr>
<td valign="top" width="22"><img height="20" width="20" src="favicon.ico"></td>
<td><a href="TODO.txt">To-Do List</a></td>
</tr>
<tr>
<td valign="top" width="22"><img height="20" width="20" src="favicon.ico"></td>
<td><a href="UsbTrace.html">USB Device Driver Tracing</a></td>
</tr>
</center></ul>
<small>

View File

@ -12,7 +12,7 @@
<h1><big><font color="#3c34ec">
<i>NuttX RTOS Porting Guide</i>
</font></big></h1>
<p>Last Updated: February 24, 2011</p>
<p>Last Updated: February 25, 2011</p>
</td>
</tr>
</table>
@ -2457,6 +2457,13 @@ extern void up_ledoff(int led);
All structures and APIs needed to work with USB device-side drivers are provided in this header file.
</p>
</li>
<li>
<p>
<b><code>include/nuttx/usb/usbdev_trace.h</code></b>.
Declarations needed to work the the NuttX USB device driver trace capability.
That USB trace capability is detailed in <a href="UsbTrace.html">separate document</a>.
</p>
</li>
<li>
<p>
<b><code>struct usbdev_s</code></b>.

332
nuttx/Documentation/UsbTrace.html Executable file
View File

@ -0,0 +1,332 @@
<html>
<head>
<title>README Files</title>
</head>
<body background="backgd.gif">
<hr><hr>
<table width ="100%">
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttX USB Device Trace</i></font></big></h1>
<p>Last Updated: February 25, 2010</p>
</td>
</tr>
</table>
<hr><hr>
<p><b>USB Device Tracing Controls</b>.
The NuttX USB device subsystem supports a fairly sophisticated tracing facility.
The basic trace cabability is controlled by these NuttX configuration settings:
</p>
<ul>
<li><code>CONFIG_USBDEV_TRACE</code>: Enables USB tracing</li>
<li><code>CONFIG_USBDEV_TRACE_NRECORDS</code>: Number of trace entries to remember</li>
</ul>
<p><b>Trace IDs</b>.
The trace facility works like this:
When enabled, USB events that occur in either the USB device driver or in the USB class driver are logged.
These events are described in <code>include/nuttx/usb/usbdev_trace.h</code>.
The logged events are identified by a set of event IDs:
</p>
<ul><table>
<tr>
<td><code>TRACE_INIT_ID</code></td>
<td>Initialization events</td>
</tr>
<tr>
<td><code>TRACE_EP_ID</code></td>
<td>Endpoint API calls</td>
</tr>
<tr>
<td><code>TRACE_DEV_ID</code></td>
<td>USB device API calls</td>
</tr>
<tr>
<td><code>TRACE_CLASS_ID</code></td>
<td>USB class driver API calls</td>
</tr>
<tr>
<td><code>TRACE_CLASSAPI_ID</code></td>
<td>Other class driver system API calls</td>
</tr>
<tr>
<td><code>TRACE_CLASSSTATE_ID</code></td>
<td>Track class driver state changes</td>
</tr>
<tr>
<td><code>TRACE_INTENTRY_ID</code></td>
<td>Interrupt handler entry</td>
</tr>
<tr>
<td><code>TRACE_INTDECODE_ID</code></td>
<td>Decoded interrupt event</td>
</tr>
<tr>
<td><code>TRACE_INTEXIT_ID</code></td>
<td>Interrupt handler exit</td>
</tr>
<tr>
<td><code>TRACE_OUTREQQUEUED_ID</code></td>
<td>Request queued for OUT endpoint</td>
</tr>
<tr>
<td><code>TRACE_INREQQUEUED_ID</code></td>
<td>Request queued for IN endpoint</td>
</tr>
<tr>
<td><code>TRACE_READ_ID</code></td>
<td>Read (OUT) action</td>
</tr>
<tr>
<td><code>TRACE_WRITE_ID</code></td>
<td>Write (IN) action</td>
</tr>
<tr>
<td><code>TRACE_COMPLETE_ID</code></td>
<td>Request completed</td>
</tr>
<tr>
<td><code>TRACE_DEVERROR_ID</code></td>
<td>USB controller driver error event</td>
</tr>
<tr>
<td><code>TRACE_CLSERROR_ID</code></td>
<td>USB class driver error event</td>
</tr>
</table></ul>
<p><b>Logged Events</b>.
Each logged event is 32-bits in size and includes
</p>
<ol>
<li>8-bits of the trace ID (values associated with the above)</li>
<li>8-bits of additional trace ID data, and</li>
<li>16-bits of additonal data.</li>
</ol>
<p><b>8-bit Trace Data</b>
The 8-bit trace data depends on the specific event ID. As examples,
</p>
<ul>
<li>
For the USB serial and mass storage class, the 8-bit event data is provided in <code>include/nuttx/usb/usbdev_trace.h</code>.
</li>
<li>
For the USB device driver, that 8-bit event data is provided within the USB device driver itself.
So, for example, the 8-bit event data for the LPC1768 USB device driver is found in <code>arch/arm/src/lpc17xx/lpc17_usbdev.c</code>.
</li>
</ul>
<p><b>16-bit Trace Data</b>.
The 16-bit trace data provided additional context data relevant to the specific logged event.
</p>
<p><b>Trace Control Interfaces</b>.
Logging of each of these kinds events can be enabled or disabled using the interfaces described in <code>include/nuttx/usb/usbdev_trace.h</code>.
</p>
<p><b>Enabling USB Device Tracing</b>.
USB device tracing will be configured if <code>CONFIG_USBDEV</code> and either of the following are set in the NuttX configuration file:
</p>
<ul>
<li><code>CONFIG_USBDEV_TRACE</code>, or</li>
<li><code>CONFIG_DEBUG and CONFIG_DEBUG_USB</code></li>
</ul>
<p><b>Log Data Sink</b>.
The logged data itself may go to either (1) an internal circular buffer, or (2) may be provided on the console.
If <code>CONFIG_USBDEV_TRACE</code> is defined, then the trace data will go to the circular buffer.
The size of the circular buffer is determined by <code>CONFIG_USBDEV_TRACE_NRECORDS</code>.
Otherwise, the trace data goes to console.
<p>
<p><b>Example</b>.
Here is an example of USB trace output using <code>examples/usbserial</code> for an LPC1768 platform with the following NuttX configuration settings:
</p>
<ul>
<li><code>CONFIG_DEBUG</code>, <code>CONFIG_DEBUG_VERBOSE</code>, <code>CONFIG_USB</code>
<li><code>CONFIG_EXAMPLES_USBSERIAL_TRACEINIT</code>, <code>CONFIG_EXAMPLES_USBSERIAL_TRACECLASS</code>,
<code>CONFIG_EXAMPLES_USBSERIAL_TRACETRANSFERS</code>, <code>CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER</code>,
<code>CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS</code>
</ul>
<p>Console Output:</p>
<ul><table>
<tr>
<td align="center">&nbsp;</td>
<td align="left"><code>ABDE</code></td>
</tr>
<tr>
<td align="center">&nbsp;</td>
<td align="left"><code>user_start: Registering USB serial driver</code></td>
</tr>
<tr>
<td align="center">&nbsp;</td>
<td align="left"><code>uart_register: Registering /dev/ttyUSB0</code></td>
</tr>
<tr>
<td align="center">&nbsp;</td>
<td align="left"><code>user_start: Successfully registered the serial driver</code></td>
</tr>
<tr>
<td align="center">1</td>
<td align="left"><code>Class API call 1: 0000</code></td>
</tr>
<tr>
<td align="center">2</td>
<td align="left"><code>Class error: 19:0000</code></td>
</tr>
<tr>
<td align="center">&nbsp;</td>
<td align="left"><code>user_start: ERROR: Failed to open /dev/ttyUSB0 for reading: 107</code></td>
</tr>
<tr>
<td align="center">&nbsp;</td>
<td align="left"><code>user_start: Not connected. Wait and try again.</code></td>
</tr>
<tr>
<td align="center">3</td>
<td align="left"><code>Interrupt 1 entry: 0039</code></td>
</tr>
<tr>
<td align="center">4</td>
<td align="left"><code>Interrupt decode 7: 0019</code></td>
</tr>
<tr>
<td align="center">5</td>
<td align="left"><code>Interrupt decode 32: 0019</code></td>
</tr>
<tr>
<td align="center">6</td>
<td align="left"><code>Interrupt decode 6: 0019</code></td>
</tr>
<tr>
<td align="center">7</td>
<td align="left"><code>Class disconnect(): 0000</code></td>
</tr>
<tr>
<td align="center">8</td>
<td align="left"><code>Device pullup(): 0001</code></td>
</tr>
<tr>
<td align="center">9</td>
<td align="left"><code>Interrupt 1 exit: 0000</code></td>
</tr>
</table></ul>
<p>
The numbered items are USB USB trace output.
You can look in the file <code>drivers/usbdev/usbdev_trprintf.c</code> to see examctly how each output line is formatted.
Here is how each line should be interpreted:
</p>
<ul><table>
<tr>
<th align="center">&nbsp</th>
<td align="left">USB EVENT ID</td>
<td align="right">8-bit<br>EVENT<br>DATA</td>
<td align="left">MEANING</td>
<td align="left">16-bit<br>EVENT<br>DATA</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left"><code>TRACE_CLASSAPI_ID</code><sup>1</sup></td>
<td align="right">1</td>
<td align="left"><code>USBSER_TRACECLASSAPI_SETUP</code><sup>1</sup></td>
<td align="left">0000</td>
</tr>
<tr>
<td align="center">2</td>
<td align="left"><code>TRACE_CLSERROR_ID</code><sup>1</sup></td>
<td align="right">19</td>
<td align="left"><code>USBSER_TRACEERR_SETUPNOTCONNECTED</code><sup>1</sup></td>
<td align="left">0000</td>
</tr>
<tr>
<td align="center">3</td>
<td align="left"><code>TRACE_INTENTRY_ID</code><sup>1</sup></td>
<td align="right">1</td>
<td align="left"><code>LPC17_TRACEINTID_USB</code><sup>2</sup></td>
<td align="left">0039</td>
</tr>
<tr>
<td align="center">4</td>
<td align="left"><code>TRACE_INTDECODE_ID</code><sup>2</sup></td>
<td align="right">7</td>
<td align="left"><code>LPC17_TRACEINTID_DEVSTAT</code><sup>2</sup></td>
<td align="left">0019</td>
</tr>
<tr>
<td align="center">5</td>
<td align="left"><code>TRACE_INTDECODE_ID</code><sup>2</sup></td>
<td align="right">32</td>
<td align="left"><code>LPC17_TRACEINTID_SUSPENDCHG</code><sup>2</sup></td>
<td align="left">0019</td>
</tr>
<tr>
<td align="center">6</td>
<td align="left"><code>TRACE_INTDECODE_ID</code><sup>2</sup></td>
<td align="right">6</td>
<td align="left"><code>LPC17_TRACEINTID_DEVRESET</code><sup>2</sup></td>
<td align="left">0019</td>
</tr>
<tr>
<td align="center">7</td>
<td align="left"><code>TRACE_CLASS_ID</code><sup>1</sup></td>
<td align="right">3</td>
<td align="left"><code>(See TRACE_CLASSDISCONNECT</code><sup>1</sup>)</td>
<td align="left">0000</td>
</tr>
<tr>
<td align="center">8</td>
<td align="left"><code>TRACE_DEV_ID</code><sup>1</sup></td>
<td align="right">6</td>
<td align="left"><code>(See TRACE_DEVPULLUP</code><sup>1</sup>)</td>
<td align="left">0001</td>
</tr>
<tr>
<td align="center">9</td>
<td align="left"><code>TRACE_INTEXIT_ID</code><sup>1</sup></td>
<td align="right">1</td>
<td align="left"><code>LPC17_TRACEINTID_USB</code><sup>2</sup></td>
<td align="left">0000</td>
</tr>
</table>
<p><small><b>NOTES</b>:<br>
<sup>1</sup>See <code>include/nuttx/usb/usbdev_trace.h</code><br>
<sup>2</sup><code>See arch/arm/src/lpc17xx/lpc17_usbdev.c</code>
</small></p>
</ul>
<p>
In the above example you can see that:
</p>
<ul>
<li><b>1</b>.
The serial class USB setup method was called for the USB serial class.
This is the corresponds to the following logic in <code>drivers/usbdev/usbdev_serial.c</code>:
<ul><pre>
static int usbser_setup(FAR struct uart_dev_s *dev)
{
...
usbtrace(USBSER_CLASSAPI_SETUP, 0);
...
</pre></ul>
</li>
<li><b>2</b>.
An error occurred while processing the setup command because no configuration has yet been selected by the host.
This corresponds to the following logic in <code>drivers/usbdev/usbdev_serial.c</code>:
<ul><pre>
static int usbser_setup(FAR struct uart_dev_s *dev)
{
...
/* Check if we have been configured */
if (priv->config == USBSER_CONFIGIDNONE)
{
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_SETUPNOTCONNECTED), 0);
return -ENOTCONN;
}
...
</pre></ul>
<li><b>3-6</b>.
Here is a USB interrupt that suspends and resets the device.
</li>
<li><b>7-8</b>.
During the interrupt processing the serial class is disconnected
</li>
<li><b>9</b>.
And the interrupt returns
</li>
</ul>
</body>
</html>

View File

@ -895,7 +895,7 @@ configs/c5471evm
configs/demo9s12ne64
Feescale DMO9S12NE64 board based on the MC9S12NE64 hcs12 cpu. This
port uses the m68hc12 GCC toolchain. STATUS: Under development.
port uses the m9s12x GCC toolchain. STATUS: Under development.
configs/ea3131
Embedded Artists EA3131 Development bard. This board is based on the
@ -943,6 +943,11 @@ configs/mx1ads
STATUS: This port is nearly code complete but still under development
(work is stalled until I devote time to the Micromint Eagle-100)
configs/ne64badge
Future Electronics Group NE64 /PoE Badge board based on the
MC9S12NE64 hcs12 cpu. This port uses the m9s12x GCC toolchain.
STATUS: Under development.
configs/ntosd-dm320
This port uses the Neuros OSD v1.0 Dev Board with a GNU arm-elf
toolchain*: see

View File

@ -284,7 +284,7 @@ HCS12/DEMO9S12NEC64-specific Configuration Options
CONFIG_ARCH_BOARD_name - For use in C code
CONFIG_ARCH_BOARD_DEMOS92S12NEC64 (for the Spectrum Digital C5471 EVM)
CONFIG_ARCH_BOARD_DEMOS92S12NEC64 (for the Freescale DEMO9S12NE64 development board)
CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation
of delay loops

View File

@ -44,7 +44,7 @@
#include <debug.h>
#include <errno.h>
#include "demo9sne64.h"
#include "demo9s12ne64.h"
/****************************************************************************
* Pre-Processor Definitions

View File

@ -0,0 +1,471 @@
README
^^^^^^
This README discusses issues unique to NuttX configurations for the
Future Electronics Group NE64 /PoE Badge board based on the
MC9S12NE64 hcs12 cpu.
CONTENTS
^^^^^^^^
• MC9S12NE64 Features
• NE64 Badge Pin Usage
• Development Environment
• NuttX Buildroot Toolchain
• FreeScale HCS12 Serial Monitor
• Soft Registers
• HCS12/NE64BADGE-specific Configuration Options
• Configurations
MC9S12NE64 Features
^^^^^^^^^^^^^^^^^^^
• 16-bit HCS12 core
- HCS12 CPU
- Upward compatible with M68HC11 instruction set
- Interrupt stacking and programmers model identical to M68HC11
- Instruction queue
- Enhanced indexed addressing
- Memory map and interface (MMC)
- Interrupt control (INT)
- Background debug mode (BDM)
- Enhanced debug12 module, including breakpoints and change-of-flow
trace buffer (DBG)
- Multiplexed expansion bus interface (MEBI) - available only in
112-pin package version
• Wakeup interrupt inputs
- Up to 21 port bits available for wakeup interrupt function with
digital filtering
• Memory
- 64K bytes of FLASH EEPROM
- 8K bytes of RAM
• Analog-to-digital converter (ATD)
- One 8-channel module with 10-bit resolution
- External conversion trigger capability
• Timer module (TIM)
- 4-channel timer
- Each channel configurable as either input capture or output
compare
- Simple PWM mode
- Modulo reset of timer counter
- 16-bit pulse accumulator
- External event counting
- Gated time accumulation
• Serial interfaces
- Two asynchronous serial communications interface (SCI)
- One synchronous serial peripheral interface (SPI)
- One inter-IC bus (IIC)
• Ethernet Media access controller (EMAC)
- IEEE 802.3 compliant
- Medium-independent interface (MII)
- Full-duplex and half-duplex modes
- Flow control using pause frames
- MII management function
- Address recognition
- Frames with broadcast address are always accepted or always
rejected
- Exact match for single 48-bit individual (unicast) address
- Hash (64-bit hash) check of group (multicast) addresses
- Promiscuous mode
• Ethertype filter
• Loopback mode
• Two receive and one transmit Ethernet buffer interfaces
• Ethernet 10/100 Mbps transceiver (EPHY)
- IEEE 802.3 compliant
- Digital adaptive equalization
- Half-duplex and full-duplex
- Auto-negotiation next page ability
- Baseline wander (BLW) correction
- 125-MHz clock generator and timing recovery
- Integrated wave-shaping circuitry
- Loopback modes
• CRG (clock and reset generator module)
- Windowed COP watchdog
- Real-time interrupt
- Clock monitor
- Pierce oscillator
- Phase-locked loop clock frequency multiplier
- Limp home mode in absence of external clock
- 25-MHz crystal oscillator reference clock
• Operating frequency
- 50 MHz equivalent to 25 MHz bus speed for single chip
- 32 MHz equivalent to 16 MHz bus speed in expanded bus modes
• Internal 2.5-V regulator
- Supports an input voltage range from 3.3 V ± 5%
- Low-power mode capability
- Includes low-voltage reset (LVR) circuitry
• 80-pin TQFP-EP or 112-pin LQFP package
- Up to 70 I/O pins with 3.3 V input and drive capability (112-pin
package)
- Up to two dedicated 3.3 V input only lines (IRQ, XIRQ)
• Development support
- Single-wire background debug™ mode (BDM)
- On-chip hardware breakpoints
- Enhanced DBG debug features
NE64 Badge Pin Usage
^^^^^^^^^^^^^^^^^^^^
PIN PIN NAME BOARD SIGNAL NOTES
--- ------------------- -------------- ----------------------
44 RESET J3 RESET_L Also to SW3
57 BKGD/MODC/TAGHI_B BDM BKGD CON6A
86 PAD1 J3 ANALOG_IN0 Not used on board
87 PAD2 J3 ANALOG_IN1 " " " " "" " "
88 PAD3 J3 ANALOG_IN2 " " " " "" " "
89 PAD4 J3 ANALOG_IN3 " " " " "" " "
70 PHY_TXP J7 TD+ RJ45 connector
71 PHY_TXN J7 TD- RJ45 connector
73 PHY_RXP J7 RD+ RJ45 connector
74 PHY_RXN J7 RD- RJ45 connector
51 PL6/TXER/KWL6 N/C N/C
52 PL5/TXDV/KWL5 N/C N/C
58 PL4/COLLED Collision LED red
59 PL3/DUPLED Full Duplex LED yellow
81 PL2/SPDLED 100Mbps Speed LED yellow
83 PL1/LNKLED Link Good LED green
84 PL0/ACTLED Activity LED yellow
60 PA0/ADDR8/DATA8 J3 ADDR_DATA8 Not used on board
61 PA1/ADDR9/DATA9 J3 ADDR_DATA9 " " " " "" " "
62 PA2/ADDR10/DATA10 J3 ADDR_DATA10 " " " " "" " "
63 PA3/ADDR11/DATA11 J3 ADDR_DATA11 " " " " "" " "
77 PA4/ADDR12/DATA12 J3 ADDR_DATA12 " " " " "" " "
78 PA5/ADDR13/DATA13 J3 ADDR_DATA13 " " " " "" " "
79 PA6/ADDR14/DATA14 J3 ADDR_DATA14 " " " " "" " "
80 PA7/ADDR15/DATA15 J3 ADDR_DATA15 " " " " "" " "
10 PB0/ADDR0/DATA0 J3 ADDR_DATA0 Not used on board
11 PB1/ADDR1/DATA1 J3 ADDR_DATA1 " " " " "" " "
12 PB2/ADDR2/DATA2 J3 ADDR_DATA2 " " " " "" " "
13 PB3/ADDR3/DATA3 J3 ADDR_DATA3 " " " " "" " "
16 PB4/ADDR4/DATA4 J3 ADDR_DATA4 " " " " "" " "
17 PB5/ADDR5/DATA5 J3 ADDR_DATA5 " " " " "" " "
18 PB6/ADDR6/DATA6 J3 ADDR_DATA6 " " " " "" " "
19 PB7/ADDR7/DATA7 J3 ADDR_DATA7 " " " " "" " "
97 PK0/XADR14 N/C N/C
98 PK1/XADR15 N/C N/C
99 PK2/XADR16 N/C N/C
100 PK3/XADR17 N/C N/C
103 PK4/XADR18 N/C N/C
104 PK5/XADR19 N/C N/C
105 PK6/XCS_B J3 XCS Not used on board
106 PK7/ECS_B/ROMCTL J3 ECS " " " " "" " "
56 PE0/XIRQ_B BUTTON1 SW1
55 PE1/IRQ_B J3 IRQ Not used on board
54 PE2/R_W J3 RW " " " " "" " "
53 PE3/LSTRB_B/TAGLO_B J3 LSTRB " " " " "" " "
41 PE4/ECLK J3 ECLK " " " " "" " "
40 PE5/IPIPE0/MODA J3 MODA " " " " "" " "
39 PE6/IPIPE1/MODB J3 MODB " " " " "" " "
38 PE7/NOACC/XCLKS_B pulled low pulled low
110 PT4/IOC1_4 J3 GPIO8 Not used on board
109 PT5/IOC1_5 J3 GPIO9 " " " " "" " "
108 PT6/IOC1_6 J3 GPIO10 " " " " "" " "
107 PT7/IOC1_7 N/C N/C
22 PG0/RXD0/KWG0 J3 GPIO0 Not used on board
23 PG1/RXD1/KWG1 J3 GPIO1 " " " " "" " "
24 PG2/RXD2/KWG2 J3 GPIO2 " " " " "" " "
25 PG3/RXD3/KWG3 J3 GPIO3 " " " " "" " "
26 PG4/RXCLK/KWG4 J3 GPIO4 " " " " "" " "
27 PG5/RXDV/KWG5 J3 GPIO5 " " " " "" " "
28 PG6/RXER/KWG6 J3 GPIO6 " " " " "" " "
29 PG7/KWG7 J3 GPIO7 " " " " "" " "
8 PJ0/MDC/KWJ0 LED1 D21, red
9 PJ1/MDIO/KWJ1 LED2 D22, red
20 PJ2/CRS/KWJ2 J3 SPI_CS Not used on board
21 PJ3/COL/KWJ3 N/C
112 PJ6/SDA/KWJ6 J3 I2C_DATA Not used on board
111 PJ7/SCL/KWJ7 J3 I2C_CLOCK " " " " "" " "
30 PS0/RXD0 RS232_RX Eventually maps to J2 RXD
31 PS1/TXD0 RS232_TX Eventually maps to J2 TXD
32 PS2/RXD1 J3&J4 UART_RX Not used on board
33 PS3/TXD1 J3&J4 UART_TX " " " " "" " "
34 PS4/MISO J3 SPI_MISO " " " " "" " "
35 PS5/MOSI J3 SPI_MOSI " " " " "" " "
36 PS6/SCK J3 SPI_CLOCK " " " " "" " "
37 PS7/SS_B J3 SPI_SS " " " " "" " "
7 PH0/TXD0/KWH0 N/C N/C
6 PH1/TXD1/KWH1 N/C N/C
5 PH2/TXD2/KWH2 J4 XBEE_RESET Not used on board
4 PH3/TXD3/KWH3 J4 XBEE_RSSI Not used on board
3 PH4/TXCLK/KWH4 BUTTON2 SW2
2 PH5/TXDV/KWH5 J5 XBEE_LOAD_H Not used on board
1 PH6/TXER/KWH6 J4 XBEE_LOAD_L Not used on board
Development Environment
^^^^^^^^^^^^^^^^^^^^^^^
Either Linux or Cygwin on Windows can be used for the development
environment. The source has been built only using the GNU toolchain
(see below). Other toolchains will likely cause problems.
NuttX Buildroot Toolchain
^^^^^^^^^^^^^^^^^^^^^^^^^
A GNU GCC-based toolchain is assumed. The files */setenv.sh should
be modified to point to the correct path to the HC12 GCC toolchain (if
different from the default in your PATH variable).
If you have no HC12 toolchain, one can be downloaded from the NuttX
SourceForge download site (https://sourceforge.net/project/showfiles.php?group_id=189573).
This GNU toolchain builds and executes in the Linux or Cygwin
environments.
1. You must have already configured Nuttx in <some-dir>/nuttx.
cd tools
./configure.sh ne64badge/<sub-dir>
2. Download the latest buildroot package into <some-dir>
3. unpack the buildroot tarball. The resulting directory may
have versioning information on it like buildroot-x.y.z. If so,
rename <some-dir>/buildroot-x.y.z to <some-dir>/buildroot.
4. cd <some-dir>/buildroot
5. cp configs/m9s12x-defconfig-3.3.6 .config
6. make oldconfig
7. make
If the make fails because it can't find the file to download, you may
have to locate the file on the internet and download it into the archives/
directory manually. For example, binutils-2.18 can be found here:
http://ftp.gnu.org/gnu/binutils/
8. Edit setenv.h, if necessary, so that the PATH variable includes
the path to the newly built binaries.
See the file configs/README.txt in the buildroot source tree. That has more
detailed PLUS some special instructions that you will need to follow if you are
building a Cortex-M3 toolchain for Cygwin under Windows.
FreeScale HCS12 Serial Monitor
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
General:
The NuttX HCS12 port is configured to use the Freescale HCS serial
monitor. This monitor supports primitive debug commands that allow
FLASH/EEPROM programming and debugging through an RS-232 serial
interface. The serial monior is 2Kb in size and resides in FLASH at
addresses 0xf800-0xffff. The monitor does not use any RAM other than
the stack itself.
AN2458
The serial monitor is described in detail in Freescale Application
Note AN2458.pdf.
COP:
The serial monitor uses the COP for the cold reset function and should
not be used by the application without some precautions (see AN2458).
Clocking:
The serial monitor sets the operating frequency to 24 MHz. This is
not altered by the NuttX start-up; doing so would interfere with the
operation of the serial monitor.
Memory Configuration:
Registers:
• Register space is located at 0x00000x03ff.
FLASH:
• FLASH memory is any address greater than 0x4000. All paged
addresses are assumed to be FLASH memory.
• Application code should exclude the 0xf7800xff7f memory.
SRAM:
• RAM ends at 0x3FFF and builds down to the limit of the devices
available RAM.
• The serial monitor's stack pointer is set to the end of RAM+1
(0x4000).
EEPROM:
• EEPROM (if the target device has any) is limited to the available
space between the registers and the RAM (0x0400to start of RAM).
External Devices:
• External devices attached to the multiplexed external bus
interface are not supported
Serial Communications:
The serial monitor uses RS-232 serial communications through SCI0 at
115,200 baud. The monitor must have exclusive use of this interface.
Access to the serial port is available through a monitor jump table.
Interrrupts:
The serial monitor redirects interrupt vectors to an unprotected
portion of FLASH just before the protected monitor program
(0xf7800xf7fe). The monitor will automatically redirect vector
programming operations to these user vectors. The user code should
therefore keep the normal (non-monitor) vector locations
(0xff800xfffe).
Soft Registers
^^^^^^^^^^^^^^
The mc68hcs12 compilation is prone to errors like the following:
CC: lib_b16sin.c
lib_b16sin.c: In function `b16sin':
lib_b16sin.c:110: error: unable to find a register to spill in class `S_REGS'
lib_b16sin.c:110: error: this is the insn:
(insn:HI 41 46 44 8 (parallel [
(set (subreg:SI (reg:DI 58 [ rad ]) 4)
(reg/v:SI 54 [ rad ]))
(clobber (scratch:HI))
]) 20 {movsi_internal} (insn_list 46 (nil))
(expr_list:REG_UNUSED (scratch:HI)
(expr_list:REG_NO_CONFLICT (reg/v:SI 54 [ rad ])
(nil))))
lib_b16sin.c:110: confused by earlier errors, bailing out
There are several ways that this error could be fixed:
1. Increase the number of soft registers (i.e., "fake" registers defined
at fixed memory locations). This can be done by adding something like
-msoft-reg-count=4 to the CFLAGS. This approach was not taken
because:
- This slows hcs12 performance
- All of these soft registers wouil have to be saved and restored
on every interrupt and context switch.
2. Lowering the optimization level by dropping -Os to -O2 or, more likely,
by removing -fomit-frame-pointer. Also not desireable becauase 99% of the
files that do not have this problem also increase in size. Special case
compilation with reduced optimization levels just for the files that need
it could be done, but this would complicate the make system.
3. Restructuring files to reduce the complexity. If you add local variables
to hold intermediate computational results, this error can be eliminated.
This is the approach taken in NuttX. It has disadvantages only in that
(1) it takes some effort and good guessing to eliminate the problem, and (2)
the problem is not really eliminated -- it can and will re-occur when files
are changed or new files are added.
4. Many files are built that are needed by DEM09S12NE64. Another very simple
option if those problem files are needed is to just remove the offending
files from the Make.defs file so that they no longer cause a problem.
HCS12/NE64BADGE-specific Configuration Options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
CONFIG_ARCH - Identifies the arch/ subdirectory. This should
be set to:
CONFIG_ARCH=hc
CONFIG_ARCH_family - For use in C code:
CONFIG_ARCH_HC=y
CONFIG_ARCH_architecture - For use in C code:
CONFIG_ARCH_HCS12=y
CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory
CONFIG_ARCH_CHIP=mc92s12nec64
CONFIG_ARCH_CHIP_name - For use in C code
CONFIG_ARCH_CHIP_MCS92S12NEC64
CONFIG_ARCH_BOARD - Identifies the configs subdirectory and
hence, the board that supports the particular chip or SoC.
CONFIG_ARCH_BOARD=ne64badge
CONFIG_ARCH_BOARD_name - For use in C code
CONFIG_ARCH_BOARD_NE64BADGE (for the Future Electronics Group NE64 Badge)
CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation
of delay loops
CONFIG_ENDIAN_BIG - define if big endian (default is little
endian)
CONFIG_DRAM_SIZE - Describes the installed RAM.
CONFIG_DRAM_START - The start address of installed RAM
CONFIG_DRAM_END - Should be (CONFIG_DRAM_START+CONFIG_DRAM_SIZE)
CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to boards that
have LEDs
CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
stack. If defined, this symbol is the size of the interrupt
stack in bytes. If not defined, the user task stacks will be
used during interrupt handling.
CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions
CONFIG_ARCH_CALIBRATION - Enables some build in instrumentation that
cause a 100 second delay during boot-up. This 100 second delay
serves no purpose other than it allows you to calibratre
CONFIG_ARCH_LOOPSPERMSEC. You simply use a stop watch to measure
the 100 second delay then adjust CONFIG_ARCH_LOOPSPERMSEC until
the delay actually is 100 seconds.
HCS12 build options:
CONFIG_HCS12_SERIALMON - Indicates that the target systems uses
the Freescale serial bootloader.
CONFIG_HCS12_NONBANKED - Indicates that the target systems does not
support banking. Only short calls are made; one fixed page is
presented the the paging window. Only 48Kb of FLASH is usable
in this configuration: pages 3e, 3d, then 3f will appear as a
contiguous address space in memory.
HCS12 Sub-system support
CONFIG_HCS12_SCI0
CONFIG_HCS12_SCI1
HCS12 specific device driver settings:
CONFIG_SCIn_SERIAL_CONSOLE - selects SCIn for the console and ttys0
(default is the SCI0).
CONFIG_SCIn_RXBUFSIZE - Characters are buffered as received.
This specific the size of the receive buffer
CONFIG_SCIn_TXBUFSIZE - Characters are buffered before
being sent. This specific the size of the transmit buffer
CONFIG_SCIn_BAUD - The configure BAUD of the UART.
CONFIG_SCIn_BITS - The number of bits. Must be either 7 or 8.
CONFIG_SCIn_PARTIY - 0=no parity, 1=odd parity, 2=even parity, 3=mark 1, 4=space 0
CONFIG_SCIn_2STOP - Two stop bits
Configurations
^^^^^^^^^^^^^^
Each Freescale HCS12 configuration is maintained in a sudirectory and
can be selected as follow:
cd tools
./configure.sh ne64badge/<subdir>
cd -
. ./setenv.sh
Where <subdir> is one of the following:
ostest:
This configuration directory, performs a simple OS test using
examples/ostest.

View File

@ -0,0 +1,143 @@
/************************************************************************************
* configs/ne64badge/include/board.h
* include/arch/board/board.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* 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.
*
************************************************************************************/
#ifndef __ARCH_BOARD_BOARD_H
#define __ARCH_BOARD_BOARD_H
/************************************************************************************
* Included Files
************************************************************************************/
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <stdint.h>
#endif
/************************************************************************************
* Definitions
************************************************************************************/
/* Clocking *************************************************************************/
/* Frequency of the crystal oscillator */
#define HCS12_OSCCLK 16000000 /* 16MHz */
/* PLL Settings
*
* SYNR register controls the multiplication factor of the PLL. If the PLL is on, the
* count in the loop divider (SYNR) register effectively multiplies up the PLL clock
* (PLLCLK) from the reference frequency by 2 x (SYNR+1). PLLCLK will not be below
* the minimum VCO frequency (fSCM).
*
* The REFDV register provides a finer granularity for the PLL multiplier steps. The
* count in the reference divider divides OSCCLK frequency by REFDV + 1.
*
* PLLCLK = 2 * OSCCLK * (SYNR + 1) / (REFDV + 1)
*
* If (PLLSEL = 1), Bus Clock = PLLCLK / 2
*/
#define HCS12_SYNR_VALUE 0x15
#define HCS12_REFDV_VALUE 0x15
#define HCS12_PLLCLK (2*HCS12_OSCCLK*(HCS12_SYNR+1)/(HCS12_REFDV+1))
#define HCS12_BUSCLK (HSC12_PLLCLK/2)
/* LED definitions ******************************************************************/
/* The NE64 Badge board has 2 red LEDs that we will encode as: */
#define LED_STARTED 1 /* LED1 */
#define LED_HEAPALLOCATE 1 /* LED1 */
#define LED_IRQSENABLED 1 /* LED1 */
#define LED_STACKCREATED 1 /* LED1 */
#define LED_INIRQ 2 /* LED1 + LED2 */
#define LED_SIGNAL 2 /* LED1 + LED2 */
#define LED_ASSERTION 2 /* LED1 + LED2 */
#define LED_PANIC 7 /* LED2 + N/C */
/* Button definitions ***************************************************************/
/************************************************************************************
* Public Data
************************************************************************************/
#ifndef __ASSEMBLY__
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
#else
#define EXTERN extern
#endif
/************************************************************************************
* Public Function Prototypes
************************************************************************************/
/************************************************************************************
* Name: hcs12_boardinitialize
*
* Description:
* All HCS12 architectures must provide the following entry point. This entry point
* is called early in the intitialization -- after all memory has been configured
* and mapped but before any devices have been initialized.
*
************************************************************************************/
EXTERN void hcs12_boardinitialize(void);
/************************************************************************************
* Button support.
*
* Description:
* up_buttoninit() must be called to initialize button resources. After that,
* up_buttons() may be called to collect the state of all buttons. up_buttons()
* returns an bit set with bits corresponding to the state of each button.
*
************************************************************************************/
#ifdef CONFIG_ARCH_BUTTONS
EXTERN void up_buttoninit(void);
EXTERN uint8_t up_buttons(void);
#endif
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_BOARD_BOARD_H */

View File

@ -0,0 +1,152 @@
############################################################################
# configs/ne64badge/ostest/Make.defs
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# 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
# NuttX buildroot under Linux or Cygwin
CROSSDEV = m9s12x-elf-
MAXOPTIMIZATION = -Os
WINTOOL = n
ifeq ($(CONFIG_HCS12_NONBANKED),y)
ARCHCPUFLAGS = -m9s12x -mshort -mnolong-calls
LDSCRIPT = ld.script.nonbanked
else
ARCHCPUFLAGS = -m9s12x -mshort -mlong-calls
LDSCRIPT = ld.script.banked
endif
ifneq ($(CONFIG_HCS12_MSOFTREGS),0)
ARCHCPUFLAGS += -msoft-reg-count=$(CONFIG_HCS12_MSOFTREGS)
endif
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)/ostest/$(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)/ostest/$(LDSCRIPT)
endif
CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E
LD = $(CROSSDEV)ld
AR = $(CROSSDEV)ar rcs
NM = $(CROSSDEV)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
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
ARCHDEFINES =
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) -pipe
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
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 =
LDFLAGS += -nostartfiles -nodefaultlibs
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 =

View File

@ -0,0 +1,763 @@
############################################################################
# configs/ne64badge/ostest/defconfig
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# 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.
#
############################################################################
#
# Architecture selection
#
# CONFIG_ARCH - identifies the arch subdirectory and, hence, the
# processor architecture.
# CONFIG_ARCH_family - for use in C code. This identifies the
# particular chip family that the architecture is implemented
# in.
# CONFIG_ARCH_architecture - for use in C code. This identifies the
# specific architecture within the chip familyl.
# CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory
# CONFIG_ARCH_CHIP_name - For use in C code
# CONFIG_ARCH_BOARD - identifies the configs subdirectory and, hence,
# the board that supports the particular chip or SoC.
# CONFIG_ARCH_BOARD_name - for use in C code
# CONFIG_ENDIAN_BIG - define if big endian (default is little endian)
# CONFIG_BOARD_LOOPSPERMSEC - for delay loops
# CONFIG_DRAM_SIZE - Describes the installed RAM.
# CONFIG_DRAM_START - The start address of RAM (physical)
# CONFIG_DRAM_END - Last address+1 of installed RAM
# CONFIG_ARCH_NOINTC - define if the architecture does not
# support an interrupt controller or otherwise cannot support
# APIs like up_enable_irq() and up_disable_irq().
# CONFIG_ARCH_IRQPRIO - The ST32F103Z supports interrupt prioritization
# CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
# stack. If defined, this symbol is the size of the interrupt
# stack in bytes. If not defined, the user task stacks will be
# used during interrupt handling.
# CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions
# CONFIG_ARCH_BOOTLOADER - Set if you are using a bootloader.
# CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to board architecture.
# CONFIG_ARCH_BUTTONS - Enable support for buttons. Unique to board architecture.
# CONFIG_ARCH_CALIBRATION - Enables some build in instrumentation that
# cause a 100 second delay during boot-up. This 100 second delay
# serves no purpose other than it allows you to calibrate
# CONFIG_BOARD_LOOPSPERMSEC. You simply use a stop watch to measure
# the 100 second delay then adjust CONFIG_BOARD_LOOPSPERMSEC until
# the delay actually is 100 seconds.
# CONFIG_ARCH_DMA - Support DMA initialization
#
CONFIG_ARCH=hc
CONFIG_ARCH_HC=y
CONFIG_ARCH_HCS12=y
CONFIG_ARCH_CHIP=m9s12
CONFIG_ARCH_CHIP_MCS92S12NEC64=y
CONFIG_ARCH_BOARD=ne64badge
CONFIG_ARCH_BOARD_NE64BADGE=y
CONFIG_BOARD_LOOPSPERMSEC=5483
CONFIG_DRAM_SIZE=0x00010000
CONFIG_DRAM_START=0x20000000
CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE)
CONFIG_ARCH_NOINTC=y
CONFIG_ARCH_IRQPRIO=n
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=y
CONFIG_ARCH_LEDS=y
CONFIG_ARCH_BUTTONS=n
CONFIG_ARCH_CALIBRATION=n
CONFIG_ARCH_DMA=n
#
# HCS12 build options:
#
# CONFIG_HCS12_SERIALMON - Indicates that the target systems uses
# the Freescale serial bootloader.
# CONFIG_HCS12_NONBANKED - Indicates that the target systems does not
# support banking. Only short calls are made; one fixed page is
# presented the the paging window. Only 48Kb of FLASH is usable
# in this configuration: pages 3e, 3d, then 3f will appear as a
# contiguous address space in memory.
#
CONFIG_HCS12_SERIALMON=y
CONFIG_HCS12_NONBANKED=y
#
# CS12 Sub-system support
#
CONFIG_HCS12_SCI0=n
CONFIG_HCS12_SCI1=n
#
# MC9S12NEC64 specific serial device driver settings
#
# CONFIG_SCIn_SERIAL_CONSOLE - selects SCIn for the
# console and ttys0 (default is the SCIn).
# CONFIG_SCIn_RXBUFSIZE - Characters are buffered as received.
# This specific the size of the receive buffer
# CONFIG_SCIn_TXBUFSIZE - Characters are buffered before
# being sent. This specific the size of the transmit buffer
# CONFIG_SCIn_BAUD - The configure BAUD of the UART. Must be
# CONFIG_SCIn_BITS - The number of bits. Must be either 7 or 8.
# CONFIG_SCIn_PARTIY - 0=no parity, 1=odd parity, 2=even parity
# CONFIG_SCIn_2STOP - Two stop bits
#
CONFIG_SCI0_SERIAL_CONSOLE=n
CONFIG_SCI0_TXBUFSIZE=32
CONFIG_SCI0_RXBUFSIZE=32
CONFIG_SCI0_BAUD=115200
CONFIG_SCI0_BITS=8
CONFIG_SCI0_PARITY=0
CONFIG_SCI0_2STOP=0
CONFIG_SCI1_SERIAL_CONSOLE=n
CONFIG_SCI1_TXBUFSIZE=32
CONFIG_SCI1_RXBUFSIZE=32
CONFIG_SCI1_BAUD=115200
CONFIG_SCI1_BITS=8
CONFIG_SCI1_PARITY=0
CONFIG_SCI1_2STOP=0
#
# MC9S12NEC64 specific SSI device driver settings
#
# CONFIG_SPIn_DISABLE - select to disable all support for
# the SSI
# CONFIG_SPI_POLLWAIT - Select to disable interrupt driven SSI support
# Poll-waiting is recommended if the interrupt rate would be to
# high in the interrupt driven case.
# CONFIG_SPI_TXLIMIT - Write this many words to the Tx FIFO before
# emptying the Rx FIFO. If the SPI frequency is high and this
# value is large, then larger values of this setting may cause
# Rx FIFO overrun errors. Default: half of the Tx FIFO size (4).
#
CONFIG_SPI0_DISABLE=n
CONFIG_SPI1_DISABLE=y
CONFIG_SPI_POLLWAIT=y
#CONFIG_SPI_TXLIMIT=4
#
# General build options
#
# CONFIG_RRLOAD_BINARY - make the rrload binary format used with
# BSPs from www.ridgerun.com using the tools/mkimage.sh script
# CONFIG_INTELHEX_BINARY - make the Intel HEX binary format
# used with many different loaders using the GNU objcopy program
# Should not be selected if you are not using the GNU toolchain.
# CONFIG_MOTOROLA_SREC - make the Motorola S-Record binary format
# used with many different loaders using the GNU objcopy program
# Should not be selected if you are not using the GNU toolchain.
# CONFIG_RAW_BINARY - make a raw binary format file used with many
# different loaders using the GNU objcopy program. This option
# should not be selected if you are not using the GNU toolchain.
# CONFIG_HAVE_LIBM - toolchain supports libm.a
#
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
CONFIG_HAVE_LIBM=n
#
# General OS setup
#
# CONFIG_APP_DIR - Identifies the relative path to the directory
# that builds the application to link with NuttX.
# CONFIG_DEBUG - enables built-in debug options
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
# debug symbols (needed for use with a debugger).
# CONFIG_MM_REGIONS - If the architecture includes multiple
# regions of memory to allocate from, this specifies the
# number of memory regions that the memory manager must
# handle and enables the API mm_addregion(start, end);
# CONFIG_ARCH_LOWPUTC - architecture supports low-level, boot
# time console output
# CONFIG_TICKS_PER_MSEC - The default system timer is 100Hz
# or TICKS_PER_MSEC=10. This setting may be defined to
# inform NuttX that the processor hardware is providing
# system timer interrupts at some interrupt interval other
# than 10 msec.
# CONFIG_RR_INTERVAL - The round robin timeslice will be set
# this number of milliseconds; Round robin scheduling can
# be disabled by setting this value to zero.
# CONFIG_SCHED_INSTRUMENTATION - enables instrumentation in
# scheduler to monitor system performance
# CONFIG_TASK_NAME_SIZE - Spcifies that maximum size of a
# task name to save in the TCB. Useful if scheduler
# instrumentation is selected. Set to zero to disable.
# CONFIG_START_YEAR, CONFIG_START_MONTH, CONFIG_START_DAY -
# Used to initialize the internal time logic.
# CONFIG_GREGORIAN_TIME - Enables Gregorian time conversions.
# You would only need this if you are concerned about accurate
# time conversions in the past or in the distant future.
# CONFIG_JULIAN_TIME - Enables Julian time conversions. You
# would only need this if you are concerned about accurate
# time conversion in the distand past. You must also define
# CONFIG_GREGORIAN_TIME in order to use Julian time.
# CONFIG_DEV_CONSOLE - Set if architecture-specific logic
# provides /dev/console. Enables stdout, stderr, stdin.
# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console
# driver (minimul support)
# CONFIG_MUTEX_TYPES: Set to enable support for recursive and
# errorcheck mutexes. Enables pthread_mutexattr_settype().
# CONFIG_PRIORITY_INHERITANCE : Set to enable support for priority
# inheritance on mutexes and semaphores.
# CONFIG_SEM_PREALLOCHOLDERS: This setting is only used if priority
# inheritance is enabled. It defines the maximum number of
# different threads (minus one) that can take counts on a
# semaphore with priority inheritance support. This may be
# set to zero if priority inheritance is disabled OR if you
# are only using semaphores as mutexes (only one holder) OR
# if no more than two threads participate using a counting
# semaphore.
# CONFIG_SEM_NNESTPRIO. If priority inheritance is enabled,
# then this setting is the maximum number of higher priority
# threads (minus 1) than can be waiting for another thread
# to release a count on a semaphore. This value may be set
# to zero if no more than one thread is expected to wait for
# a semaphore.
# CONFIG_FDCLONE_DISABLE. Disable cloning of all file descriptors
# by task_create() when a new task is started. If set, all
# files/drivers will appear to be closed in the new task.
# CONFIG_FDCLONE_STDIO. Disable cloning of all but the first
# three file descriptors (stdin, stdout, stderr) by task_create()
# when a new task is started. If set, all files/drivers will
# appear to be closed in the new task except for stdin, stdout,
# and stderr.
# CONFIG_SDCLONE_DISABLE. Disable cloning of all socket
# desciptors by task_create() when a new task is started. If
# set, all sockets will appear to be closed in the new task.
# CONFIG_NXFLAT. Enable support for the NXFLAT binary format.
# This format will support execution of NuttX binaries located
# in a ROMFS filesystem (see examples/nxflat).
# CONFIG_SCHED_WORKQUEUE. Create a dedicated "worker" thread to
# handle delayed processing from interrupt handlers. This feature
# is required for some drivers but, if there are not complaints,
# can be safely disabled. The worker thread also performs
# garbage collection -- completing any delayed memory deallocations
# from interrupt handlers. If the worker thread is disabled,
# then that clean will be performed by the IDLE thread instead
# (which runs at the lowest of priority and may not be appropriate
# if memory reclamation is of high priority). If CONFIG_SCHED_WORKQUEUE
# is enabled, then the following options can also be used:
# CONFIG_SCHED_WORKPRIORITY - The execution priority of the worker
# thread. Default: 50
# CONFIG_SCHED_WORKPERIOD - How often the worker thread checks for
# work in units of microseconds. Default: 50*1000 (50 MS).
# CONFIG_SCHED_WORKSTACKSIZE - The stack size allocated for the worker
# thread. Default: CONFIG_IDLETHREAD_STACKSIZE.
# CONFIG_SIG_SIGWORK - The signal number that will be used to wake-up
# the worker thread. Default: 4
#
CONFIG_APP_DIR=examples/ostest
CONFIG_DEBUG=n
CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_SYMBOLS=n
CONFIG_MM_REGIONS=1
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_INSTRUMENTATION=n
CONFIG_TASK_NAME_SIZE=0
CONFIG_START_YEAR=2009
CONFIG_START_MONTH=12
CONFIG_START_DAY=11
CONFIG_GREGORIAN_TIME=n
CONFIG_JULIAN_TIME=n
CONFIG_DEV_CONSOLE=n
CONFIG_DEV_LOWCONSOLE=n
CONFIG_MUTEX_TYPES=n
CONFIG_PRIORITY_INHERITANCE=n
CONFIG_SEM_PREALLOCHOLDERS=0
CONFIG_SEM_NNESTPRIO=0
CONFIG_FDCLONE_DISABLE=n
CONFIG_FDCLONE_STDIO=n
CONFIG_SDCLONE_DISABLE=y
CONFIG_NXFLAT=n
CONFIG_SCHED_WORKQUEUE=n
CONFIG_SCHED_WORKPRIORITY=50
CONFIG_SCHED_WORKPERIOD=(50*1000)
CONFIG_SCHED_WORKSTACKSIZE=256
CONFIG_SIG_SIGWORK=4
#
# The following can be used to disable categories of
# APIs supported by the OS. If the compiler supports
# weak functions, then it should not be necessary to
# disable functions unless you want to restrict usage
# of those APIs.
#
# There are certain dependency relationships in these
# features.
#
# o mq_notify logic depends on signals to awaken tasks
# waiting for queues to become full or empty.
# o pthread_condtimedwait() depends on signals to wake
# up waiting tasks.
#
CONFIG_DISABLE_CLOCK=y
CONFIG_DISABLE_POSIX_TIMERS=y
CONFIG_DISABLE_PTHREAD=y
CONFIG_DISABLE_SIGNALS=y
CONFIG_DISABLE_MQUEUE=y
CONFIG_DISABLE_MOUNTPOINT=y
CONFIG_DISABLE_ENVIRON=y
CONFIG_DISABLE_POLL=y
#
# Misc libc settings
#
# CONFIG_NOPRINTF_FIELDWIDTH - sprintf-related logic is a
# little smaller if we do not support fieldwidthes
#
CONFIG_NOPRINTF_FIELDWIDTH=y
#
# Allow for architecture optimized implementations
#
# The architecture can provide optimized versions of the
# following to improve system performance
#
CONFIG_ARCH_MEMCPY=n
CONFIG_ARCH_MEMCMP=n
CONFIG_ARCH_MEMMOVE=n
CONFIG_ARCH_MEMSET=n
CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
CONFIG_ARCH_KFREE=n
#
# Sizes of configurable things (0 disables)
#
# CONFIG_MAX_TASKS - The maximum number of simultaneously
# active tasks. This value must be a power of two.
# CONFIG_MAX_TASK_ARGS - This controls the maximum number of
# of parameters that a task may receive (i.e., maxmum value
# of 'argc')
# CONFIG_NPTHREAD_KEYS - The number of items of thread-
# specific data that can be retained
# CONFIG_NFILE_DESCRIPTORS - The maximum number of file
# descriptors (one for each open)
# CONFIG_NFILE_STREAMS - The maximum number of streams that
# can be fopen'ed
# CONFIG_NAME_MAX - The maximum size of a file name.
# CONFIG_STDIO_BUFFER_SIZE - Size of the buffer to allocate
# on fopen. (Only if CONFIG_NFILE_STREAMS > 0)
# CONFIG_NUNGET_CHARS - Number of characters that can be
# buffered by ungetc() (Only if CONFIG_NFILE_STREAMS > 0)
# CONFIG_PREALLOC_MQ_MSGS - The number of pre-allocated message
# structures. The system manages a pool of preallocated
# message structures to minimize dynamic allocations
# CONFIG_MQ_MAXMSGSIZE - Message structures are allocated with
# a fixed payload size given by this settin (does not include
# other message structure overhead.
# CONFIG_MAX_WDOGPARMS - Maximum number of parameters that
# can be passed to a watchdog handler
# CONFIG_PREALLOC_WDOGS - The number of pre-allocated watchdog
# structures. The system manages a pool of preallocated
# watchdog structures to minimize dynamic allocations
# CONFIG_PREALLOC_TIMERS - The number of pre-allocated POSIX
# timer structures. The system manages a pool of preallocated
# timer structures to minimize dynamic allocations. Set to
# zero for all dynamic allocations.
#
CONFIG_MAX_TASKS=8
CONFIG_MAX_TASK_ARGS=4
CONFIG_NPTHREAD_KEYS=0
CONFIG_NFILE_DESCRIPTORS=0
CONFIG_NFILE_STREAMS=0
CONFIG_NAME_MAX=32
CONFIG_STDIO_BUFFER_SIZE=0
CONFIG_NUNGET_CHARS=0
CONFIG_PREALLOC_MQ_MSGS=0
CONFIG_MQ_MAXMSGSIZE=0
CONFIG_MAX_WDOGPARMS=2
CONFIG_PREALLOC_WDOGS=4
CONFIG_PREALLOC_TIMERS=0
#
# Filesystem configuration
#
# CONFIG_FS_FAT - Enable FAT filesystem support
# CONFIG_FAT_SECTORSIZE - Max supported sector size
# CONFIG_FS_ROMFS - Enable ROMFS filesystem support
#
CONFIG_FS_FAT=n
CONFIG_FS_ROMFS=n
#
# SPI-based MMC/SD driver
#
# CONFIG_MMCSD_NSLOTS
# Number of MMC/SD slots supported by the driver
# CONFIG_MMCSD_READONLY
# Provide read-only access (default is read/write)
# CONFIG_MMCSD_SPICLOCK - Maximum SPI clock to drive MMC/SD card.
# Default is 20MHz.
#
CONFIG_MMCSD_NSLOTS=1
CONFIG_MMCSD_READONLY=n
CONFIG_MMCSD_SPICLOCK=12500000
#
# Block driver buffering
#
# CONFIG_FS_READAHEAD
# Enable read-ahead buffering
# CONFIG_FS_WRITEBUFFER
# Enable write buffering
#
CONFIG_FS_READAHEAD=n
CONFIG_FS_WRITEBUFFER=n
#
# SDIO-based MMC/SD driver
#
# CONFIG_SDIO_DMA
# SDIO driver supports DMA
# CONFIG_MMCSD_MMCSUPPORT
# Enable support for MMC cards
# CONFIG_MMCSD_HAVECARDDETECT
# SDIO driver card detection is 100% accurate
#
CONFIG_SDIO_DMA=n
CONFIG_MMCSD_MMCSUPPORT=n
CONFIG_MMCSD_HAVECARDDETECT=n
#
# TCP/IP and UDP support via uIP
# CONFIG_NET - Enable or disable all network features
# CONFIG_NET_IPv6 - Build in support for IPv6
# CONFIG_NSOCKET_DESCRIPTORS - Maximum number of socket descriptors per task/thread.
# CONFIG_NET_SOCKOPTS - Enable or disable support for socket options
# CONFIG_NET_BUFSIZE - uIP buffer size
# CONFIG_NET_TCP - TCP support on or off
# CONFIG_NET_TCP_CONNS - Maximum number of TCP connections (all tasks)
# CONFIG_NET_TCP_READAHEAD_BUFSIZE - Size of TCP read-ahead buffers
# CONFIG_NET_NTCP_READAHEAD_BUFFERS - Number of TCP read-ahead buffers (may be zero)
# CONFIG_NET_TCPBACKLOG - Incoming connections pend in a backlog until
# accept() is called. The size of the backlog is selected when listen() is called.
# CONFIG_NET_MAX_LISTENPORTS - Maximum number of listening TCP ports (all tasks)
# CONFIG_NET_UDP - UDP support on or off
# CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off
# CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections
# CONFIG_NET_ICMP - ICMP ping response support on or off
# CONFIG_NET_ICMP_PING - ICMP ping request support on or off
# CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address
# CONFIG_NET_STATISTICS - uIP statistics on or off
# CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window
# CONFIG_NET_ARPTAB_SIZE - The size of the ARP table
# CONFIG_NET_BROADCAST - Broadcast support
# CONFIG_NET_LLH_LEN - The link level header length
# CONFIG_NET_FWCACHE_SIZE - number of packets to remember when looking for duplicates
#
CONFIG_NET=n
CONFIG_NET_IPv6=n
CONFIG_NSOCKET_DESCRIPTORS=0
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_BUFSIZE=420
CONFIG_NET_TCP=n
CONFIG_NET_TCP_CONNS=40
CONFIG_NET_MAX_LISTENPORTS=40
CONFIG_NET_UDP=n
CONFIG_NET_UDP_CHECKSUMS=y
#CONFIG_NET_UDP_CONNS=10
CONFIG_NET_ICMP=n
CONFIG_NET_ICMP_PING=n
#CONFIG_NET_PINGADDRCONF=0
CONFIG_NET_STATISTICS=y
#CONFIG_NET_RECEIVE_WINDOW=
#CONFIG_NET_ARPTAB_SIZE=8
CONFIG_NET_BROADCAST=n
#CONFIG_NET_LLH_LEN=14
#CONFIG_NET_FWCACHE_SIZE=2
#
# UIP Network Utilities
# CONFIG_NET_DHCP_LIGHT - Reduces size of DHCP
# CONFIG_NET_RESOLV_ENTRIES - Number of resolver entries
#
CONFIG_NET_DHCP_LIGHT=n
CONFIG_NET_RESOLV_ENTRIES=4
#
# USB Device Configuration
#
# CONFIG_USBDEV
# Enables USB device support
# CONFIG_USBDEV_ISOCHRONOUS
# Build in extra support for isochronous endpoints
# CONFIG_USBDEV_DUALSPEED
# Hardware handles high and full speed operation (USB 2.0)
# CONFIG_USBDEV_SELFPOWERED
# Will cause USB features to indicate that the device is
# self-powered
# CONFIG_USBDEV_MAXPOWER
# Maximum power consumption in mA
# CONFIG_USBDEV_TRACE
# Enables USB tracing for debug
# CONFIG_USBDEV_TRACE_NRECORDS
# Number of trace entries to remember
#
CONFIG_USBDEV=n
CONFIG_USBDEV_ISOCHRONOUS=n
CONFIG_USBDEV_DUALSPEED=n
CONFIG_USBDEV_SELFPOWERED=y
CONFIG_USBDEV_REMOTEWAKEUP=n
CONFIG_USBDEV_MAXPOWER=100
CONFIG_USBDEV_TRACE=n
CONFIG_USBDEV_TRACE_NRECORDS=128
#
# USB Serial Device Configuration
#
# CONFIG_USBSER
# Enable compilation of the USB serial driver
# CONFIG_USBSER_EPINTIN
# The logical 7-bit address of a hardware endpoint that supports
# interrupt IN operation
# CONFIG_USBSER_EPBULKOUT
# The logical 7-bit address of a hardware endpoint that supports
# bulk OUT operation
# CONFIG_USBSER_EPBULKIN
# The logical 7-bit address of a hardware endpoint that supports
# bulk IN operation
# # CONFIG_USBSER_NWRREQS and CONFIG_USBSER_NRDREQS
# The number of write/read requests that can be in flight
# CONFIG_USBSER_VENDORID and CONFIG_USBSER_VENDORSTR
# The vendor ID code/string
# CONFIG_USBSER_PRODUCTID and CONFIG_USBSER_PRODUCTSTR
# The product ID code/string
# CONFIG_USBSER_RXBUFSIZE and CONFIG_USBSER_TXBUFSIZE
# Size of the serial receive/transmit buffers
#
CONFIG_USBSER=n
CONFIG_USBSER_EPINTIN=1
CONFIG_USBSER_EPBULKOUT=2
CONFIG_USBSER_EPBULKIN=3
CONFIG_USBSER_NWRREQS=4
CONFIG_USBSER_NRDREQS=4
CONFIG_USBSER_VENDORID=0x067b
CONFIG_USBSER_PRODUCTID=0x2303
CONFIG_USBSER_VENDORSTR="Nuttx"
CONFIG_USBSER_PRODUCTSTR="USBdev Serial"
CONFIG_USBSER_RXBUFSIZE=512
CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
# CONFIG_USBSTRG
# Enable compilation of the USB storage driver
# CONFIG_USBSTRG_EP0MAXPACKET
# Max packet size for endpoint 0
# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
# The number of write/read requests that can be in flight
# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
# The vendor ID code/string
# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
# The product ID code/string
# CONFIG_USBSTRG_REMOVABLE
# Select if the media is removable
#
CONFIG_USBSTRG=n
CONFIG_USBSTRG_EP0MAXPACKET=64
CONFIG_USBSTRG_EPBULKOUT=2
CONFIG_USBSTRG_EPBULKIN=5
CONFIG_USBSTRG_NRDREQS=2
CONFIG_USBSTRG_NWRREQS=2
CONFIG_USBSTRG_BULKINREQLEN=256
CONFIG_USBSTRG_BULKOUTREQLEN=256
CONFIG_USBSTRG_VENDORID=0x584e
CONFIG_USBSTRG_VENDORSTR="NuttX"
CONFIG_USBSTRG_PRODUCTID=0x5342
CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
CONFIG_USBSTRG_VERSIONNO=0x0399
CONFIG_USBSTRG_REMOVABLE=y
#
# Settings for examples/uip
#
CONFIG_EXAMPLE_UIP_IPADDR=(10<<24|0<<16|0<<8|2)
CONFIG_EXAMPLE_UIP_DRIPADDR=(10<<24|0<<16|0<<8|1)
CONFIG_EXAMPLE_UIP_NETMASK=(255<<24|255<<16|255<<8|0)
CONFIG_EXAMPLE_UIP_DHCPC=n
#
# Settings for examples/nettest
CONFIG_EXAMPLE_NETTEST_SERVER=n
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
CONFIG_EXAMPLE_NETTEST_NOMAC=n
CONFIG_EXAMPLE_NETTEST_IPADDR=(10<<24|0<<16|0<<8|2)
CONFIG_EXAMPLE_NETTEST_DRIPADDR=(10<<24|0<<16|0<<8|1)
CONFIG_EXAMPLE_NETTEST_NETMASK=(255<<24|255<<16|255<<8|0)
CONFIG_EXAMPLE_NETTEST_CLIENTIP=(10<<24|0<<16|0<<8|1)
#
# Settings for examples/ostest
#
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=512
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
#
# Settings for examples/nsh
#
# CONFIG_EXAMPLES_NSH_FILEIOSIZE - Size of a static I/O buffer
# CONFIG_EXAMPLES_NSH_STRERROR - Use strerror(errno)
# CONFIG_EXAMPLES_NSH_LINELEN - Maximum length of one command line
# CONFIG_EXAMPLES_NSH_STACKSIZE - Stack size to use for new threads.
# CONFIG_EXAMPLES_NSH_NESTDEPTH - Max number of nested if-then[-else]-fi
# CONFIG_EXAMPLES_NSH_DISABLESCRIPT - Disable scripting support
# CONFIG_EXAMPLES_NSH_DISABLEBG - Disable background commands
# CONFIG_EXAMPLES_NSH_ROMFSETC - Use startup script in /etc
# CONFIG_EXAMPLES_NSH_CONSOLE - Use serial console front end
# CONFIG_EXAMPLES_NSH_TELNET - Use telnetd console front end
# CONFIG_EXAMPLES_NSH_ARCHINIT - Platform provides architecture
# specific initialization (nsh_archinitialize()).
#
# If CONFIG_EXAMPLES_NSH_TELNET is selected:
# CONFIG_EXAMPLES_NSH_IOBUFFER_SIZE -- Telnetd I/O buffer size
# CONFIG_EXAMPLES_NSH_DHCPC - Obtain address using DHCP
# CONFIG_EXAMPLES_NSH_IPADDR - Provides static IP address
# CONFIG_EXAMPLES_NSH_DRIPADDR - Provides static router IP address
# CONFIG_EXAMPLES_NSH_NETMASK - Provides static network mask
# CONFIG_EXAMPLES_NSH_NOMAC - Use a bogus MAC address
#
# If CONFIG_EXAMPLES_NSH_ROMFSETC is selected:
# CONFIG_EXAMPLES_NSH_ROMFSMOUNTPT - ROMFS mountpoint
# CONFIG_EXAMPLES_NSH_INITSCRIPT - Relative path to init script
# CONFIG_EXAMPLES_NSH_ROMFSDEVNO - ROMFS RAM device minor
# CONFIG_EXAMPLES_NSH_ROMFSSECTSIZE - ROMF sector size
# CONFIG_EXAMPLES_NSH_FATDEVNO - FAT FS RAM device minor
# CONFIG_EXAMPLES_NSH_FATSECTSIZE - FAT FS sector size
# CONFIG_EXAMPLES_NSH_FATNSECTORS - FAT FS number of sectors
# CONFIG_EXAMPLES_NSH_FATMOUNTPT - FAT FS mountpoint
#
CONFIG_EXAMPLES_NSH_FILEIOSIZE=512
CONFIG_EXAMPLES_NSH_STRERROR=n
CONFIG_EXAMPLES_NSH_LINELEN=64
CONFIG_EXAMPLES_NSH_STACKSIZE=512
CONFIG_EXAMPLES_NSH_NESTDEPTH=3
CONFIG_EXAMPLES_NSH_DISABLESCRIPT=n
CONFIG_EXAMPLES_NSH_DISABLEBG=n
CONFIG_EXAMPLES_NSH_ROMFSETC=n
CONFIG_EXAMPLES_NSH_CONSOLE=y
CONFIG_EXAMPLES_NSH_TELNET=n
CONFIG_EXAMPLES_NSH_ARCHINIT=n
CONFIG_EXAMPLES_NSH_IOBUFFER_SIZE=512
CONFIG_EXAMPLES_NSH_DHCPC=n
CONFIG_EXAMPLES_NSH_NOMAC=n
CONFIG_EXAMPLES_NSH_IPADDR=(10<<24|0<<16|0<<8|2)
CONFIG_EXAMPLES_NSH_DRIPADDR=(10<<24|0<<16|0<<8|1)
CONFIG_EXAMPLES_NSH_NETMASK=(255<<24|255<<16|255<<8|0)
CONFIG_EXAMPLES_NSH_ROMFSMOUNTPT="/etc"
CONFIG_EXAMPLES_NSH_INITSCRIPT="init.d/rcS"
CONFIG_EXAMPLES_NSH_ROMFSDEVNO=0
CONFIG_EXAMPLES_NSH_ROMFSSECTSIZE=64
CONFIG_EXAMPLES_NSH_FATDEVNO=1
CONFIG_EXAMPLES_NSH_FATSECTSIZE=512
CONFIG_EXAMPLES_NSH_FATNSECTORS=1024
CONFIG_EXAMPLES_NSH_FATMOUNTPT=/tmp
#
# Architecture-specific NSH options
#
CONFIG_EXAMPLES_NSH_MMCSDSPIPORTNO=0
CONFIG_EXAMPLES_NSH_MMCSDSLOTNO=0
CONFIG_EXAMPLES_NSH_MMCSDMINOR=0
#
# Settings for examples/usbserial
#
# CONFIG_EXAMPLES_USBSERIAL_INONLY
# Only verify IN (device-to-host) data transfers. Default: both
# CONFIG_EXAMPLES_USBSERIAL_OUTONLY
# Only verify OUT (host-to-device) data transfers. Default: both
# CONFIG_EXAMPLES_USBSERIAL_ONLYSMALL
# Send only small, single packet messages. Default: Send large and small.
# CONFIG_EXAMPLES_USBSERIAL_ONLYBIG
# Send only large, multi-packet messages. Default: Send large and small.
#
CONFIG_EXAMPLES_USBSERIAL_INONLY=n
CONFIG_EXAMPLES_USBSERIAL_OUTONLY=n
CONFIG_EXAMPLES_USBSERIAL_ONLYSMALL=n
CONFIG_EXAMPLES_USBSERIAL_ONLYBIG=n
CONFIG_EXAMPLES_USBSERIAL_TRACEINIT=n
CONFIG_EXAMPLES_USBSERIAL_TRACECLASS=n
CONFIG_EXAMPLES_USBSERIAL_TRACETRANSFERS=n
CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n
CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Stack and heap information
#
# CONFIG_BOOT_RUNFROMFLASH - Some configurations support XIP
# operation from FLASH but must copy initialized .data sections to RAM.
# (should also be =n for the NE64 Badge which always runs from flash)
# CONFIG_BOOT_COPYTORAM - Some configurations boot in FLASH
# but copy themselves entirely into RAM for better performance.
# CONFIG_CUSTOM_STACK - The up_ implementation will handle
# all stack operations outside of the nuttx model.
# CONFIG_IDLETHREAD_STACKSIZE - The size of the initial stack.
# This is the thread that (1) performs the inital boot of the system up
# to the point where user_start() is spawned, and (2) there after is the
# IDLE thread that executes only when there is no other thread ready to
# run.
# CONFIG_USERMAIN_STACKSIZE - The size of the stack to allocate
# for the main user thread that begins at the user_start() entry point.
# CONFIG_PTHREAD_STACK_MIN - Minimum pthread stack size
# CONFIG_PTHREAD_STACK_DEFAULT - Default pthread stack size
# CONFIG_HEAP_BASE - The beginning of the heap
# CONFIG_HEAP_SIZE - The size of the heap
#
CONFIG_BOOT_RUNFROMFLASH=n
CONFIG_BOOT_COPYTORAM=n
CONFIG_CUSTOM_STACK=n
CONFIG_STACK_POINTER=
CONFIG_IDLETHREAD_STACKSIZE=256
CONFIG_USERMAIN_STACKSIZE=512
CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=256
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -0,0 +1,143 @@
/****************************************************************************
* configs/ne64badge/ostest/ld.script
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* 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 NE64 Badge has 64Kb of FLASH and 8Kb of SRAM that are assumed to be
* paged and positioned as below:
*/
MEMORY
{
/* The 8Kb SRAM is mapped to 0x2000-0x2fff. The top 256 bytes are reserved
* for the serial monitor stack space.
*/
sram (rwx) : ORIGIN = 0x2000, LENGTH = 8K-256
/* Two fixed text flash pages (corresponding to page 3e and 3f) */
lowtext(rx) : ORIGIN = 0x4000, LENGTH = 16K /* Page 3e */
hitext (rx) : ORIGIN = 0xc000, LENGTH = 16K-2k /* Page 3f */
/* Flash memory pages:
*
* The MC9S12NE64 implements 6 bits of the PPAGE register which gives it a
* 1 Mbyte program memory address space that is accessed through the PPAGE
* window. The lower 768K portion (0x000000-0x0bffff) of the address space
* is accessed with PPAGE values 0x00 through 0x2f. This address range
* is reserved for external memory when the part is operated in expanded
* mode. The upper 256K of the address space (0x0c0000-0x100000), accessed
* with PPAGE values 0x30 through 0x3f, is occupied by on chip flash.
*/
page30 (rx) : ORIGIN = 0x0c0000, LENGTH = 16K /* Page 30 */
page31 (rx) : ORIGIN = 0x0c4000, LENGTH = 16K /* Page 31 */
page32 (rx) : ORIGIN = 0x0c8000, LENGTH = 16K /* Page 32 */
page33 (rx) : ORIGIN = 0x0cc000, LENGTH = 16K /* Page 33 */
page34 (rx) : ORIGIN = 0x0d0000, LENGTH = 16K /* Page 34 */
page35 (rx) : ORIGIN = 0x0d4000, LENGTH = 16K /* Page 35 */
page36 (rx) : ORIGIN = 0x0d8000, LENGTH = 16K /* Page 36 */
page37 (rx) : ORIGIN = 0x0dc000, LENGTH = 16K /* Page 37 */
page38 (rx) : ORIGIN = 0x0e0000, LENGTH = 16K /* Page 38 */
page39 (rx) : ORIGIN = 0x0e4000, LENGTH = 16K /* Page 39 */
page3a (rx) : ORIGIN = 0x0e8000, LENGTH = 16K /* Page 3a */
page3b (rx) : ORIGIN = 0x0ec000, LENGTH = 16K /* Page 3b */
page3c (rx) : ORIGIN = 0x0f0000, LENGTH = 16K /* Page 3c */
page3d (rx) : ORIGIN = 0x0f4000, LENGTH = 16K /* Page 3d */
page3e (rx) : ORIGIN = 0x0f8000, LENGTH = 16K /* Page 3e */
page3f (rx) : ORIGIN = 0x0fc000, LENGTH = 16K-2K /* Page 3f */
/* Vectors. These get relocated to 0xf780-f7ff by the serial loader */
vectors (rx) : ORIGIN = 0xff80, LENGTH = 256
}
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(.);
} > hitext
_eronly = ABSOLUTE(.); /* See below */
.data : {
_sdata = ABSOLUTE(.);
*(.data .data.*)
*(.gnu.linkonce.d.*)
CONSTRUCTORS
_edata = ABSOLUTE(.);
} > sram AT > lowtext
.bss : { /* BSS */
_sbss = ABSOLUTE(.);
*(.bss .bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
_ebss = ABSOLUTE(.);
} > sram
.vectors : {
_svectors = ABSOLUTE(.);
*(.vectors)
_evectors = ABSOLUTE(.);
} > vectors
/* 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) }
}

View File

@ -0,0 +1,116 @@
/****************************************************************************
* configs/ne64badge/ostest/ld.script
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* 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 NE64 Badge has 64Kb of FLASH and 8Kb of SRAM that are assumed to be
* paged and positioned as below:
*/
MEMORY
{
/* The 8Kb SRAM is mapped to 0x2000-0x2fff. The top 256 bytes are reserved
* for the serial monitor stack space.
*/
sram (rwx) : ORIGIN = 0x2000, LENGTH = 8K-256
/* Three fixed text flash pages (corresponding to page 3e, 3d, and 3f) at
* 16Kb each (minus 2Kb at the end of page 3f that is reserved at the top for
* the serial boot loader
*/
text (rx) : ORIGIN = 0x4000, LENGTH = 48K-2k /* Page 3e, 3d, and 3f */
/* Vectors. These get relocated to 0xf780-f7ff by the serial loader */
vectors (rx) : ORIGIN = 0xff80, LENGTH = 256
}
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(.);
} > text
_eronly = ABSOLUTE(.); /* See below */
.data : {
_sdata = ABSOLUTE(.);
*(.data .data.*)
*(.gnu.linkonce.d.*)
CONSTRUCTORS
_edata = ABSOLUTE(.);
} > sram AT > text
.bss : { /* BSS */
_sbss = ABSOLUTE(.);
*(.bss .bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
_ebss = ABSOLUTE(.);
} > sram
.vectors : {
_svectors = ABSOLUTE(.);
*(.vectors)
_evectors = ABSOLUTE(.);
} > vectors
/* 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) }
}

View File

@ -0,0 +1,46 @@
#!/bin/bash
# configs/ne64badge/ostest/setenv.sh
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# 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 [ "$(basename $0)" = "setenv.sh" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi
WD=`pwd`
export BUILDROOT_BIN="${WD}/../buildroot/build_m9s12x/staging_dir/bin"
export PATH="${BUILDROOT_BIN}:${RIDE_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"

View File

@ -0,0 +1,87 @@
############################################################################
# configs/ne64badge/src/Makefile
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# 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)/Make.defs
CFLAGS += -I$(TOPDIR)/sched
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = up_boot.c up_leds.c up_buttons.c up_spi.c
ifeq ($(CONFIG_EXAMPLES_NSH_ARCHINIT),y)
CSRCS += up_nsh.c
endif
COBJS = $(CSRCS:.c=$(OBJEXT))
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)/cortexm3}"
else
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/cortexm3
endif
all: libboard$(LIBEXT)
$(AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@)
$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
libboard$(LIBEXT): $(OBJS)
@( for obj in $(OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
.depend: Makefile $(SRCS)
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@touch $@
depend: .depend
clean:
@rm -f libboard$(LIBEXT) *~ .*.swp
$(call CLEAN)
distclean: clean
@rm -f Make.dep .depend
-include Make.dep

View File

@ -0,0 +1,188 @@
/************************************************************************************
* configs/ne64badge/src/ne64badge_internal.h
* arch/arm/src/board/ne64badge_internal.n
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* 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.
*
************************************************************************************/
#ifndef __CONFIGS_NE64BADGE_SRC_NE64BADGE_INTERNAL_H
#define __CONFIGS_NE64BADGE_SRC_NE64BADGE_INTERNAL_H
/************************************************************************************
* Included Files
************************************************************************************/
#include <nuttx/config.h>
#include <nuttx/compiler.h>
/************************************************************************************
* Definitions
************************************************************************************/
/* NE64BADGE Pin Usage **************************************************************/
/* PIN PIN NAME BOARD SIGNAL NOTES
* --- ------------------- -------------- ----------------------
* 44 RESET J3 RESET_L Also to SW3
* 57 BKGD/MODC/TAGHI_B BDM BKGD CON6A
*
* 86 PAD1 J3 ANALOG_IN0 Not used on board
* 87 PAD2 J3 ANALOG_IN1 " " " " "" " "
* 88 PAD3 J3 ANALOG_IN2 " " " " "" " "
* 89 PAD4 J3 ANALOG_IN3 " " " " "" " "
*
* 70 PHY_TXP J7 TD+ RJ45 connector
* 71 PHY_TXN J7 TD- RJ45 connector
* 73 PHY_RXP J7 RD+ RJ45 connector
* 74 PHY_RXN J7 RD- RJ45 connector
*
* 51 PL6/TXER/KWL6 N/C N/C
* 52 PL5/TXDV/KWL5 N/C N/C
* 58 PL4/COLLED Collision LED red
* 59 PL3/DUPLED Full Duplex LED yellow
* 81 PL2/SPDLED 100Mbps Speed LED yellow
* 83 PL1/LNKLED Link Good LED green
* 84 PL0/ACTLED Activity LED yellow
*
* 60 PA0/ADDR8/DATA8 J3 ADDR_DATA8 Not used on board
* 61 PA1/ADDR9/DATA9 J3 ADDR_DATA9 " " " " "" " "
* 62 PA2/ADDR10/DATA10 J3 ADDR_DATA10 " " " " "" " "
* 63 PA3/ADDR11/DATA11 J3 ADDR_DATA11 " " " " "" " "
* 77 PA4/ADDR12/DATA12 J3 ADDR_DATA12 " " " " "" " "
* 78 PA5/ADDR13/DATA13 J3 ADDR_DATA13 " " " " "" " "
* 79 PA6/ADDR14/DATA14 J3 ADDR_DATA14 " " " " "" " "
* 80 PA7/ADDR15/DATA15 J3 ADDR_DATA15 " " " " "" " "
*
* 10 PB0/ADDR0/DATA0 J3 ADDR_DATA0 Not used on board
* 11 PB1/ADDR1/DATA1 J3 ADDR_DATA1 " " " " "" " "
* 12 PB2/ADDR2/DATA2 J3 ADDR_DATA2 " " " " "" " "
* 13 PB3/ADDR3/DATA3 J3 ADDR_DATA3 " " " " "" " "
* 16 PB4/ADDR4/DATA4 J3 ADDR_DATA4 " " " " "" " "
* 17 PB5/ADDR5/DATA5 J3 ADDR_DATA5 " " " " "" " "
* 18 PB6/ADDR6/DATA6 J3 ADDR_DATA6 " " " " "" " "
* 19 PB7/ADDR7/DATA7 J3 ADDR_DATA7 " " " " "" " "
*
* 97 PK0/XADR14 N/C N/C
* 98 PK1/XADR15 N/C N/C
* 99 PK2/XADR16 N/C N/C
* 100 PK3/XADR17 N/C N/C
* 103 PK4/XADR18 N/C N/C
* 104 PK5/XADR19 N/C N/C
* 105 PK6/XCS_B J3 XCS Not used on board
* 106 PK7/ECS_B/ROMCTL J3 ECS " " " " "" " "
*
* 56 PE0/XIRQ_B BUTTON1 SW1
* 55 PE1/IRQ_B J3 IRQ Not used on board
* 54 PE2/R_W J3 RW " " " " "" " "
* 53 PE3/LSTRB_B/TAGLO_B J3 LSTRB " " " " "" " "
* 41 PE4/ECLK J3 ECLK " " " " "" " "
* 40 PE5/IPIPE0/MODA J3 MODA " " " " "" " "
* 39 PE6/IPIPE1/MODB J3 MODB " " " " "" " "
* 38 PE7/NOACC/XCLKS_B pulled low pulled low
*
* 110 PT4/IOC1_4 J3 GPIO8 Not used on board
* 109 PT5/IOC1_5 J3 GPIO9 " " " " "" " "
* 108 PT6/IOC1_6 J3 GPIO10 " " " " "" " "
* 107 PT7/IOC1_7 N/C N/C
*
* 22 PG0/RXD0/KWG0 J3 GPIO0 Not used on board
* 23 PG1/RXD1/KWG1 J3 GPIO1 " " " " "" " "
* 24 PG2/RXD2/KWG2 J3 GPIO2 " " " " "" " "
* 25 PG3/RXD3/KWG3 J3 GPIO3 " " " " "" " "
* 26 PG4/RXCLK/KWG4 J3 GPIO4 " " " " "" " "
* 27 PG5/RXDV/KWG5 J3 GPIO5 " " " " "" " "
* 28 PG6/RXER/KWG6 J3 GPIO6 " " " " "" " "
* 29 PG7/KWG7 J3 GPIO7 " " " " "" " "
*
* 8 PJ0/MDC/KWJ0 LED1 D21, red
* 9 PJ1/MDIO/KWJ1 LED2 D22, red
* 20 PJ2/CRS/KWJ2 J3 SPI_CS Not used on board
* 21 PJ3/COL/KWJ3 N/C
* 112 PJ6/SDA/KWJ6 J3 I2C_DATA Not used on board
* 111 PJ7/SCL/KWJ7 J3 I2C_CLOCK " " " " "" " "
*
* 30 PS0/RXD0 RS232_RX Eventually maps to J2 RXD
* 31 PS1/TXD0 RS232_TX Eventually maps to J2 TXD
* 32 PS2/RXD1 J3&J4 UART_RX Not used on board
* 33 PS3/TXD1 J3&J4 UART_TX " " " " "" " "
* 34 PS4/MISO J3 SPI_MISO " " " " "" " "
* 35 PS5/MOSI J3 SPI_MOSI " " " " "" " "
* 36 PS6/SCK J3 SPI_CLOCK " " " " "" " "
* 37 PS7/SS_B J3 SPI_SS " " " " "" " "
*
* 7 PH0/TXD0/KWH0 N/C N/C
* 6 PH1/TXD1/KWH1 N/C N/C
* 5 PH2/TXD2/KWH2 J4 XBEE_RESET Not used on board
* 4 PH3/TXD3/KWH3 J4 XBEE_RSSI Not used on board
* 3 PH4/TXCLK/KWH4 BUTTON2 SW2
* 2 PH5/TXDV/KWH5 J5 XBEE_LOAD_H Not used on board
* 1 PH6/TXER/KWH6 J4 XBEE_LOAD_L Not used on board
*/
/************************************************************************************
* Public Types
************************************************************************************/
/************************************************************************************
* Public data
************************************************************************************/
#ifndef __ASSEMBLY__
/************************************************************************************
* Public Functions
************************************************************************************/
/************************************************************************************
* Name: up_ledinit
*
* Description:
* Configure and initialize on-board LEDs
*
************************************************************************************/
#ifdef CONFIG_ARCH_LEDS
extern void up_ledinit(void);
#endif
/************************************************************************************
* Name: hcs12_spiinitialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the STM3210E-EVAL board.
*
************************************************************************************/
extern void weak_function hcs12_spiinitialize(void);
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_NE64BADGE_SRC_NE64BADGE_INTERNAL_H */

View File

@ -0,0 +1,89 @@
/************************************************************************************
* configs/ne64badge/src/up_boot.c
* arch/arm/src/board/up_boot.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* 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.
*
************************************************************************************/
/************************************************************************************
* Included Files
************************************************************************************/
#include <nuttx/config.h>
#include <debug.h>
#include <arch/board/board.h>
#include "ne64badge_internal.h"
/************************************************************************************
* Definitions
************************************************************************************/
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
/************************************************************************************
* Name: hcs12_boardinitialize
*
* Description:
* All HCS12 architectures must provide the following entry point. This entry point
* is called early in the intitialization -- after all memory has been configured
* and mapped but before any devices have been initialized.
*
************************************************************************************/
void hcs12_boardinitialize(void)
{
/* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function
* hcs12_spiinitialize() has been brought into the link.
*/
#if defined(CONFIG_INCLUDE_HCS12_ARCH_SPI)
if (hcs12_spiinitialize)
{
hcs12_spiinitialize();
}
#endif
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
up_ledinit();
#endif
}

View File

@ -0,0 +1,82 @@
/****************************************************************************
* configs/ne64badge/src/up_leds.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* 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.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdint.h>
#include <arch/board/board.h>
#include "ne64badge_internal.h"
#ifdef CONFIG_ARCH_BUTTONS
/****************************************************************************
* Definitions
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: up_buttoninit
****************************************************************************/
void up_buttoninit(void)
{
}
/****************************************************************************
* Name: up_buttons
****************************************************************************/
uint8_t up_buttons(void)
{
return 0;
}
#endif /* CONFIG_ARCH_BUTTONS */

View File

@ -0,0 +1,108 @@
/****************************************************************************
* configs/ne64badge/src/up_leds.c
* arch/arm/src/board/up_leds.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* 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.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <debug.h>
#include <arch/board/board.h>
#include "ne64badge_internal.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Enables debug output from this file (needs CONFIG_DEBUG with
* CONFIG_DEBUG_VERBOSE too)
*/
#undef LED_DEBUG /* Define to enable debug */
#ifdef LED_DEBUG
# define leddbg lldbg
# define ledvdbg llvdbg
#else
# define leddbg(x...)
# define ledvdbg(x...)
#endif
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: up_ledinit
*
* Description:
* Configure and initialize on-board LEDs
*
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
void up_ledinit(void)
{
}
/****************************************************************************
* Name: up_ledon
****************************************************************************/
void up_ledon(int led)
{
}
/****************************************************************************
* Name: up_ledoff
****************************************************************************/
void up_ledoff(int led)
{
}
#endif /* CONFIG_ARCH_LEDS */

View File

@ -0,0 +1,86 @@
/****************************************************************************
* config/ne64badge/src/up_nsh.c
* arch/arm/src/board/up_nsh.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* 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.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdio.h>
#include <debug.h>
#include <errno.h>
#include "ne64badge_internal.h"
/****************************************************************************
* Pre-Processor Definitions
****************************************************************************/
/* Debug ********************************************************************/
#ifdef CONFIG_CPP_HAVE_VARARGS
# ifdef CONFIG_DEBUG
# define message(...) lib_lowprintf(__VA_ARGS__)
# else
# define message(...) printf(__VA_ARGS__)
# endif
#else
# ifdef CONFIG_DEBUG
# define message lib_lowprintf
# else
# define message printf
# endif
#endif
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: nsh_archinitialize
*
* Description:
* Perform architecture specific initialization
*
****************************************************************************/
int nsh_archinitialize(void)
{
/* Configure SPI-based devices */
return OK;
}

View File

@ -0,0 +1,130 @@
/************************************************************************************
* configs/ne64badge/src/up_spi.c
* arch/arm/src/board/up_spi.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* 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.
*
************************************************************************************/
/************************************************************************************
* Included Files
************************************************************************************/
#include <nuttx/config.h>
#include <stdint.h>
#include <stdbool.h>
#include <debug.h>
#include <nuttx/spi.h>
#include <arch/board/board.h>
#include "ne64badge_internal.h"
#if defined(CONFIG_HCS12_SPI)
/************************************************************************************
* Definitions
************************************************************************************/
/* Enables debug output from this file (needs CONFIG_DEBUG too) */
#undef SPI_DEBUG /* Define to enable debug */
#undef SPI_VERBOSE /* Define to enable verbose debug */
#ifdef SPI_DEBUG
# define spidbg lldbg
# ifdef SPI_VERBOSE
# define spivdbg lldbg
# else
# define spivdbg(x...)
# endif
#else
# undef SPI_VERBOSE
# define spidbg(x...)
# define spivdbg(x...)
#endif
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
/************************************************************************************
* Name: hcs12_spiinitialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the NE64 Badge board.
*
************************************************************************************/
void weak_function hcs12_spiinitialize(void)
{
}
/****************************************************************************
* Name: hcs12_spiselect and hcs12_spistatus
*
* Description:
* The external functions, hcs12_spiselect and hcs12_spistatus must be
* provided by board-specific logic. They are implementations of the select
* and status methods of the SPI interface defined by struct spi_ops_s (see
* include/nuttx/spi.h). All other methods (including up_spiinitialize())
* are provided by common HCS12 logic. To use this common SPI logic on your
* board:
*
* 1. Provide logic in hcs12_boardinitialize() to configure SPI chip select
* pins.
* 2. Provide hcs12_spiselect() and hcs12_spistatus() functions in your
* board-specific logic. These functions will perform chip selection and
* status operations using GPIOs in the way your board is configured.
* 3. Add a calls to up_spiinitialize() in your low level application
* initialization logic
* 4. The handle returned by up_spiinitialize() may then be used to bind the
* SPI driver to higher level logic (e.g., calling
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
* the SPI MMC/SD driver).
*
****************************************************************************/
void hcs12_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
{
}
uint8_t hcs12_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
{
return SPI_STATUS_PRESENT;
}
#endif /* CONFIG_HCS12_SPI */