From 989cad708a94eae063c2bf5240e636b52d78f3fc Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 26 Mar 2014 15:32:44 +0700 Subject: [PATCH] md again --- boards/readme.md | 10 +- demos/host/host_freertos/.cproject | 162 +++++++++---------- demos/host/host_freertos/host_freertos.uvopt | 14 +- tinyusb/doxygen/get_started.md | 68 ++++++++ 4 files changed, 163 insertions(+), 91 deletions(-) diff --git a/boards/readme.md b/boards/readme.md index 0ccd5934..e486509e 100644 --- a/boards/readme.md +++ b/boards/readme.md @@ -1,8 +1,8 @@ -# Boards # +# Boards # {#Boards} ## Supported Boards ## -this code base already had supported for a handful of boards. However due to my limited collection, **only bold ones are (probably) guaranteed to run out of the box**. Other are merely implemented based on their schematics and needed help from you to make it work. +This code base already had supported for a handful of boards. However due to my limited collection, **only bold ones are (probably) guaranteed to run out of the box**. Other are merely implemented based on their schematics and needed help from you to make it work. ### NXP MCU ### @@ -13,3 +13,9 @@ this code base already had supported for a handful of boards. However due to my - [Embedded Artists LPC4357 OEM & Base board](http://www.embeddedartists.com/products/kits/lpc4357_kit.php) - [NGX LPC4330 Explorer](http://shop.ngxtechnologies.com/product_info.php?products_id=104) - [Keil MCB4357 Evaluation Board](http://www.keil.com/mcb4300) + +## Add your own board ## + +If you don't possess any of supported board above. Don't worry you can easily implemented your own one by following this guide as long as the mcu is supported. + +**Guide to implement a new board is coming soon** ... \ No newline at end of file diff --git a/demos/host/host_freertos/.cproject b/demos/host/host_freertos/.cproject index 09924c3d..14bb8771 100644 --- a/demos/host/host_freertos/.cproject +++ b/demos/host/host_freertos/.cproject @@ -1,25 +1,23 @@ - - - + - + - - + + @@ -79,7 +77,7 @@ - + - - + + @@ -177,7 +174,7 @@ @@ -348,7 +344,7 @@ - + - - + + @@ -452,7 +447,7 @@ @@ -490,8 +484,11 @@ <?xml version="1.0" encoding="UTF-8"?> <TargetConfig> -<Properties property_0="" property_2="LPC18x7_43x7_2x512_BootA.cfx" property_3="NXP" property_4="LPC4357" property_count="5" version="1"/> -<infoList vendor="NXP"><info chip="LPC4357" flash_driver="LPC18x7_43x7_2x512_BootA.cfx" match_id="0x0" name="LPC4357" resetscript="LPC18LPC43InternalFLASHBootResetscript.scp" stub="crt_emu_lpc18_43_nxp"><chip><name>LPC4357</name> +<Properties property_0="" property_2="LPC18x7_43x7_2x512_BootA.cfx" property_3="NXP" property_4="LPC4357" property_count="5" version="60100"/> +<infoList vendor="NXP"> +<info chip="LPC4357" flash_driver="LPC18x7_43x7_2x512_BootA.cfx" match_id="0x0" name="LPC4357" resetscript="LPC18LPC43InternalFLASHBootResetscript.scp" stub="crt_emu_lpc18_43_nxp"> +<chip> +<name>LPC4357</name> <family>LPC43xx</family> <vendor>NXP (formerly Philips)</vendor> <reset board="None" core="Real" sys="Real"/> @@ -510,63 +507,64 @@ <prog_flash blocksz="0x10000" location="0x1a010000" maxprgbuff="0x400" progwithcode="TRUE" size="0x70000"/> <prog_flash blocksz="0x2000" location="0x1b000000" maxprgbuff="0x400" progwithcode="TRUE" size="0x10000"/> <prog_flash blocksz="0x10000" location="0x1b010000" maxprgbuff="0x400" progwithcode="TRUE" size="0x70000"/> -<peripheralInstance derived_from="V7M_MPU" id="MPU" location="0xe000ed90"/> -<peripheralInstance derived_from="V7M_NVIC" id="NVIC" location="0xe000e000"/> -<peripheralInstance derived_from="V7M_DCR" id="DCR" location="0xe000edf0"/> -<peripheralInstance derived_from="V7M_ITM" id="ITM" location="0xe0000000"/> -<peripheralInstance derived_from="SCT" id="SCT" location="0x40000000"/> -<peripheralInstance derived_from="GPDMA" id="GPDMA" location="0x40002000"/> -<peripheralInstance derived_from="SPIFI" id="SPIFI" location="0x40003000"/> -<peripheralInstance derived_from="SDMMC" id="SDMMC" location="0x40004000"/> -<peripheralInstance derived_from="EMC" id="EMC" location="0x40005000"/> -<peripheralInstance derived_from="USB0" id="USB0" location="0x40006000"/> -<peripheralInstance derived_from="USB1" id="USB1" location="0x40007000"/> -<peripheralInstance derived_from="LCD" id="LCD" location="0x40008000"/> -<peripheralInstance derived_from="EEPROM" id="EEPROM" location="0x4000e000"/> -<peripheralInstance derived_from="ETHERNET" id="ETHERNET" location="0x40010000"/> -<peripheralInstance derived_from="ATIMER" id="ATIMER" location="0x40040000"/> -<peripheralInstance derived_from="REGFILE" id="REGFILE" location="0x40041000"/> -<peripheralInstance derived_from="PMC" id="PMC" location="0x40042000"/> -<peripheralInstance derived_from="CREG" id="CREG" location="0x40043000"/> -<peripheralInstance derived_from="EVENTROUTER" id="EVENTROUTER" location="0x40044000"/> -<peripheralInstance derived_from="RTC" id="RTC" location="0x40046000"/> -<peripheralInstance derived_from="CGU" id="CGU" location="0x40050000"/> -<peripheralInstance derived_from="CCU1" id="CCU1" location="0x40051000"/> -<peripheralInstance derived_from="CCU2" id="CCU2" location="0x40052000"/> -<peripheralInstance derived_from="RGU" id="RGU" location="0x40053000"/> -<peripheralInstance derived_from="WWDT" id="WWDT" location="0x40080000"/> -<peripheralInstance derived_from="USART0" id="USART0" location="0x40081000"/> -<peripheralInstance derived_from="USART2" id="USART2" location="0x400c1000"/> -<peripheralInstance derived_from="USART3" id="USART3" location="0x400c2000"/> -<peripheralInstance derived_from="UART1" id="UART1" location="0x40082000"/> -<peripheralInstance derived_from="SSP0" id="SSP0" location="0x40083000"/> -<peripheralInstance derived_from="SSP1" id="SSP1" location="0x400c5000"/> -<peripheralInstance derived_from="TIMER0" id="TIMER0" location="0x40084000"/> -<peripheralInstance derived_from="TIMER1" id="TIMER1" location="0x40085000"/> -<peripheralInstance derived_from="TIMER2" id="TIMER2" location="0x400c3000"/> -<peripheralInstance derived_from="TIMER3" id="TIMER3" location="0x400c4000"/> -<peripheralInstance derived_from="SCU" id="SCU" location="0x40086000"/> -<peripheralInstance derived_from="GPIO-PIN-INT" id="GPIO-PIN-INT" location="0x40087000"/> -<peripheralInstance derived_from="GPIO-GROUP-INT0" id="GPIO-GROUP-INT0" location="0x40088000"/> -<peripheralInstance derived_from="GPIO-GROUP-INT1" id="GPIO-GROUP-INT1" location="0x40089000"/> -<peripheralInstance derived_from="MCPWM" id="MCPWM" location="0x400a0000"/> -<peripheralInstance derived_from="I2C0" id="I2C0" location="0x400a1000"/> -<peripheralInstance derived_from="I2C1" id="I2C1" location="0x400e0000"/> -<peripheralInstance derived_from="I2S0" id="I2S0" location="0x400a2000"/> -<peripheralInstance derived_from="I2S1" id="I2S1" location="0x400a3000"/> -<peripheralInstance derived_from="C-CAN1" id="C-CAN1" location="0x400a4000"/> -<peripheralInstance derived_from="RITIMER" id="RITIMER" location="0x400c0000"/> -<peripheralInstance derived_from="QEI" id="QEI" location="0x400c6000"/> -<peripheralInstance derived_from="GIMA" id="GIMA" location="0x400c7000"/> -<peripheralInstance derived_from="DAC" id="DAC" location="0x400e1000"/> -<peripheralInstance derived_from="C-CAN0" id="C-CAN0" location="0x400e2000"/> -<peripheralInstance derived_from="ADC0" id="ADC0" location="0x400e3000"/> -<peripheralInstance derived_from="ADC1" id="ADC1" location="0x400e4000"/> -<peripheralInstance derived_from="GPIO-PORT" id="GPIO-PORT" location="0x400f4000"/> -<peripheralInstance derived_from="SPI" id="SPI" location="0x40100000"/> -<peripheralInstance derived_from="SGPIO" id="SGPIO" location="0x40101000"/> +<peripheralInstance derived_from="V7M_MPU" determined="infoFile" id="MPU" location="0xe000ed90"/> +<peripheralInstance derived_from="V7M_NVIC" determined="infoFile" id="NVIC" location="0xe000e000"/> +<peripheralInstance derived_from="V7M_DCR" determined="infoFile" id="DCR" location="0xe000edf0"/> +<peripheralInstance derived_from="V7M_ITM" determined="infoFile" id="ITM" location="0xe0000000"/> +<peripheralInstance derived_from="SCT" determined="infoFile" id="SCT" location="0x40000000"/> +<peripheralInstance derived_from="GPDMA" determined="infoFile" id="GPDMA" location="0x40002000"/> +<peripheralInstance derived_from="SPIFI" determined="infoFile" id="SPIFI" location="0x40003000"/> +<peripheralInstance derived_from="SDMMC" determined="infoFile" id="SDMMC" location="0x40004000"/> +<peripheralInstance derived_from="EMC" determined="infoFile" id="EMC" location="0x40005000"/> +<peripheralInstance derived_from="USB0" determined="infoFile" id="USB0" location="0x40006000"/> +<peripheralInstance derived_from="USB1" determined="infoFile" id="USB1" location="0x40007000"/> +<peripheralInstance derived_from="LCD" determined="infoFile" id="LCD" location="0x40008000"/> +<peripheralInstance derived_from="EEPROM" determined="infoFile" id="EEPROM" location="0x4000e000"/> +<peripheralInstance derived_from="ETHERNET" determined="infoFile" id="ETHERNET" location="0x40010000"/> +<peripheralInstance derived_from="ATIMER" determined="infoFile" id="ATIMER" location="0x40040000"/> +<peripheralInstance derived_from="REGFILE" determined="infoFile" id="REGFILE" location="0x40041000"/> +<peripheralInstance derived_from="PMC" determined="infoFile" id="PMC" location="0x40042000"/> +<peripheralInstance derived_from="CREG" determined="infoFile" id="CREG" location="0x40043000"/> +<peripheralInstance derived_from="EVENTROUTER" determined="infoFile" id="EVENTROUTER" location="0x40044000"/> +<peripheralInstance derived_from="RTC" determined="infoFile" id="RTC" location="0x40046000"/> +<peripheralInstance derived_from="CGU" determined="infoFile" id="CGU" location="0x40050000"/> +<peripheralInstance derived_from="CCU1" determined="infoFile" id="CCU1" location="0x40051000"/> +<peripheralInstance derived_from="CCU2" determined="infoFile" id="CCU2" location="0x40052000"/> +<peripheralInstance derived_from="RGU" determined="infoFile" id="RGU" location="0x40053000"/> +<peripheralInstance derived_from="WWDT" determined="infoFile" id="WWDT" location="0x40080000"/> +<peripheralInstance derived_from="USART0" determined="infoFile" id="USART0" location="0x40081000"/> +<peripheralInstance derived_from="USART2" determined="infoFile" id="USART2" location="0x400c1000"/> +<peripheralInstance derived_from="USART3" determined="infoFile" id="USART3" location="0x400c2000"/> +<peripheralInstance derived_from="UART1" determined="infoFile" id="UART1" location="0x40082000"/> +<peripheralInstance derived_from="SSP0" determined="infoFile" id="SSP0" location="0x40083000"/> +<peripheralInstance derived_from="SSP1" determined="infoFile" id="SSP1" location="0x400c5000"/> +<peripheralInstance derived_from="TIMER0" determined="infoFile" id="TIMER0" location="0x40084000"/> +<peripheralInstance derived_from="TIMER1" determined="infoFile" id="TIMER1" location="0x40085000"/> +<peripheralInstance derived_from="TIMER2" determined="infoFile" id="TIMER2" location="0x400c3000"/> +<peripheralInstance derived_from="TIMER3" determined="infoFile" id="TIMER3" location="0x400c4000"/> +<peripheralInstance derived_from="SCU" determined="infoFile" id="SCU" location="0x40086000"/> +<peripheralInstance derived_from="GPIO-PIN-INT" determined="infoFile" id="GPIO-PIN-INT" location="0x40087000"/> +<peripheralInstance derived_from="GPIO-GROUP-INT0" determined="infoFile" id="GPIO-GROUP-INT0" location="0x40088000"/> +<peripheralInstance derived_from="GPIO-GROUP-INT1" determined="infoFile" id="GPIO-GROUP-INT1" location="0x40089000"/> +<peripheralInstance derived_from="MCPWM" determined="infoFile" id="MCPWM" location="0x400a0000"/> +<peripheralInstance derived_from="I2C0" determined="infoFile" id="I2C0" location="0x400a1000"/> +<peripheralInstance derived_from="I2C1" determined="infoFile" id="I2C1" location="0x400e0000"/> +<peripheralInstance derived_from="I2S0" determined="infoFile" id="I2S0" location="0x400a2000"/> +<peripheralInstance derived_from="I2S1" determined="infoFile" id="I2S1" location="0x400a3000"/> +<peripheralInstance derived_from="C-CAN1" determined="infoFile" id="C-CAN1" location="0x400a4000"/> +<peripheralInstance derived_from="RITIMER" determined="infoFile" id="RITIMER" location="0x400c0000"/> +<peripheralInstance derived_from="QEI" determined="infoFile" id="QEI" location="0x400c6000"/> +<peripheralInstance derived_from="GIMA" determined="infoFile" id="GIMA" location="0x400c7000"/> +<peripheralInstance derived_from="DAC" determined="infoFile" id="DAC" location="0x400e1000"/> +<peripheralInstance derived_from="C-CAN0" determined="infoFile" id="C-CAN0" location="0x400e2000"/> +<peripheralInstance derived_from="ADC0" determined="infoFile" id="ADC0" location="0x400e3000"/> +<peripheralInstance derived_from="ADC1" determined="infoFile" id="ADC1" location="0x400e4000"/> +<peripheralInstance derived_from="GPIO-PORT" determined="infoFile" id="GPIO-PORT" location="0x400f4000"/> +<peripheralInstance derived_from="SPI" determined="infoFile" id="SPI" location="0x40100000"/> +<peripheralInstance derived_from="SGPIO" determined="infoFile" id="SGPIO" location="0x40101000"/> </chip> -<processor><name gcc_name="cortex-m4">Cortex-M4</name> +<processor> +<name gcc_name="cortex-m4">Cortex-M4</name> <family>Cortex-M</family> </processor> <link href="nxp_lpc43xx_peripheral.xme" show="embed" type="simple"/> diff --git a/demos/host/host_freertos/host_freertos.uvopt b/demos/host/host_freertos/host_freertos.uvopt index 98b99d51..04d9e6e3 100644 --- a/demos/host/host_freertos/host_freertos.uvopt +++ b/demos/host/host_freertos/host_freertos.uvopt @@ -73,7 +73,7 @@ 1 0 - 0 + 1 8 @@ -745,7 +745,7 @@ 1 0 - 1 + 0 8 @@ -857,7 +857,7 @@ app - 1 + 0 0 0 0 @@ -977,7 +977,7 @@ tinyusb - 0 + 1 0 0 0 @@ -1441,7 +1441,7 @@ 3 36 1 - 1 + 0 0 1 0 @@ -1541,8 +1541,8 @@ 0 0 0 - 59 - 73 + 66 + 81 0 ..\..\..\boards\board.c board.c diff --git a/tinyusb/doxygen/get_started.md b/tinyusb/doxygen/get_started.md index e69de29b..1a38d57b 100644 --- a/tinyusb/doxygen/get_started.md +++ b/tinyusb/doxygen/get_started.md @@ -0,0 +1,68 @@ +# Get Started # + +## Download ## + +tinyusb uses github as online repository https://github.com/hathach/tinyusb since it is the best place for open source project. + +If you are using Linux, you already know how to what to do. But If Windows is your OS, I would suggest to install [git](http://git-scm.com/) and front-end gui such as [tortoisegit](http://code.google.com/p/tortoisegit) to begin with. + +After downloading/cloning, the code base is composed of + +Folder | Description +----- | ------------- +boards | Source files of supported boards +demos | Source & project files for demonstration application +docs | Documentation +mcu | Low level mcu core & peripheral drivers (e.g CMSIS ) +tests | Unit tests for the stack +tinyusb | All sources files for tinyusb stack itself. +vendor | Source files from 3rd party such as freeRTOS, fatfs etc ... + +## Import & Build ## + +*/demos* is the folder where all the application & project files are located. There are demos for both device and hosts. For each, there are different projects for each of supported RTOS. + +### Prerequisites ### + +In order to build and run application demo, you would need + +- A [supported development board](../../boards/readme.md) +- A supported toolchain: LPCXpresso, Keil, IAR. + +### LPCXpresso ### + +To prevent any sort of problems, it is recommended to do **EXACTLY** as follows (esp the item 4) + +1. Copy the whole repo folder to your lpcxpresso's workspace. +2. Click *File->Import*, then expand the *General* folder and select **Existing Projects into Workspace** and click Next ![lpcxpresso_import.png](lpcxpresso_import.png) +3. On the next dialog, Click *Browse* and choose the **/demos** folder inside the repo. You should see a list of all demo applications ![lpcxpresso_import2.png](lpcxpresso_import2.png). +4. **IMPORTANT** make sure the option **"Copy projects into workspace"** is **clear**. As demo application uses link folders and this option may cause problem for the import. +5. Choose any of the demo application and click *Finish* +6. Select the configure corresponding to your development board ![lpcxpresso_select_config.png](lpcxpresso_select_config.png) +7. Then select the correct MCU option from project properties ![lpcxpresso_mcu.png](lpcxpresso_mcu.png) then you are ready to go. + +### Keil ### + +It is relatively simple for Keil + +1. Open the desired demo project e.g */demos/host/host_freertos/host_freertos.uvproj* +2. Select the configure corresponding to your development board ![keil_select_board.png](keil_select_board.png) and build it. + +### IAR ### + +IAR is just as easy as Keil + +1. Open the desired demo project e.g */demos/host/host_freertos/host_freertos.eww* +2. Again select the configure corresponding to your development board ![iar_select_board.png](iar_select_board.png) and build it. + +## Configure demo ## + +Application demo is written to have the code excluded if its required option is not enabled in [tusb_config.h](). Some of combination may exceed the 32KB limit of IAR/Keil so you may want to re-configure to disable some class support, decrease TUSB_CFG_DEBUG or increase the compiler optimization level. + +In addition, there are some configuration you can change such as + +- CFG_UART_BAUDRATE in board.h +- CFG_PRINTF_TARGET in the specific board header (e.g board_ea4357.h) to either Semihost, Uart, or SWO. + +/// @subpage Boards +@subpage Boards