aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2017-07-08 07:48:51 +0000
committerRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2017-07-08 07:48:51 +0000
commit2e5a3b195d4c363dd756b93b3f9eff8964b07775 (patch)
tree87fdef426c4c3b21dd0ac6aaf15670908b751960 /demos
parent2fc72ef5f81f3fa4eb0cb908a7138b43b1478ff4 (diff)
downloadChibiOS-2e5a3b195d4c363dd756b93b3f9eff8964b07775.tar.gz
ChibiOS-2e5a3b195d4c363dd756b93b3f9eff8964b07775.tar.bz2
ChibiOS-2e5a3b195d4c363dd756b93b3f9eff8964b07775.zip
Fixed Bug #857
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10305 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r--demos/STM32/RT-STM32L053-DISCOVERY/Makefile4
-rw-r--r--demos/STM32/RT-STM32L053-DISCOVERY/debug/RT-STM32L053-DISCOVERY (OpenOCD, Flash and Run).launch2
-rw-r--r--demos/STM32/RT-STM32L053-DISCOVERY/halconf.h6
-rw-r--r--demos/STM32/RT-STM32L053-DISCOVERY/main.c19
-rw-r--r--demos/STM32/RT-STM32L053-DISCOVERY/mcuconf.h5
5 files changed, 11 insertions, 25 deletions
diff --git a/demos/STM32/RT-STM32L053-DISCOVERY/Makefile b/demos/STM32/RT-STM32L053-DISCOVERY/Makefile
index 284b65007..d4faea106 100644
--- a/demos/STM32/RT-STM32L053-DISCOVERY/Makefile
+++ b/demos/STM32/RT-STM32L053-DISCOVERY/Makefile
@@ -5,7 +5,7 @@
# Compiler options here.
ifeq ($(USE_OPT),)
- USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
+ USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16
endif
# C specific options here (added to USE_OPT).
@@ -113,7 +113,7 @@ CSRC = $(STARTUPSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
$(TESTSRC) \
- usbcfg.c main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/demos/STM32/RT-STM32L053-DISCOVERY/debug/RT-STM32L053-DISCOVERY (OpenOCD, Flash and Run).launch b/demos/STM32/RT-STM32L053-DISCOVERY/debug/RT-STM32L053-DISCOVERY (OpenOCD, Flash and Run).launch
index db4138630..dd74e27f1 100644
--- a/demos/STM32/RT-STM32L053-DISCOVERY/debug/RT-STM32L053-DISCOVERY (OpenOCD, Flash and Run).launch
+++ b/demos/STM32/RT-STM32L053-DISCOVERY/debug/RT-STM32L053-DISCOVERY (OpenOCD, Flash and Run).launch
@@ -33,7 +33,7 @@
<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;"/>
+<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;null-stm32_clock_init-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;mp-stm32_clock_init-(format)&quot; val=&quot;2&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"/>
diff --git a/demos/STM32/RT-STM32L053-DISCOVERY/halconf.h b/demos/STM32/RT-STM32L053-DISCOVERY/halconf.h
index 63c29ccef..82602b403 100644
--- a/demos/STM32/RT-STM32L053-DISCOVERY/halconf.h
+++ b/demos/STM32/RT-STM32L053-DISCOVERY/halconf.h
@@ -139,14 +139,14 @@
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#define HAL_USE_SERIAL TRUE
#endif
/**
* @brief Enables the SERIAL over USB subsystem.
*/
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL_USB TRUE
+#define HAL_USE_SERIAL_USB FALSE
#endif
/**
@@ -167,7 +167,7 @@
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB FALSE
#endif
/**
diff --git a/demos/STM32/RT-STM32L053-DISCOVERY/main.c b/demos/STM32/RT-STM32L053-DISCOVERY/main.c
index 80498c166..ffa768f53 100644
--- a/demos/STM32/RT-STM32L053-DISCOVERY/main.c
+++ b/demos/STM32/RT-STM32L053-DISCOVERY/main.c
@@ -16,8 +16,6 @@
#include "ch.h"
#include "hal.h"
-#include "usbcfg.h"
-
#include "ch_test.h"
/*
@@ -52,22 +50,11 @@ int main(void) {
chSysInit();
/*
- * Initializes a serial-over-USB CDC driver.
+ * Activates the serial driver 1 using the driver default configuration.
*/
- sduObjectInit(&SDU1);
- sduStart(&SDU1, &serusbcfg);
+ sdStart(&SD1, NULL);
/*
- * Activates the USB driver and then the USB bus pull-up on D+.
- * Note, a delay is inserted in order to not have to disconnect the cable
- * after a reset.
- */
- usbDisconnectBus(serusbcfg.usbp);
- chThdSleepMilliseconds(1000);
- usbStart(serusbcfg.usbp, &usbcfg);
- usbConnectBus(serusbcfg.usbp);
- chThdSleepMilliseconds(1000);
- /*
* Creates the blinker thread.
*/
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO + 1, Thread1, NULL);
@@ -78,7 +65,7 @@ int main(void) {
*/
while (true) {
if (palReadLine(LINE_BUTTON))
- test_execute((BaseSequentialStream *)&SDU1);
+ test_execute((BaseSequentialStream *)&SD1);
chThdSleepMilliseconds(500);
}
}
diff --git a/demos/STM32/RT-STM32L053-DISCOVERY/mcuconf.h b/demos/STM32/RT-STM32L053-DISCOVERY/mcuconf.h
index f8cdcecc2..a517c7872 100644
--- a/demos/STM32/RT-STM32L053-DISCOVERY/mcuconf.h
+++ b/demos/STM32/RT-STM32L053-DISCOVERY/mcuconf.h
@@ -126,7 +126,7 @@
/*
* SERIAL driver system settings.
*/
-#define STM32_SERIAL_USE_USART1 FALSE
+#define STM32_SERIAL_USE_USART1 TRUE
#define STM32_SERIAL_USE_USART2 FALSE
#define STM32_SERIAL_USE_LPUART1 FALSE
#define STM32_SERIAL_USART1_PRIORITY 3
@@ -172,9 +172,8 @@
/*
* USB driver system settings.
*/
-#define STM32_USB_USE_USB1 TRUE
+#define STM32_USB_USE_USB1 FALSE
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
-#define STM32_USB_USB1_HP_IRQ_PRIORITY 2
#define STM32_USB_USB1_LP_IRQ_PRIORITY 3
/*