Remove some carriage returns

This commit is contained in:
Gregory Nutt
2015-04-08 09:05:48 -06:00
parent 95ee8a4ef9
commit 9ed20f79dc
5 changed files with 671 additions and 671 deletions
File diff suppressed because it is too large Load Diff
+123 -123
View File
@@ -1,123 +1,123 @@
README
======
This is the README file for the port of NuttX to the TI CC3200 Launchpad.
OpenOCD for Windows
===================
Get the CC3200 SDK
------------------
Get this from the TI web site. Also get "CC3200 SimpleLink™ Wi-Fi® and
IoT Solution With MCU LaunchPad™ Getting Started Guide" (SWRU376A)
Get OpenOCD
------------
The OpenOCD project is here: http://openocd.sourceforge.net/
I use the pre-built binaries provided by Freddie Chopin that can b
downloaded here: http://www.freddiechopin.info/
I used version 0.8.0 which available here:
http://www.freddiechopin.info/en/articles/34-news/92-openocd-w-wersji-080
Other versions are available here:
http://www.freddiechopin.info/en/download/category/4-openocd
Get Zadig
---------
Unless you are very clever with Windows drivers, then I also recommend
that you download and install Zadig: http://zadig.akeo.ie/
Other Stuff
-----------
USB Cable, your favorite serial terminal program, NuttX build with
one of the CC3200 configurations in this diretory.
Installing
----------
Install the TI CC3200 SDK and OpenOCD. Zadig is just an binary so there
is no installation. Plug in the CC3200 via the USB cable. You should see
two new devices in the Windows Device Manager, both called:
USB <-> JTAG/SWD
There will be indications on the driver icon that no driver is installed.
Follow the instructions in the paragraph "Install USB Driver" to install
the TI USB drivers. You need to do this twice, once for each device. Now
you will have two devices with different names:
CC3200CP JTAG Port A, and
CC3200CP UART Port B
OpenOCD cannot use the TI JTAG drivers. So we need to replace that port
(ONLY) with the libusb driver. Use Zadig to install the libusb driver
replacing the TI driver for "CC3200CP JTAG Port A". Now you should have
the following under "Ports (COM & LPT)":
CC3200 UART Port B
And under "Universal Serial Bus Devices", again:
USB <-> JTAG/SWD
But this time without the indication that a driver is needed.
Starting OpenOCD
----------------
These instructions assume that (1) you are using a terminal with a Bash
shell under Cygwin, (2) that you installed OpenOCD at C:\openocd-0.8.0,
and (3) you are using a 64-bit windows version. You will need to make
minor changes if any of these are not true.
The script to use with OpenOCD 0.8.0 is provided in
nuttx/configs/cc3200-launchpad/tools. Go there and start OpenOCd as
follow:
$ cd configs/cc3200-launchpad/tools
$ /cygdrive/c/openocd-0.8.0/bin-x64/openocd-x64-0.8.0.exe --file cc3200.cfg
And you should see something like:
Open On-Chip Debugger 0.8.0 (2014-04-28-08:42)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 1000 kHz
Info : clock speed 1000 kHz
Info : JTAG tap: cc3200.jrc tap/device found: 0x0b97c02f (mfg: 0x017, part: 0xb97c, ver: 0x0)
Info : JTAG tap: cc3200.dap enabled
Info : cc3200.cpu: hardware has 6 breakpoints, 4 watchpoints
Open the Serial Terminal
------------------------
Connect the CC3200 board via the USB cabale. Open the serial terminal
program using the libusb COM device. For me this is usually COM6 but
could be anything. If you are unsure, remove the CC3200 and see which
one goes away.
The serial interface should be configured 115200 8N1.
Using GDB
---------
Start GDB and connect to OpenOCD:
$ arm-none-eabi-gdb
(gdb) target remote localhost:3333
Load and start the NuttX ELF file (nuttx):
(gdb) mon reset halt
(gdb) load nuttx
(gdb) cont
(gdb)
After entering cont(inue), you should see the NSH prompt in the serial
terminal window:
C3200 init
NuttShell (NSH)
nsh>
README
======
This is the README file for the port of NuttX to the TI CC3200 Launchpad.
OpenOCD for Windows
===================
Get the CC3200 SDK
------------------
Get this from the TI web site. Also get "CC3200 SimpleLink™ Wi-Fi® and
IoT Solution With MCU LaunchPad™ Getting Started Guide" (SWRU376A)
Get OpenOCD
------------
The OpenOCD project is here: http://openocd.sourceforge.net/
I use the pre-built binaries provided by Freddie Chopin that can b
downloaded here: http://www.freddiechopin.info/
I used version 0.8.0 which available here:
http://www.freddiechopin.info/en/articles/34-news/92-openocd-w-wersji-080
Other versions are available here:
http://www.freddiechopin.info/en/download/category/4-openocd
Get Zadig
---------
Unless you are very clever with Windows drivers, then I also recommend
that you download and install Zadig: http://zadig.akeo.ie/
Other Stuff
-----------
USB Cable, your favorite serial terminal program, NuttX build with
one of the CC3200 configurations in this diretory.
Installing
----------
Install the TI CC3200 SDK and OpenOCD. Zadig is just an binary so there
is no installation. Plug in the CC3200 via the USB cable. You should see
two new devices in the Windows Device Manager, both called:
USB <-> JTAG/SWD
There will be indications on the driver icon that no driver is installed.
Follow the instructions in the paragraph "Install USB Driver" to install
the TI USB drivers. You need to do this twice, once for each device. Now
you will have two devices with different names:
CC3200CP JTAG Port A, and
CC3200CP UART Port B
OpenOCD cannot use the TI JTAG drivers. So we need to replace that port
(ONLY) with the libusb driver. Use Zadig to install the libusb driver
replacing the TI driver for "CC3200CP JTAG Port A". Now you should have
the following under "Ports (COM & LPT)":
CC3200 UART Port B
And under "Universal Serial Bus Devices", again:
USB <-> JTAG/SWD
But this time without the indication that a driver is needed.
Starting OpenOCD
----------------
These instructions assume that (1) you are using a terminal with a Bash
shell under Cygwin, (2) that you installed OpenOCD at C:\openocd-0.8.0,
and (3) you are using a 64-bit windows version. You will need to make
minor changes if any of these are not true.
The script to use with OpenOCD 0.8.0 is provided in
nuttx/configs/cc3200-launchpad/tools. Go there and start OpenOCd as
follow:
$ cd configs/cc3200-launchpad/tools
$ /cygdrive/c/openocd-0.8.0/bin-x64/openocd-x64-0.8.0.exe --file cc3200.cfg
And you should see something like:
Open On-Chip Debugger 0.8.0 (2014-04-28-08:42)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 1000 kHz
Info : clock speed 1000 kHz
Info : JTAG tap: cc3200.jrc tap/device found: 0x0b97c02f (mfg: 0x017, part: 0xb97c, ver: 0x0)
Info : JTAG tap: cc3200.dap enabled
Info : cc3200.cpu: hardware has 6 breakpoints, 4 watchpoints
Open the Serial Terminal
------------------------
Connect the CC3200 board via the USB cabale. Open the serial terminal
program using the libusb COM device. For me this is usually COM6 but
could be anything. If you are unsure, remove the CC3200 and see which
one goes away.
The serial interface should be configured 115200 8N1.
Using GDB
---------
Start GDB and connect to OpenOCD:
$ arm-none-eabi-gdb
(gdb) target remote localhost:3333
Load and start the NuttX ELF file (nuttx):
(gdb) mon reset halt
(gdb) load nuttx
(gdb) cont
(gdb)
After entering cont(inue), you should see the NSH prompt in the serial
terminal window:
C3200 init
NuttShell (NSH)
nsh>
+64 -64
View File
@@ -2,82 +2,82 @@ diff -rub lpc21isp-1.60/lpc21isp.c lpc21isp-Linux//lpc21isp.c
--- lpc21isp-1.60/lpc21isp.c 2008-07-21 15:17:06.000000000 -0600
+++ lpc21isp-Linux//lpc21isp.c 2008-09-16 09:21:20.000000000 -0600
@@ -22,6 +22,7 @@
#include "adprog.h"
#include "lpcprog.h"
#include "lpcterm.h"
+#include "errno.h"
/*
Change-History:
#include "adprog.h"
#include "lpcprog.h"
#include "lpcterm.h"
+#include "errno.h"
/*
Change-History:
@@ -319,10 +320,7 @@
if (IspEnvironment->fdCom < 0)
{
- int* p_err = __error();
- int err;
- if (p_err) { err = *p_err; }
- DebugPrintf(1, "Can't open COM-Port %s ! (Error: %dd (0x%X))\n", IspEnvironment->serial_port, err, err);
+ DebugPrintf(1, "Can't open COM-Port %s ! (Error: %dd (0x%X))\n", IspEnvironment->serial_port, errno, errno);
exit(2);
}
if (IspEnvironment->fdCom < 0)
{
- int* p_err = __error();
- int err;
- if (p_err) { err = *p_err; }
- DebugPrintf(1, "Can't open COM-Port %s ! (Error: %dd (0x%X))\n", IspEnvironment->serial_port, err, err);
+ DebugPrintf(1, "Can't open COM-Port %s ! (Error: %dd (0x%X))\n", IspEnvironment->serial_port, errno, errno);
exit(2);
}
diff -rub lpc21isp-1.60/lpc21isp.h lpc21isp-Linux//lpc21isp.h
--- lpc21isp-1.60/lpc21isp.h 2008-05-10 17:35:00.000000000 -0600
+++ lpc21isp-Linux//lpc21isp.h 2008-09-16 09:18:42.000000000 -0600
@@ -165,6 +165,7 @@
#endif
unsigned serial_timeout_count; /**< Local used to track timeouts on serial port read. */
+ unsigned char DoNotStart; /* Do not start Code if this is set*/
} ISP_ENVIRONMENT;
#endif
unsigned serial_timeout_count; /**< Local used to track timeouts on serial port read. */
+ unsigned char DoNotStart; /* Do not start Code if this is set*/
} ISP_ENVIRONMENT;
@@ -173,7 +174,6 @@
#define DebugPrintf(in, ...)
#else
-extern int debug_level;
#if defined INTEGRATED_IN_WIN_APP
#define DebugPrintf(in, ...)
#else
-extern int debug_level;
#if defined INTEGRATED_IN_WIN_APP
@@ -191,7 +191,6 @@
#else
void DebugPrintf(int level, const char *fmt, ...);
-//#define DebugPrintf(level, ...) if (level <= debug_level) { TRACE( __VA_ARGS__ ); }
#endif
void ClearSerialPortBuffers(ISP_ENVIRONMENT *IspEnvironment);
#else
void DebugPrintf(int level, const char *fmt, ...);
-//#define DebugPrintf(level, ...) if (level <= debug_level) { TRACE( __VA_ARGS__ ); }
#endif
void ClearSerialPortBuffers(ISP_ENVIRONMENT *IspEnvironment);
diff -rub lpc21isp-1.60/lpcprog.c lpc21isp-Linux//lpcprog.c
--- lpc21isp-1.60/lpcprog.c 2008-07-21 14:39:50.000000000 -0600
+++ lpc21isp-Linux//lpcprog.c 2008-09-16 08:52:46.000000000 -0600
@@ -1062,15 +1062,16 @@
}
else
{
+ if (IspEnvironment->DoNotStart == 0)
+ {
DebugPrintf(2, "Now launching the brand new code\n");
fflush(stdout);
-
if (IspEnvironment->HalfDuplex == 0)
sprintf(tmpString, "G %ld A\r\n", IspEnvironment->StartAddress);
else
sprintf(tmpString, "G %ld A\n", IspEnvironment->StartAddress);
-
SendComPort(IspEnvironment, tmpString); //goto 0 : run this fresh new downloaded code code
+
if (IspEnvironment->BinaryOffset < LPC_RAMSTART)
{ // Skip response on G command - show response on Terminal instead
ReceiveComPort(IspEnvironment, Answer, sizeof(Answer)-1, &realsize, 2, 5000);
}
else
{
+ if (IspEnvironment->DoNotStart == 0)
+ {
DebugPrintf(2, "Now launching the brand new code\n");
fflush(stdout);
-
if (IspEnvironment->HalfDuplex == 0)
sprintf(tmpString, "G %ld A\r\n", IspEnvironment->StartAddress);
else
sprintf(tmpString, "G %ld A\n", IspEnvironment->StartAddress);
-
SendComPort(IspEnvironment, tmpString); //goto 0 : run this fresh new downloaded code code
+
if (IspEnvironment->BinaryOffset < LPC_RAMSTART)
{ // Skip response on G command - show response on Terminal instead
ReceiveComPort(IspEnvironment, Answer, sizeof(Answer)-1, &realsize, 2, 5000);
@@ -1099,6 +1100,7 @@
return (FAILED_RUN + GetAndReportErrorNumber(Answer));
}
}
+ }
fflush(stdout);
}
return (FAILED_RUN + GetAndReportErrorNumber(Answer));
}
}
+ }
fflush(stdout);
}
Only in lpc21isp-Linux/: lpcprog.c.orig
diff -rub lpc21isp-1.60/Makefile lpc21isp-Linux//Makefile
--- lpc21isp-1.60/Makefile 2008-04-07 00:23:00.000000000 -0600
+37 -37
View File
@@ -1,37 +1,37 @@
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003
jtag_speed 0
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst
#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe
#target configuration
daemon_startup reset
#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little run_and_halt 0 arm7tdmi
run_and_halt_time 0 30
working_area 0 0x2000C000 0x4000 nobackup
#flash bank <driver> <base> <size> <chip_width> <bus_width>
flash bank str7x 0x40000000 0x00040000 0 0 0 STR71x
#flash bank cfi 0x60000000 0x00400000 2 2 0
#Script used for FLASH programming
#target_script 0 reset str71x_flashprogram.ocd
# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003
jtag_speed 0
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst
#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe
#target configuration
daemon_startup reset
#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little run_and_halt 0 arm7tdmi
run_and_halt_time 0 30
working_area 0 0x2000C000 0x4000 nobackup
#flash bank <driver> <base> <size> <chip_width> <bus_width>
flash bank str7x 0x40000000 0x00040000 0 0 0 STR71x
#flash bank cfi 0x60000000 0x00400000 2 2 0
#Script used for FLASH programming
#target_script 0 reset str71x_flashprogram.ocd
# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
+43 -43
View File
@@ -1,43 +1,43 @@
Using the Binaries:
==================
Prequisites:
===========
1. SAMA5D3x-EK board and power supply
2. RS-232 NUL modem cable
3. A full size SD card. This should be older style SD or SDHC cards. Some
of the newest very high capacity cards will not work.
4. The WAV file jsbach16.wav
5. The NuttX HEX binary, nuttx.hex, .bin or .elf.
Procedure:
1. Put the WAV file jsbach16.wav on the SD card
2. Place the SD card in the full size SD slot on the motherboard.
3. Use SAM-BA to copy the NuttX binary to NOR flash
4. Set the boot jumper to boot from NOR FLASH
5. NSH shouls start
NuttShell (NSH) NuttX-7.3
nsh>
6. Mount the SD card at /music
nsh> mount -t vfat /dev/mmcsd0 /music
7. Star the NxPlayer and select the pcm0 device
nsh> nxplayer
NxPlayer version 1.04
h for commands, q to exit
nxplayer> device pcm0
8. And play the WAV file
nxplayer> play jsbach16.wav
Using the Binaries:
==================
Prequisites:
===========
1. SAMA5D3x-EK board and power supply
2. RS-232 NUL modem cable
3. A full size SD card. This should be older style SD or SDHC cards. Some
of the newest very high capacity cards will not work.
4. The WAV file jsbach16.wav
5. The NuttX HEX binary, nuttx.hex, .bin or .elf.
Procedure:
1. Put the WAV file jsbach16.wav on the SD card
2. Place the SD card in the full size SD slot on the motherboard.
3. Use SAM-BA to copy the NuttX binary to NOR flash
4. Set the boot jumper to boot from NOR FLASH
5. NSH shouls start
NuttShell (NSH) NuttX-7.3
nsh>
6. Mount the SD card at /music
nsh> mount -t vfat /dev/mmcsd0 /music
7. Star the NxPlayer and select the pcm0 device
nsh> nxplayer
NxPlayer version 1.04
h for commands, q to exit
nxplayer> device pcm0
8. And play the WAV file
nxplayer> play jsbach16.wav