added notes on addtional platforms

This commit is contained in:
Matthias Ringwald 2015-04-26 22:21:30 +02:00
parent 7b8193d592
commit 262f934d54
2 changed files with 48 additions and 11 deletions

View File

@ -145,14 +145,15 @@ morekeywords={*, timer_source_t, data_source_t, uint32_t, uint16_t, uint8_t, RUN
\pagebreak
Thanks for checking out BTstack! In this manual, we first provide the usual 'quick starter guide' before highlighting BTstack's main design choices and going into more details with a few examples. Finally, we outline the basic steps when integrating BTstack into existing single-threaded or even multi-threaded environments. The Revision History is shown in the Appendix \ref{appendix:revision_history} on page \pageref{appendix:revision_history}.
Thanks for checking out BTstack! In this manual, we first provide a 'quick starter guide' for common platforms before highlighting BTstack's main design choices and go over all implemented protocols and profiles. A series of examples shows how BTstack can be used to implement common
use cases. Finally, we outline the basic steps when integrating BTstack into existing single-threaded or even multi-threaded environments. The Revision History is shown in the Appendix \ref{appendix:revision_history} on page \pageref{appendix:revision_history}.
\section{Quick Start}
\subsection{General Tools}
On Unix-based systems, git, make, and Python are usually installed. If not, use the system's packet manager to install them.
On Windows, you need to install and configure mspgcc, GNU Make, Python, and optionally git manually:
On Windows, you need to install and configure, GNU Make, Python, and optionally git manually:
\begin{itemize}
\item \GNUMake{} for Windows: Add its bin folder to the Windows Path in Environment Variables. The bin folder is where make.exe resides, and it's usually located in \path{C:\Program Files\GnuWin32\bin}.
\item \Python{} for Windows: Add Python installation folder to the Windows Path in Environment Variables.
@ -163,8 +164,8 @@ Adding paths to the Windows Path variable:
\item Go to: Control Panel$\rightarrow$System$\rightarrow$Advanced tab$\rightarrow$Environment Variables.
\item The top part contains a list of User variables.
\item Click on the Path variable and then click edit.
\item Go to the end of the line, then append the path to the list., for example, \path{C:\mspgcc\bin} for mspgcc.
\item Ensure that there is a semicolon before and after \path{C:\mspgcc\bin}.
\item Go to the end of the line, then append the path to the list., for example, \path{C:\Program Files\GnuWin32\bin} for GNU Make.
\item Ensure that there is a semicolon before and after \path{C:\Program Files\GnuWin32\bin}.
\end{itemize}
\subsection{Getting BTstack from GitHub}
@ -188,9 +189,10 @@ This step is platform specific. To compile and run the examples, you need to dow
\toprule
\hiderowcolors Platform & Chipset & Toolchain & Programmer\\ \showrowcolors
\midrule
ez430-rf2560, msp-exp430f5438, msp430f5229lp & CC256x & \mspgcc{} &\MSPFlasher{}, \MSPDebug{} \\
stm32-f103rb-nucleo & CC256x & \gccarm{} & \OpenOCD{} \\
pic32-harmony & CSR8811 & \mplabxc{} & \PICkit{} \\ \hiderowcolors
ez430-rf2560, msp-exp430f5438, msp430f5229lp & CC256x & \mspgcc{} & \MSPFlasher{}, \MSPDebug{} \\
stm32-f103rb-nucleo & CC256x & \gccarm{} & \OpenOCD{} \\
pic32-harmony & CSR8811 & \mplabxc{} & \PICkit{} \\ \hiderowcolors
libusb on Linux/OS X & any & any & N/A \\
\bottomrule
\label{table:platformCompiler}
\end{tabular}
@ -439,7 +441,7 @@ Separate packet handlers can be used for each L2CAP service and outgoing connect
\section{Examples}
\label{section:examples}
In this section, we will describe a number of examples from the \emph{example/embedded} folder. To allow code-reuse with different platforms as well as with new ports, the low-level initialization of BTstack and the hardware configuration has been extracted to the various \emph{platforms/\$PLATFORM/main.c} files. The examples only contain the platform-independent Bluetooth logic. But let's have a look at the common init code.
In this section, we will describe a number of examples from the \emph{example/embedded} folder. To allow code-reuse with different platforms as well as with new ports, the low-level initialization of BTstack and the hardware configuration has been extracted to the various \emph{platforms/PLATFORM/main.c} files. The examples only contain the platform-independent Bluetooth logic. But let's have a look at the common init code.
Listing \ref{listing:btstackInit} shows a minimal platform setup for an embedded system with a Bluetooth chipset connected via UART.

View File

@ -6,7 +6,7 @@ In the following, we provide more information on specific platform setups, toolc
\emph{Compiler Setup} The MSP430 port of BTstack is developed using the Long Term Support (LTS) version of mspgcc. General information about it and installation instructions are provided on the \MSPGCCWiki{}. On Windows, you need to download and extract \mspgcc{} to \path{C:\mspgcc}. Add \path{C:\mspgcc\bin} folder to the Windows Path in Environment variable as explained in Section \ref{sec:windowsPath}.
\emph{Loading Firmware} To load firmware files onto the MSP430 MCU, you need a programmer like the MSP430 MSP-FET430UIF debugger or something similar. Now, you can use one of following software tools:
\emph{Loading Firmware} To load firmware files onto the MSP430 MCU for the MSP-EXP430F5438 Experimeneter board, you need a programmer like the MSP430 MSP-FET430UIF debugger or something similar. The eZ430-RF2560 and MSP430F5529LP contain a basic debugger. the Now, you can use one of following software tools:
\begin{itemize}
\item \MSPFlasher{} (windows-only):
@ -34,17 +34,52 @@ run
\subsubsection{Texas Instruments CC256x-based chipsets}
\emph{CC256x Init Scripts} In order to use the CC256x chipset on the PAN13xx modules and others, an initialization script must be obtained. Due to licensing restrictions, this initialization script must be obtained separately as follows:
\begin{itemize}
\item Download the \BTSfile{} for your PAN13xx module.
\item Download the \BTSfile{} for your CC256x-based module.
\item Copy the included .bts file into \path{btstack/chipset-cc256x}
\item In \path{chipset-cc256x}, run the Python script: $./convert\_bts\_init\_scripts.py$
\end{itemize}
The common code for all CC256x chipsets is provided by $bt\_control\_cc256x.c$. During the setup, $bt\_control\_cc256x\_instance$ function is used to get a $bt\_control\_t$ instance and passed to $hci\_init$ function.
Note: Depending on the PAN13xx module you're using, you'll need to update the reference \path{bluetooth_init_cc256...} in the Makefile to match the downloaded file.
Note: Depending on the CC256x-based module you're using, you'll need to update the reference \path{bluetooth_init_cc256...} in the Makefile to match the downloaded file.
Update: For the latest revision of the CC256x chipsets, the CC2560B and CC2564B, TI decided to split the init script into a main part and the BLE part. The conversion script has been updated to detect $blueooth\_init\_cc256x\_1.2.bts$ and adds $BLE\_init\_cc256x\_1.2.bts$ if present and merges them into a single .c file.
\subsubsection{MSP-EXP430F5438 + CC256x Platform}
\label{platform:msp430}
\emph{Hardware Setup} We assume that a PAN1315, PAN1317, or PAN1323 module is plugged into RF1 and RF2 of the MSP-EXP430F5438 board and the "RF3 Adapter board" is used or at least simulated. See \UserGuide{}.
\subsubsection{STM32F103RB Nucleo + CC256x Platform}
To try BTstack on this platform, you'll need a simple adaptor board. For details, please read the documentation in \path{platforms/stm32-f103rb-nucleo/README.md}.
\subsubsection{PIC32 Bluetooth Audio Development Kit}
The PIC32 Bluetooth Audio Development Kit comes with the CSR8811-based BTM805 Bluetooth module. In the port, the UART on the DAC daugtherboard was used for the debug output. Please remove the DAC board and connect a 3.3V USB-2-UART converter to GND and TX to get the debug output.
In \path{platforms/pic32-harmony}, a project file for the MPLAB X IDE is provided as well as a regular Makefile. Both assume that the MPLAB XC32 compiler is installed. The project is set to use -Os optimization which will cause warnings if you only have the Free version. It will still compile a working example. For this platform, we only provide the SPP and LE Counter example directly. Other examples can be run by replacing the spp\_and\_le\_counter.c file with one of the other example files.
\subsubsection{libusb}
The quickest way to try BTstack is on a Linux or OS X system with an additional USB Bluetooth module. The Makefile in \path{platforms/libusb}
requires pkgconfig and libusb-1.0 or higher to be installed.
On Linux, it's usually necessary to run the examples as root as the kernel needs to detach from the USB module.
On OS X, it's neccessary to tell the OS to only use the internal Bluetooth. For this, execute
\begin{lstlisting}
sudo nvram bluetoothHostControllerSwitchBehavior=never
\end{lstlisting}
It's also possible to run the examples on Win32 systems. For this,
\begin{itemize}
\item Install MSYS and MINGW32 using the MINGW installer
\item Compile and install libusb-1.0.19 to /usr/local/ in msys command shell
\item Setup a USB Bluetooth dongle for use with libusb-1.0:
\begin{itemize}
\item Start Zadig from http://zadig.akeo.ie
\item Select Options $\rightarrow$ List all devices
\item Select USB Bluetooth dongle in the big pull down list
\item Select WinUSB (libusb) in the right pull pull down list
\item Select Replace Driver
\end{itemize}
\end{itemize}
Now, you can run the examples from the msys shell the same way as on Linux/OS X.