diff options
| author | hathach <[email protected]> | 2012-12-18 15:08:30 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2012-12-18 15:08:30 +0700 |
| commit | ec4a3f60488fbd9eaf51c12b1cce79f0a7d3064f (patch) | |
| tree | 99d3f27558811ef6a5554e45d3c2cfd062e90893 /demos/device/keyboard | |
| parent | 50c89192d83ab96c894fd88a9d1ca2887ad43fec (diff) | |
cleaning
Diffstat (limited to 'demos/device/keyboard')
| -rw-r--r-- | demos/device/keyboard/.cproject | 76 | ||||
| -rw-r--r-- | demos/device/keyboard/.project | 2 | ||||
| -rw-r--r-- | demos/device/keyboard/main.c | 13 |
3 files changed, 44 insertions, 47 deletions
diff --git a/demos/device/keyboard/.cproject b/demos/device/keyboard/.cproject index 2370d4991..71eecb212 100644 --- a/demos/device/keyboard/.cproject +++ b/demos/device/keyboard/.cproject @@ -18,13 +18,13 @@ </extensions> </storageModule> <storageModule moduleId="cdtBuildSystem" version="4.0.0"> - <configuration artifactExtension="axf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.config.exe.debug.856400198" name="Board LPCXpresso1347" parent="com.crt.advproject.config.exe.debug" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size "${BuildArtifactFileName}"; # arm-none-eabi-objcopy -O binary "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" ; checksum -p ${TargetChip} -d "${BuildArtifactFileBaseName}.bin"; "> + <configuration artifactExtension="axf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser" id="com.crt.advproject.config.exe.debug.856400198" name="Board LPCXpresso1347" parent="com.crt.advproject.config.exe.debug" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size "${BuildArtifactFileName}"; # arm-none-eabi-objcopy -O binary "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" ; checksum -p ${TargetChip} -d "${BuildArtifactFileBaseName}.bin"; " preannouncebuildStep="" prebuildStep=""> <folderInfo id="com.crt.advproject.config.exe.debug.856400198." name="/" resourcePath=""> - <toolChain id="com.crt.advproject.toolchain.exe.debug.469819926" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.exe.debug"> + <toolChain errorParsers="" id="com.crt.advproject.toolchain.exe.debug.469819926" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.exe.debug"> <targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.exe.debug.548956113" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.exe.debug"/> - <builder buildPath="${workspace_loc:/device_keyboard/Debug}" id="com.crt.advproject.builder.exe.debug.1029932398" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.exe.debug"/> + <builder buildPath="${workspace_loc:/device_keyboard/Debug}" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator" id="com.crt.advproject.builder.exe.debug.1029932398" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.exe.debug"/> <tool id="com.crt.advproject.cpp.exe.debug.1119457813" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.exe.debug"/> - <tool id="com.crt.advproject.gcc.exe.debug.2040685134" name="MCU C Compiler" superClass="com.crt.advproject.gcc.exe.debug"> + <tool command="arm-none-eabi-gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="com.crt.advproject.gcc.exe.debug.2040685134" name="MCU C Compiler" superClass="com.crt.advproject.gcc.exe.debug"> <option id="com.crt.advproject.gcc.arch.658802474" name="Architecture" superClass="com.crt.advproject.gcc.arch" value="com.crt.advproject.gcc.target.cm3" valueType="enumerated"/> <option id="com.crt.advproject.gcc.thumb.697143257" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/> <option id="gnu.c.compiler.option.preprocessor.def.symbols.371325215" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols"> @@ -37,7 +37,6 @@ <option id="gnu.c.compiler.option.misc.other.204394496" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections $(CFLAGS)" valueType="string"/> <option id="gnu.c.compiler.option.include.paths.1207481236" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> <listOptionValue builtIn="false" value=""${workspace_loc:/CMSISv2p10_LPC13Uxx/inc}""/> - <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp/lpc13uxx/inc}""/> <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp}""/> <listOptionValue builtIn="false" value=""${workspace_loc:/tinyusb}""/> </option> @@ -45,14 +44,14 @@ <option id="com.crt.advproject.c.misc.dialect.1002654194" name="C Dialect" superClass="com.crt.advproject.c.misc.dialect" value="com.crt.advproject.misc.dialect.gnu99" valueType="enumerated"/> <inputType id="com.crt.advproject.compiler.input.932601394" superClass="com.crt.advproject.compiler.input"/> </tool> - <tool id="com.crt.advproject.gas.exe.debug.1050918013" name="MCU Assembler" superClass="com.crt.advproject.gas.exe.debug"> + <tool command="arm-none-eabi-gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.gas.exe.debug.1050918013" name="MCU Assembler" superClass="com.crt.advproject.gas.exe.debug"> <option id="com.crt.advproject.gas.arch.1370417737" name="Architecture" superClass="com.crt.advproject.gas.arch" value="com.crt.advproject.gas.target.cm3" valueType="enumerated"/> <option id="com.crt.advproject.gas.thumb.631765837" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/> <option id="gnu.both.asm.option.flags.crt.1931019746" name="Assembler flags" superClass="gnu.both.asm.option.flags.crt" value="-c -x assembler-with-cpp -D__REDLIB__ -DDEBUG -D__CODE_RED" valueType="string"/> <inputType id="com.crt.advproject.assembler.input.1898367800" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/> </tool> <tool id="com.crt.advproject.link.cpp.exe.debug.290831412" name="MCU C++ Linker" superClass="com.crt.advproject.link.cpp.exe.debug"/> - <tool id="com.crt.advproject.link.exe.debug.1506176667" name="MCU Linker" superClass="com.crt.advproject.link.exe.debug"> + <tool command="arm-none-eabi-gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GLDErrorParser" id="com.crt.advproject.link.exe.debug.1506176667" name="MCU Linker" superClass="com.crt.advproject.link.exe.debug"> <option id="com.crt.advproject.link.arch.1411471839" name="Architecture" superClass="com.crt.advproject.link.arch" value="com.crt.advproject.link.target.cm3" valueType="enumerated"/> <option id="com.crt.advproject.link.thumb.897273840" name="Thumb mode" superClass="com.crt.advproject.link.thumb" value="true" valueType="boolean"/> <option id="com.crt.advproject.link.script.935550147" name="Linker script" superClass="com.crt.advproject.link.script" value=""device_keyboard_LPCXpresso1347.ld"" valueType="string"/> @@ -667,7 +666,7 @@ </extensions> </storageModule> <storageModule moduleId="cdtBuildSystem" version="4.0.0"> - <configuration artifactExtension="axf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="microbuilder" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser" id="com.crt.advproject.config.exe.debug.856400198.534940316" name="Board at86rf2xx" parent="com.crt.advproject.config.exe.debug" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size "${BuildArtifactFileName}"; # arm-none-eabi-objcopy -O binary "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" ; checksum -p ${TargetChip} -d "${BuildArtifactFileBaseName}.bin"; " preannouncebuildStep="" prebuildStep=""> + <configuration artifactExtension="axf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="lpc11uxx from microbuilder" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser" id="com.crt.advproject.config.exe.debug.856400198.534940316" name="Board at86rf2xx" parent="com.crt.advproject.config.exe.debug" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size "${BuildArtifactFileName}"; # arm-none-eabi-objcopy -O binary "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" ; checksum -p ${TargetChip} -d "${BuildArtifactFileBaseName}.bin"; " preannouncebuildStep="" prebuildStep=""> <folderInfo id="com.crt.advproject.config.exe.debug.856400198.534940316." name="/" resourcePath=""> <toolChain errorParsers="" id="com.crt.advproject.toolchain.exe.debug.1347871780" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.exe.debug"> <targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.exe.debug.1543738985" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.exe.debug"/> @@ -686,7 +685,6 @@ <option id="gnu.c.compiler.option.misc.other.1222444467" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections $(CFLAGS)" valueType="string"/> <option id="gnu.c.compiler.option.include.paths.2143003127" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> <listOptionValue builtIn="false" value=""${workspace_loc:/CMSISv2p00_LPC11Uxx/inc}""/> - <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp/lpc11uxx/inc}""/> <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/bsp}""/> <listOptionValue builtIn="false" value=""${workspace_loc:/tinyusb}""/> </option> @@ -1308,45 +1306,49 @@ <storageModule moduleId="com.crt.config"> <projectStorage><?xml version="1.0" encoding="UTF-8"?> <TargetConfig> -<Properties property_0="" property_3="NXP" property_4="LPC11U37/401" property_count="5" version="1"/> -<infoList vendor="NXP"><info chip="LPC11U37/401" match_id="0x00017C40" name="LPC11U37/401" stub="crt_emu_lpc11_13_nxp"><chip><name>LPC11U37/401</name> -<family>LPC11Uxx</family> +<Properties property_0="" property_3="NXP" property_4="LPC1347" property_count="5" version="1"/> +<infoList vendor="NXP"><info chip="LPC1347" match_id="0x08020543" name="LPC1347" stub="crt_emu_lpc11_13_nxp"><chip><name>LPC1347</name> +<family>LPC13xx (12bit ADC)</family> <vendor>NXP (formerly Philips)</vendor> <reset board="None" core="Real" sys="Real"/> <clock changeable="TRUE" freq="12MHz" is_accurate="TRUE"/> <memory can_program="true" id="Flash" is_ro="true" type="Flash"/> <memory id="RAM" type="RAM"/> <memory id="Periph" is_volatile="true" type="Peripheral"/> -<memoryInstance derived_from="Flash" id="MFlash128" location="0x0" size="0x20000"/> +<memoryInstance derived_from="Flash" id="MFlash64" location="0x0" size="0x10000"/> <memoryInstance derived_from="RAM" id="RamLoc8" location="0x10000000" size="0x2000"/> <memoryInstance derived_from="RAM" id="RamUsb2" location="0x20004000" size="0x800"/> -<prog_flash blocksz="0x1000" location="0x0" maxprgbuff="0x400" progwithcode="TRUE" size="0x20000"/> -<peripheralInstance derived_from="CM0_NVIC" id="NVIC" location="0xe000e000"/> -<peripheralInstance derived_from="LPC11U_GPIO" id="GPIO" location="0x50000000"/> -<peripheralInstance derived_from="LPC11U_USBDEV" id="USB" location="0x40080000"/> -<peripheralInstance derived_from="CM0_DCR" id="DCR" location="0xe000edf0"/> -<peripheralInstance derived_from="LPC11U_GPIO_GROUP_INT" id="GPIOGROUP0INT" location="0x40060000"/> -<peripheralInstance derived_from="LPC11U_GPIO_GROUP_INT" id="GPIOGROUP1INT" location="0x4005c000"/> -<peripheralInstance derived_from="LPC11U_GPIO_INT" id="GPIOINT" location="0x4004c000"/> -<peripheralInstance derived_from="LPC11_13_SSP" id="SSP1" location="0x40058000"/> -<peripheralInstance derived_from="LPC11U_FMC" id="FMC" location="0x4003c000"/> -<peripheralInstance derived_from="LPC11U_SYSCTL" id="SYSCTL" location="0x40048000"/> -<peripheralInstance derived_from="LPC11U_IOCON" id="IOCON" location="0x40044000"/> -<peripheralInstance derived_from="LPC11_13_SSP" id="SSP0" location="0x40040000"/> -<peripheralInstance derived_from="LPC11_13_PMU" id="PMU" location="0x40038000"/> -<peripheralInstance derived_from="LPC11_13_ADC" id="ADC" location="0x4001c000"/> -<peripheralInstance derived_from="LPC11_13_TIMER32" id="TIMER1" location="0x40018000"/> -<peripheralInstance derived_from="LPC11_13_TIMER32" id="TIMER0" location="0x40014000"/> -<peripheralInstance derived_from="LPC11_13_TIMER16" id="TMR161" location="0x40010000"/> -<peripheralInstance derived_from="LPC11_13_TIMER16" id="TMR160" location="0x4000c000"/> -<peripheralInstance derived_from="LPC1xxx_UART_MODEM" id="UART0" location="0x40008000"/> -<peripheralInstance derived_from="LPC11_13_WDT" id="WDT" location="0x40004000"/> -<peripheralInstance derived_from="LPC11_13_I2C" id="I2C0" location="0x40000000"/> +<memoryInstance derived_from="RAM" id="RamPeriph2" location="0x20000000" size="0x800"/> +<prog_flash blocksz="0x1000" location="0x0" maxprgbuff="0x400" progwithcode="TRUE" size="0x10000"/> +<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="I2C" id="I2C" location="0x40000000"/> +<peripheralInstance derived_from="WWDT" id="WWDT" location="0x40004000"/> +<peripheralInstance derived_from="USART" id="USART" location="0x40008000"/> +<peripheralInstance derived_from="CT16B0" id="CT16B0" location="0x4000c000"/> +<peripheralInstance derived_from="CT16B1" id="CT16B1" location="0x40010000"/> +<peripheralInstance derived_from="CT32B0" id="CT32B0" location="0x40014000"/> +<peripheralInstance derived_from="CT32B1" id="CT32B1" location="0x40018000"/> +<peripheralInstance derived_from="ADC" id="ADC" location="0x4001c000"/> +<peripheralInstance derived_from="PMU" id="PMU" location="0x40038000"/> +<peripheralInstance derived_from="FLASHCTRL" id="FLASHCTRL" location="0x4003c000"/> +<peripheralInstance derived_from="SSP0" id="SSP0" location="0x40040000"/> +<peripheralInstance derived_from="IOCON" id="IOCON" location="0x40044000"/> +<peripheralInstance derived_from="SYSCON" id="SYSCON" location="0x40048000"/> +<peripheralInstance derived_from="GPIO-PIN-INT" id="GPIO-PIN-INT" location="0x4004c000"/> +<peripheralInstance derived_from="SSP1" id="SSP1" location="0x40058000"/> +<peripheralInstance derived_from="GPIO-GROUP-INT0" id="GPIO-GROUP-INT0" location="0x4005c000"/> +<peripheralInstance derived_from="GPIO-GROUP-INT1" id="GPIO-GROUP-INT1" location="0x40060000"/> +<peripheralInstance derived_from="RITIMER" id="RITIMER" location="0x40064000"/> +<peripheralInstance derived_from="USB" id="USB" location="0x40080000"/> +<peripheralInstance derived_from="GPIO-PORT" id="GPIO-PORT" location="0x50000000"/> </chip> -<processor><name gcc_name="cortex-m0">Cortex-M0</name> +<processor><name gcc_name="cortex-m3">Cortex-M3</name> <family>Cortex-M</family> </processor> -<link href="nxp_lpc11_13_peripheral.xme" show="embed" type="simple"/> +<link href="nxp_lpc13Uxx_peripheral.xme" show="embed" type="simple"/> </info> </infoList> </TargetConfig></projectStorage> diff --git a/demos/device/keyboard/.project b/demos/device/keyboard/.project index 4eb78ff4f..0c3358445 100644 --- a/demos/device/keyboard/.project +++ b/demos/device/keyboard/.project @@ -84,7 +84,7 @@ <link> <name>bsp</name> <type>2</type> - <location>C:/Users/hathach/Dropbox/tinyusb/tinyusb/demos/bsp</location> + <locationURI>PARENT-2-PROJECT_LOC/bsp</locationURI> </link> </linkedResources> <filteredResources> diff --git a/demos/device/keyboard/main.c b/demos/device/keyboard/main.c index 411217664..ba12f1aa3 100644 --- a/demos/device/keyboard/main.c +++ b/demos/device/keyboard/main.c @@ -12,27 +12,22 @@ // See crp.h header for more information __CRP const unsigned int CRP_WORD = CRP_NO_CRP ; -volatile uint32_t system_tick = 0; - -void SysTick_Handler (void) -{ - system_tick++; -} - int main(void) { - uint32_t current_tick = system_tick; + uint32_t current_tick = system_ticks; board_init(); tusb_init(); while (1) { - if (current_tick + 1000 < system_tick) + if (current_tick + 1000 < system_ticks) { current_tick += 1000; board_leds(0x01, (current_tick/1000)%2); /* Toggle LED once per second */ + printf("hello world\n"); + #ifndef CFG_CLASS_CDC if (usb_isConfigured()) { |
