change building process yes, again

This commit is contained in:
hathach 2012-12-07 17:59:46 +07:00
parent cd74f4f0ed
commit 70e3a13951
12 changed files with 1180 additions and 102 deletions

View File

@ -57,17 +57,22 @@
#include <stdint.h>
#define TICKS_PER_SECOND 1000
/// n-th Bit
#ifndef BIT
#define BIT(n) (1 << (n))
#endif
#define BOARD_NGX43XX 1
#define BOARD_LPCXPRESSOUXX 2
#define BOARD_LPCXPRESSO1347 2
#define BOARD_AT86RF2XX 3
#if BOARD == BOARD_NGX43XX
//#include "board_ngx4330.h"
#elif BOARD == BOARD_LPCXPRESSO13UXX
#elif BOARD == BOARD_LPCXPRESSO1347
#elif BOARD == BOARD_AT86RF2XX
#else
#error BOARD is not defined or supported yet

View File

@ -1,5 +1,5 @@
/*
* board_at86rf2xx_11uxx.c
* board_at86rf2xx.c
*
* Created on: Dec 7, 2012
* Author: hathach
@ -37,7 +37,7 @@
#include "board.h"
#if BOARD == BOARD_AT86RF2XX_11UXX
#if BOARD == BOARD_AT86RF2XX
#include "LPC11Uxx.h"
#include "gpio.h"

View File

@ -37,9 +37,10 @@
#include "board.h"
#if BOARD == BOARD_LPCXPRESSO13UXX
#if BOARD == BOARD_LPCXPRESSO1347
#include "LPC13Uxx.h"
#include "gpio.h"
#define CFG_LED_PORT (0)
#define CFG_LED_PIN (7)
@ -49,7 +50,7 @@
void board_init(void)
{
SystemInit();
systickInit(1);
SysTick_Config(SystemCoreClock / TICKS_PER_SECOND); // 1 msec tick timer
GPIOInit();
GPIOSetDir(CFG_LED_PORT, CFG_LED_PIN, 1);
LPC_GPIO->CLR[CFG_LED_PORT] = (1 << CFG_LED_PIN);
@ -58,7 +59,7 @@ void board_init(void)
void board_leds(uint32_t mask, uint32_t state)
{
if (mask)
GPIOSetBitValue(CFG_LED_PORT, CFG_LED_PIN, state);
GPIOSetBitValue(CFG_LED_PORT, CFG_LED_PIN, mask & state);
}
#endif

View File

@ -1,5 +1,3 @@
#ifdef __LPC11UXX__
//*****************************************************************************
// +--+
// | ++----+
@ -47,8 +45,6 @@ extern "C" {
#define WEAK __attribute__ ((weak))
#define ALIAS(f) __attribute__ ((weak, alias (#f)))
#define __USE_CMSIS // Added by nxpUSBlib
// Code Red - if CMSIS is being used, then SystemInit() routine
// will be called by startup code rather than in application's main()
#if defined (__USE_CMSIS)
@ -383,4 +379,3 @@ void IntDefaultHandler(void)
}
}
#endif /* __LPC11UXX__ */

View File

