aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32F4xx
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-12-23 14:21:42 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-12-23 14:21:42 +0000
commitd9973ea126e8eb0a740312e70b8b41efe12f1112 (patch)
tree5128f204f4d91170614a9e09c36a92b2f1315d40 /testhal/STM32/STM32F4xx
parenta71da8de12fd7e8f68cbaca3cd2d929107b7192a (diff)
downloadChibiOS-d9973ea126e8eb0a740312e70b8b41efe12f1112.tar.gz
ChibiOS-d9973ea126e8eb0a740312e70b8b41efe12f1112.tar.bz2
ChibiOS-d9973ea126e8eb0a740312e70b8b41efe12f1112.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8636 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/STM32F4xx')
-rw-r--r--testhal/STM32/STM32F4xx/USB_CDC/debug/STM32F4xx-USB_CDC (OpenOCD, Flash and Run).launch4
-rw-r--r--testhal/STM32/STM32F4xx/USB_CDC/main.c9
2 files changed, 7 insertions, 6 deletions
diff --git a/testhal/STM32/STM32F4xx/USB_CDC/debug/STM32F4xx-USB_CDC (OpenOCD, Flash and Run).launch b/testhal/STM32/STM32F4xx/USB_CDC/debug/STM32F4xx-USB_CDC (OpenOCD, Flash and Run).launch
index a7cd1292e..4b14790e0 100644
--- a/testhal/STM32/STM32F4xx/USB_CDC/debug/STM32F4xx-USB_CDC (OpenOCD, Flash and Run).launch
+++ b/testhal/STM32/STM32F4xx/USB_CDC/debug/STM32F4xx-USB_CDC (OpenOCD, Flash and Run).launch
@@ -33,13 +33,13 @@
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
-<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content id=&quot;DIEPTSIZ-ie[1]-ie-otg-usbp-config-null-_idle_thread-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;bcounter-null-obqTryFlushI-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;n-sduSOFHookI-(format)&quot; val=&quot;4&quot;/&gt;&lt;/contentList&gt;"/>
+<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content id=&quot;vt_lasttime-vtlist-null-_idle_thread-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;vt_lasttime-vtlist-null-port_wait_for_interrupt-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;DIEPTSIZ-ie[1]-ie-otg-usbp-config-null-_idle_thread-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;bcounter-null-obqTryFlushI-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;n-sduSOFHookI-(format)&quot; val=&quot;4&quot;/&gt;&lt;/contentList&gt;"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;globalVariableList/&gt;&#13;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList/&gt;&#13;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="STM32F4xx-USB_CDC"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
-<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="0.588576619"/>
+<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="0.1487191575"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/STM32F4xx-USB_CDC"/>
</listAttribute>
diff --git a/testhal/STM32/STM32F4xx/USB_CDC/main.c b/testhal/STM32/STM32F4xx/USB_CDC/main.c
index 49c5a1b98..4bcec83e3 100644
--- a/testhal/STM32/STM32F4xx/USB_CDC/main.c
+++ b/testhal/STM32/STM32F4xx/USB_CDC/main.c
@@ -84,6 +84,7 @@ static void cmd_test(BaseSequentialStream *chp, int argc, char *argv[]) {
chThdWait(tp);
}
+/* Can be measured using dd if=/dev/xxxx of=/dev/null bs=512 count=10000.*/
static void cmd_write(BaseSequentialStream *chp, int argc, char *argv[]) {
static uint8_t buf[] =
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
@@ -112,12 +113,12 @@ static void cmd_write(BaseSequentialStream *chp, int argc, char *argv[]) {
while (chnGetTimeout((BaseChannel *)chp, TIME_IMMEDIATE) == Q_TIMEOUT) {
#if 1
/* Writing in stream mode.*/
- chSequentialStreamWrite(&SDU1, buf, sizeof buf - 1);
+ streamWrite(&SDU1, buf, sizeof buf - 1);
#else
/* Writing in buffer mode.*/
(void) obqGetEmptyBufferTimeout(&SDU1.obqueue, TIME_INFINITE);
- memcpy(SDU1.obqueue.ptr, buf, 256);
- obqPostFullBuffer(&SDU1.obqueue, 256);
+ memcpy(SDU1.obqueue.ptr, buf, SERIAL_USB_BUFFERS_SIZE);
+ obqPostFullBuffer(&SDU1.obqueue, SERIAL_USB_BUFFERS_SIZE);
#endif
}
chprintf(chp, "\r\n\nstopped\r\n");
@@ -141,7 +142,7 @@ static const ShellConfig shell_cfg1 = {
/*===========================================================================*/
/*
- * Red LED blinker thread, times are in milliseconds.
+ * LED blinker thread, times are in milliseconds.
*/
static THD_WORKING_AREA(waThread1, 128);
static THD_FUNCTION(Thread1, arg) {