Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bef656c
commit 91c60ea
Showing
5 changed files
with
460 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> | ||
|
||
<storageModule moduleId="org.eclipse.cdt.core.settings"> | ||
|
||
<cconfiguration id="0.336201835"> | ||
|
||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.336201835" moduleId="org.eclipse.cdt.core.settings" name="Default"> | ||
|
||
<externalSettings/> | ||
|
||
<extensions> | ||
|
||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
|
||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
|
||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
|
||
<extension id="org.eclipse.cdt.core.VCErrorParser" 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.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
|
||
</extensions> | ||
|
||
</storageModule> | ||
|
||
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> | ||
|
||
<configuration buildProperties="" description="" id="0.336201835" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg"> | ||
|
||
<folderInfo id="0.336201835." name="/" resourcePath=""> | ||
|
||
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.4934875" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain"> | ||
|
||
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.4934875.1390769889" name=""/> | ||
|
||
<builder id="org.eclipse.cdt.build.core.settings.default.builder.1783548436" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/> | ||
|
||
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.32130587" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/> | ||
|
||
<tool id="org.eclipse.cdt.build.core.settings.holder.164009162" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder"> | ||
|
||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1397620196" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/> | ||
|
||
</tool> | ||
|
||
<tool id="org.eclipse.cdt.build.core.settings.holder.1412076175" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder"> | ||
|
||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.308634218" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/> | ||
|
||
</tool> | ||
|
||
<tool id="org.eclipse.cdt.build.core.settings.holder.432055573" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder"> | ||
|
||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1035549476" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/> | ||
|
||
</tool> | ||
|
||
</toolChain> | ||
|
||
</folderInfo> | ||
|
||
</configuration> | ||
|
||
</storageModule> | ||
|
||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> | ||
|
||
</cconfiguration> | ||
|
||
</storageModule> | ||
|
||
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> | ||
|
||
<project id="Pixracer_Usb_cdcacm.null.1962491803" name="Pixracer_Usb_cdcacm"/> | ||
|
||
</storageModule> | ||
|
||
<storageModule moduleId="scannerConfiguration"> | ||
|
||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> | ||
|
||
<scannerConfigBuildInfo instanceId="0.336201835"> | ||
|
||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> | ||
|
||
</scannerConfigBuildInfo> | ||
|
||
</storageModule> | ||
|
||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> | ||
|
||
</cproject> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>Pixracer_Usb_cdcacm</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> | ||
<triggers>clean,full,incremental,</triggers> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> | ||
<triggers>full,incremental,</triggers> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.cdt.core.cnature</nature> | ||
<nature>org.eclipse.cdt.core.ccnature</nature> | ||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> | ||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
## | ||
## This file is part of the libopencm3 project. | ||
## | ||
## Copyright (C) 2018 Igor Mišić <igy1000mb@gmail.com> | ||
## | ||
## This library is free software: you can redistribute it and/or modify | ||
## it under the terms of the GNU Lesser General Public License as published by | ||
## the Free Software Foundation, either version 3 of the License, or | ||
## (at your option) any later version. | ||
## | ||
## This library is distributed in the hope that it will be useful, | ||
## but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
## GNU Lesser General Public License for more details. | ||
## | ||
## You should have received a copy of the GNU Lesser General Public License | ||
## along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
## | ||
|
||
FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16 | ||
ARCH_FLAGS = -mthumb -mcpu=cortex-m4 $(FP_FLAGS) | ||
|
||
IDIR=../libopencm3/include | ||
CC=arm-none-eabi-gcc | ||
CFLAGS=-I$(IDIR) -D STM32F4 | ||
|
||
LIB_DIR=-L../libopencm3/lib | ||
LIBS=-lopencm3_stm32f4 | ||
|
||
OPT := -Os | ||
DEBUG := -ggdb3 | ||
CSTD ?= -std=gnu99 | ||
LDSCRIPT ?= ../stm32f4.ld | ||
|
||
############################################################################### | ||
# C flags | ||
|
||
TGT_CFLAGS += $(OPT) $(CSTD) $(DEBUG) | ||
TGT_CFLAGS += $(ARCH_FLAGS) | ||
TGT_CFLAGS += -Wextra -Wshadow -Wimplicit-function-declaration | ||
TGT_CFLAGS += -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes | ||
TGT_CFLAGS += -fno-common -ffunction-sections -fdata-sections | ||
|
||
############################################################################### | ||
# Linker flags | ||
|
||
TGT_LDFLAGS += --static -nostartfiles | ||
TGT_LDFLAGS += -T$(LDSCRIPT) | ||
TGT_LDFLAGS += $(ARCH_FLAGS) $(DEBUG) | ||
TGT_LDFLAGS += -Wl,-Map=$(*).map -Wl,--cref | ||
TGT_LDFLAGS += -Wl,--gc-sections | ||
ifeq ($(V),99) | ||
TGT_LDFLAGS += -Wl,--print-gc-sections | ||
endif | ||
|
||
all: | ||
$(CC) $(TGT_CFLAGS) $(CFLAGS) -c cdcacm.c | ||
$(CC) cdcacm.o $(TGT_LDFLAGS) $(LIB_DIR) $(LIBS) -o cdcacm.elf | ||
|
||
clean: | ||
rm -f *.o *.elf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# README | ||
|
||
This example implements a USB CDC-ACM device (aka Virtual Serial Port) | ||
to demonstrate the use of the USB device stack. | ||
|
||
## Board connections | ||
|
||
| Port | Function | Description | | ||
| ----- | -------------- | ----------------------------------------- | | ||
| `CN6` | `(USB_OTG_HS)` | USB acting as device, connect to computer | |
Oops, something went wrong.