@ -5,11 +5,11 @@ CFLAGS = $(MACROS_DEF) $(INC_PATH)
MACROS_DEF += -DBOARD=$(board) -DMCU=MCU_$(MCU)
#MCU currently supported
mcu_support = 13UXX
mcu_support = 13UXX 11UXX
################ Board and MCU determination ################
#all configuration build's name must be named after the macro BOARD_NAME defined in the tinyusb/demos/boards/board.h
buildname := $(shell echo $(notdir $(build_dir)) | tr a-z A-Z)
buildname = $(shell echo $(notdir $(build_dir)) | tr a-z A-Z)
board = $(buildname)
mcu = $(shell echo $(MCU) | tr A-Z a-z)
@ -19,12 +19,14 @@ ifeq (,$(findstring BOARD_,$(board)))
$(error build's name must be name exactly the same as the macro BOARD_NAME defined in the tinyusb/demos/boards/board.h)
endif
MCU := LPC$(findstring $(mcu_support),$(board))
MCU := $(strip $(foreach supported_chip, $(mcu_support), $(findstring $(supported_chip),$(board))))
ifeq (,$(MCU))
$(error build name must contain one of supported mcu: $(mcu_support))
endif
MCU := LPC$(MCU)
$(warning MCU $(MCU) $(mcu))
################ Build Manipulate ################
@ -36,20 +38,19 @@ toolchain = xpresso
OBJS := $(filter-out ./bsp/$(mcu)/startup%,$(OBJS)) $(filter ./bsp/$(mcu)/startup_$(toolchain)%,$(OBJS))
#CMSIS include path & lib path
cmsis_proj = CMSISv2p10_$(shell echo $(MCU) | tr X x)
cmsis_proj = $(shell cd $(workspace_dir); ls | grep -i "CMSIS.*$(MCU)")
rel_include += $(cmsis_proj)/inc
rel_include += demos/bsp/boards
rel_include += demos/bsp/$(mcu)/inc
INC_PATH = $(addprefix -I"$(workspace_dir)/, $(addsuffix ",$(rel_include)))
LIBS += -l$(cmsis_proj) -L"$(workspace_dir)/$(cmsis_proj)/Debug"
#$(warning $(OBJS))
#$(error $(OBJS))
#generate makefiles.def containing MCU define for tinyusb lib
$(shell echo CFLAGS = -DMCU=MCU_$(MCU) > $(workspace_dir)/tinyusb/makefile.defs)
#tinyusb_CFLAGS = -DMCU=MCU_$(MCU) -I\"$(workspace_dir)/$(cmsis_proj)/inc\"
#$(shell echo CFLAGS = $(tinyusb_CFLAGS) > $(workspace_dir)/tinyusb/makefile.defs)
#$(shell echo $$\(warning MCU = MCU_$(MCU)\) >> $(workspace_dir)/tinyusb/makefile.defs)

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,7 @@
<name>device_keyboard</name>
<comment></comment>
<projects>
<project>tinyusb</project>
</projects>
<buildSpec>
<buildCommand>
@ -86,4 +87,15 @@
<location>C:/Users/hathach/Dropbox/tinyusb/tinyusb/demos/bsp</location>
</link>
</linkedResources>
<filteredResources>
<filter>
<id>1354876380300</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-startup_keil</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>

View File

@ -4,7 +4,7 @@
#include <cr_section_macros.h>
#include <NXP/crp.h>
#include "board.h"
#include "boards/board.h"
#include "tusb.h"
// Variable to store CRP value in. Will be placed automatically
@ -12,22 +12,26 @@
// 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 currentSecond, lastSecond;
currentSecond = lastSecond = 0;
uint32_t current_tick = system_tick;
board_init();
tusb_init();
while (1)
{
currentSecond = systickGetSecondsActive();
if (currentSecond != lastSecond)
if (current_tick + 1000 < system_tick)
{
/* Toggle LED once per second */
lastSecond = currentSecond;
board_leds(0x01, lastSecond%2);
current_tick += 1000;
board_leds(0x01, (current_tick/1000)%2); /* Toggle LED once per second */
#ifndef CFG_CLASS_CDC
if (usb_isConfigured())

View File

@ -5,6 +5,6 @@ proj_path = $(build_dir)/..
#get workspace absolute path
workspace_dir = $(shell cd $(proj_path)/../../.. ; pwd)
#workspace_dir = $(proj_path)/../../../
$(warning workspace $(workspace_dir))
#$(warning workspace $(workspace_dir))
include $(workspace_dir)/demos/demos.mk
#include $(workspace_dir)/demos/demos.mk

View File

@ -24,14 +24,14 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" cleanCommand="rm -rf" description="Debug build" 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.lib.debug.1649411711" name="Debug" parent="com.crt.advproject.config.lib.debug" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size &quot;lib${BuildArtifactFileName}&quot; ; # arm-none-eabi-objdump -h -S &quot;lib${BuildArtifactFileName}&quot; &gt;&quot;${BuildArtifactFileBaseName}.lss&quot;">
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" 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.lib.debug.1649411711" name="Debug" parent="com.crt.advproject.config.lib.debug" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size &quot;lib${BuildArtifactFileName}&quot; ; # arm-none-eabi-objdump -h -S &quot;lib${BuildArtifactFileName}&quot; &gt;&quot;${BuildArtifactFileBaseName}.lss&quot;">
<folderInfo id="com.crt.advproject.config.lib.debug.1649411711." name="/" resourcePath="">
<toolChain id="com.crt.advproject.toolchain.lib.debug.182043409" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.lib.debug">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.lib.debug.276812855" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.lib.debug"/>
<builder buildPath="${workspace_loc:/tinyusb/Debug}" id="com.crt.advproject.builder.lib.debug.635723021" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.lib.debug"/>
<tool id="com.crt.advproject.cpp.lib.debug.2024209898" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.lib.debug"/>
<tool id="com.crt.advproject.gcc.lib.debug.945784121" name="MCU C Compiler" superClass="com.crt.advproject.gcc.lib.debug">
<option id="com.crt.advproject.gcc.arch.1721006216" name="Architecture" superClass="com.crt.advproject.gcc.arch" value="com.crt.advproject.gcc.target.cm0" valueType="enumerated"/>
<tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="com.crt.advproject.gcc.lib.debug.945784121" name="MCU C Compiler" superClass="com.crt.advproject.gcc.lib.debug">
<option id="com.crt.advproject.gcc.arch.1721006216" name="Architecture" superClass="com.crt.advproject.gcc.arch" value="com.crt.advproject.gcc.target.cm3" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.thumb.161386546" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.216263139" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__REDLIB__"/>
@ -41,8 +41,8 @@
<option id="gnu.c.compiler.option.misc.other.905582730" 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.676739297" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/device_keyboard}&quot;"/>
</option>
<option id="com.crt.advproject.c.misc.dialect.115038234" 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.1916733927" superClass="com.crt.advproject.compiler.input"/>
</tool>
<tool id="com.crt.advproject.gas.lib.debug.2088968785" name="MCU Assembler" superClass="com.crt.advproject.gas.lib.debug">
@ -176,12 +176,13 @@
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cconfiguration>
<cconfiguration id="com.crt.advproject.config.lib.release.1836699926">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.lib.release.1836699926" moduleId="org.eclipse.cdt.core.settings" name="Release">
<cconfiguration id="com.crt.advproject.config.lib.debug.1649411711.573376249">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.lib.debug.1649411711.573376249" moduleId="org.eclipse.cdt.core.settings" name="lpc13uxx">
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/tinyusb"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/tinyusb/Release"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/tinyusb/Debug"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/tinyusb/lpc13uxx"/>
<entry flags="RESOLVED" kind="libraryFile" name="tinyusb"/>
</externalSetting>
</externalSettings>
@ -197,30 +198,214 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" cleanCommand="rm -rf" description="Release build" 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.lib.release.1836699926" name="Release" parent="com.crt.advproject.config.lib.release" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size &quot;lib${BuildArtifactFileName}&quot; ; # arm-none-eabi-objdump -h -S &quot;lib${BuildArtifactFileName}&quot; &gt;&quot;${BuildArtifactFileBaseName}.lss&quot;">
<folderInfo id="com.crt.advproject.config.lib.release.1836699926." name="/" resourcePath="">
<toolChain id="com.crt.advproject.toolchain.lib.release.1472973154" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.lib.release">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.lib.release.702015960" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.lib.release"/>
<builder buildPath="${workspace_loc:/tinyusb/Release}" id="com.crt.advproject.builder.lib.release.2135229808" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.lib.release"/>
<tool id="com.crt.advproject.cpp.lib.release.1531358435" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.lib.release"/>
<tool id="com.crt.advproject.gcc.lib.release.1587353577" name="MCU C Compiler" superClass="com.crt.advproject.gcc.lib.release">
<option id="com.crt.advproject.gcc.arch.577531018" name="Architecture" superClass="com.crt.advproject.gcc.arch" value="com.crt.advproject.gcc.target.cm3" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.thumb.799753906" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1852028305" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" cleanCommand="rm -rf" description="12-bit AD" 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.lib.debug.1649411711.573376249" name="lpc13uxx" parent="com.crt.advproject.config.lib.debug" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size &quot;lib${BuildArtifactFileName}&quot; ; # arm-none-eabi-objdump -h -S &quot;lib${BuildArtifactFileName}&quot; &gt;&quot;${BuildArtifactFileBaseName}.lss&quot;">
<folderInfo id="com.crt.advproject.config.lib.debug.1649411711.573376249." name="/" resourcePath="">
<toolChain id="com.crt.advproject.toolchain.lib.debug.409773316" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.lib.debug">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.lib.debug.1953775934" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.lib.debug"/>
<builder buildPath="${workspace_loc:/tinyusb/Debug}" id="com.crt.advproject.builder.lib.debug.91562903" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.lib.debug"/>
<tool id="com.crt.advproject.cpp.lib.debug.44665447" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.lib.debug"/>
<tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="com.crt.advproject.gcc.lib.debug.1375217666" name="MCU C Compiler" superClass="com.crt.advproject.gcc.lib.debug">
<option id="com.crt.advproject.gcc.arch.254763414" name="Architecture" superClass="com.crt.advproject.gcc.arch" value="com.crt.advproject.gcc.target.cm3" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.thumb.724152017" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.38062140" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__REDLIB__"/>
<listOptionValue builtIn="false" value="NDEBUG"/>
<listOptionValue builtIn="false" value="MCU=MCU_LPC13UXX"/>
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="__CODE_RED"/>
</option>
<option id="gnu.c.compiler.option.misc.other.1058839458" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections" valueType="string"/>
<inputType id="com.crt.advproject.compiler.input.351960569" superClass="com.crt.advproject.compiler.input"/>
<option id="gnu.c.compiler.option.misc.other.1295799297" 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.434246197" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/CMSISv2p10_LPC13Uxx/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/device_keyboard}&quot;"/>
</option>
<option id="com.crt.advproject.c.misc.dialect.819597399" 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.730358949" superClass="com.crt.advproject.compiler.input"/>
</tool>
<tool id="com.crt.advproject.gas.lib.release.685218310" name="MCU Assembler" superClass="com.crt.advproject.gas.lib.release">
<option id="com.crt.advproject.gas.arch.198977438" name="Architecture" superClass="com.crt.advproject.gas.arch" value="com.crt.advproject.gas.target.cm3" valueType="enumerated"/>
<option id="com.crt.advproject.gas.thumb.167362346" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/>
<option id="gnu.both.asm.option.flags.crt.330731069" name="Assembler flags" superClass="gnu.both.asm.option.flags.crt" value="-c -x assembler-with-cpp -D__REDLIB__ -DNDEBUG -D__CODE_RED" valueType="string"/>
<inputType id="com.crt.advproject.assembler.input.606534590" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
<tool id="com.crt.advproject.gas.lib.debug.1003712171" name="MCU Assembler" superClass="com.crt.advproject.gas.lib.debug">
<option id="com.crt.advproject.gas.arch.2065642102" name="Architecture" superClass="com.crt.advproject.gas.arch" value="com.crt.advproject.gas.target.cm3" valueType="enumerated"/>
<option id="com.crt.advproject.gas.thumb.1658880574" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/>
<option id="gnu.both.asm.option.flags.crt.1762550536" 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.1520962980" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
</tool>
<tool id="com.crt.advproject.ar.lib.release.1346156952" name="MCU Archiver" superClass="com.crt.advproject.ar.lib.release"/>
<tool id="com.crt.advproject.ar.lib.debug.74918517" name="MCU Archiver" superClass="com.crt.advproject.ar.lib.debug"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="_OHCI.c|_HCD (2).c|_EHCI.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<profile id="com.crt.advproject.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="false"/>
</buildOutputProvider>
<scannerInfoProvider id="com.crt.advproject.specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-c++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="com.crt.advproject.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="false"/>
</buildOutputProvider>
<scannerInfoProvider id="com.crt.advproject.specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file} " command="arm-none-eabi-gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="com.crt.advproject.GASManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="false"/>
</buildOutputProvider>
<scannerInfoProvider id="com.crt.advproject.specsFile">
<runAction arguments="-x assembler-with-cpp -E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cconfiguration>
<cconfiguration id="com.crt.advproject.config.lib.debug.1649411711.804680655">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.lib.debug.1649411711.804680655" moduleId="org.eclipse.cdt.core.settings" name="lpc11uxx">
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/tinyusb"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/tinyusb/Debug"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/tinyusb/lpc11uxx"/>
<entry flags="RESOLVED" kind="libraryFile" name="tinyusb"/>
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" 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.lib.debug.1649411711.804680655" name="lpc11uxx" parent="com.crt.advproject.config.lib.debug" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size &quot;lib${BuildArtifactFileName}&quot; ; # arm-none-eabi-objdump -h -S &quot;lib${BuildArtifactFileName}&quot; &gt;&quot;${BuildArtifactFileBaseName}.lss&quot;">
<folderInfo id="com.crt.advproject.config.lib.debug.1649411711.804680655." name="/" resourcePath="">
<toolChain id="com.crt.advproject.toolchain.lib.debug.1903091082" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.lib.debug">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.lib.debug.962893073" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.lib.debug"/>
<builder buildPath="${workspace_loc:/tinyusb/Debug}" id="com.crt.advproject.builder.lib.debug.1479740733" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.lib.debug"/>
<tool id="com.crt.advproject.cpp.lib.debug.711803705" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.lib.debug"/>
<tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="com.crt.advproject.gcc.lib.debug.881823716" name="MCU C Compiler" superClass="com.crt.advproject.gcc.lib.debug">
<option id="com.crt.advproject.gcc.arch.1621137643" name="Architecture" superClass="com.crt.advproject.gcc.arch" value="com.crt.advproject.gcc.target.cm0" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.thumb.1699307665" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1161208646" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__REDLIB__"/>
<listOptionValue builtIn="false" value="MCU=MCU_LPC11UXX"/>
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="__CODE_RED"/>
</option>
<option id="gnu.c.compiler.option.misc.other.1379552179" 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.379339419" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/device_keyboard}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/CMSISv2p00_LPC11Uxx/inc}&quot;"/>
</option>
<option id="com.crt.advproject.c.misc.dialect.534675864" 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.900078668" superClass="com.crt.advproject.compiler.input"/>
</tool>
<tool id="com.crt.advproject.gas.lib.debug.898712145" name="MCU Assembler" superClass="com.crt.advproject.gas.lib.debug">
<option id="com.crt.advproject.gas.arch.240596688" name="Architecture" superClass="com.crt.advproject.gas.arch" value="com.crt.advproject.gas.target.cm3" valueType="enumerated"/>
<option id="com.crt.advproject.gas.thumb.1917352622" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/>
<option id="gnu.both.asm.option.flags.crt.1795932993" 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.2113747931" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
</tool>
<tool id="com.crt.advproject.ar.lib.debug.1485079578" name="MCU Archiver" superClass="com.crt.advproject.ar.lib.debug"/>
</toolChain>
</folderInfo>
<sourceEntries>

View File

@ -61,11 +61,12 @@
#include <string.h>
#include <stdio.h>
#include "tusb_cfg.h"
#include "mcu/mcu.h"
#include "hal/hal.h"
#include "compiler/compiler.h"
#include "tusb_cfg.h"
#include "errors.h"
#include "mcu/mcu.h"
#include "hal/hal.h"
#include "core/tusb_types.h"
#include "core/std_descriptors.h"

View File

@ -51,10 +51,6 @@
#ifndef _TUSB_MCU_H_
#define _TUSB_MCU_H_
#ifndef MCU // elcipse view
#define MCU MCU_LPC11UXX
#endif
#define MCU_LPC13UXX 1
#define MCU_LPC11UXX 2
#define MCU_LPC43XX 3