aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boards/OLIMEX_STM32_P103/board.c2
-rw-r--r--boards/RAISONANCE_REVA_STM8S/board.c11
-rw-r--r--boards/RAISONANCE_REVA_STM8S/board.h4
-rw-r--r--boards/ST_STM8L_DISCOVERY/board.c11
-rw-r--r--boards/ST_STM8L_DISCOVERY/board.h4
-rw-r--r--boards/ST_STM8S_DISCOVERY/board.c11
-rw-r--r--boards/ST_STM8S_DISCOVERY/board.h4
-rw-r--r--demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c14
-rw-r--r--demos/STM8S-STM8S105-DISCOVERY-STVD/ChibiOS-RT.stw2
-rw-r--r--demos/STM8S-STM8S105-DISCOVERY-STVD/demo/main.c14
-rw-r--r--demos/STM8S-STM8S208-RC/ch.rapp59
-rw-r--r--demos/STM8S-STM8S208-RC/ch.rprj2
-rw-r--r--demos/STM8S-STM8S208-RC/main.c14
-rw-r--r--docs/reports/STM8L152-16-Cosmic.txt2
-rw-r--r--docs/reports/STM8L152-16-Raisonance.txt2
-rw-r--r--docs/reports/STM8S105-16-Cosmic.txt2
-rw-r--r--docs/reports/STM8S105-16-Raisonance.txt2
-rw-r--r--docs/reports/STM8S208-16-Raisonance.txt2
18 files changed, 81 insertions, 81 deletions
diff --git a/boards/OLIMEX_STM32_P103/board.c b/boards/OLIMEX_STM32_P103/board.c
index e380b8b9a..05faa0944 100644
--- a/boards/OLIMEX_STM32_P103/board.c
+++ b/boards/OLIMEX_STM32_P103/board.c
@@ -25,6 +25,7 @@
* @details Digital I/O ports static configuration as defined in @p board.h.
* This variable is used by the HAL when initializing the PAL driver.
*/
+#if HAL_USE_PAL || defined(__DOXYGEN__)
const PALConfig pal_default_config =
{
{VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH},
@@ -33,6 +34,7 @@ const PALConfig pal_default_config =
{VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH},
{VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH},
};
+#endif
/*
* Early initialization code.
diff --git a/boards/RAISONANCE_REVA_STM8S/board.c b/boards/RAISONANCE_REVA_STM8S/board.c
index 61a6f2752..92fcc58a0 100644
--- a/boards/RAISONANCE_REVA_STM8S/board.c
+++ b/boards/RAISONANCE_REVA_STM8S/board.c
@@ -24,6 +24,7 @@
* @brief PAL setup.
* @details Digital I/O ports static configuration as defined in @p board.h.
*/
+#if HAL_USE_PAL || defined(__DOXYGEN__)
ROMCONST PALConfig pal_default_config =
{
{
@@ -36,6 +37,7 @@ ROMCONST PALConfig pal_default_config =
{VAL_GPIOGODR, 0, VAL_GPIOGDDR, VAL_GPIOGCR1, VAL_GPIOGCR2},
}
};
+#endif
/*
* TIM 2 clock after the prescaler.
@@ -60,14 +62,9 @@ CH_IRQ_HANDLER(13) {
}
/*
- * Board initialization code.
+ * Board-specific initialization code.
*/
-void hwinit(void) {
-
- /*
- * HAL initialization.
- */
- halInit();
+void boardInit(void) {
/*
* TIM2 initialization as system tick.
diff --git a/boards/RAISONANCE_REVA_STM8S/board.h b/boards/RAISONANCE_REVA_STM8S/board.h
index 5434bd655..a3a508f5a 100644
--- a/boards/RAISONANCE_REVA_STM8S/board.h
+++ b/boards/RAISONANCE_REVA_STM8S/board.h
@@ -174,12 +174,14 @@
#define VAL_GPIOICR1 0xFF /* All pull-up. */
#define VAL_GPIOICR2 0
+#if !defined(_FROM_ASM_)
#ifdef __cplusplus
extern "C" {
#endif
- void hwinit(void);
+ void boardInit(void);
#ifdef __cplusplus
}
#endif
+#endif /* _FROM_ASM_ */
#endif /* _BOARD_H_ */
diff --git a/boards/ST_STM8L_DISCOVERY/board.c b/boards/ST_STM8L_DISCOVERY/board.c
index c7c44809e..b46bf007d 100644
--- a/boards/ST_STM8L_DISCOVERY/board.c
+++ b/boards/ST_STM8L_DISCOVERY/board.c
@@ -25,6 +25,7 @@
* @details Digital I/O ports static configuration as defined in @p board.h.
* This variable is used by the HAL when initializing the PAL driver.
*/
+#if HAL_USE_PAL || defined(__DOXYGEN__)
ROMCONST PALConfig pal_default_config =
{
{
@@ -36,6 +37,7 @@ ROMCONST PALConfig pal_default_config =
{VAL_GPIOFODR, 0, VAL_GPIOFDDR, VAL_GPIOFCR1, VAL_GPIOFCR2},
}
};
+#endif
/*
* TIM 2 clock after the prescaler.
@@ -44,14 +46,9 @@ ROMCONST PALConfig pal_default_config =
#define TIM2_ARR ((TIM2_CLOCK / CH_FREQUENCY) - 1)
/*
- * Board initialization code.
+ * Board-specific initialization code.
*/
-void hwinit(void) {
-
- /*
- * HAL initialization.
- */
- halInit();
+void boardInit(void) {
/*
* TIM2 initialization as system tick.
diff --git a/boards/ST_STM8L_DISCOVERY/board.h b/boards/ST_STM8L_DISCOVERY/board.h
index 3355c28c9..4dfb28ca4 100644
--- a/boards/ST_STM8L_DISCOVERY/board.h
+++ b/boards/ST_STM8L_DISCOVERY/board.h
@@ -157,12 +157,14 @@
} \
}
+#if !defined(_FROM_ASM_)
#ifdef __cplusplus
extern "C" {
#endif
- void hwinit(void);
+ void boardInit(void);
#ifdef __cplusplus
}
#endif
+#endif /* _FROM_ASM_ */
#endif /* _BOARD_H_ */
diff --git a/boards/ST_STM8S_DISCOVERY/board.c b/boards/ST_STM8S_DISCOVERY/board.c
index 61a6f2752..92fcc58a0 100644
--- a/boards/ST_STM8S_DISCOVERY/board.c
+++ b/boards/ST_STM8S_DISCOVERY/board.c
@@ -24,6 +24,7 @@
* @brief PAL setup.
* @details Digital I/O ports static configuration as defined in @p board.h.
*/
+#if HAL_USE_PAL || defined(__DOXYGEN__)
ROMCONST PALConfig pal_default_config =
{
{
@@ -36,6 +37,7 @@ ROMCONST PALConfig pal_default_config =
{VAL_GPIOGODR, 0, VAL_GPIOGDDR, VAL_GPIOGCR1, VAL_GPIOGCR2},
}
};
+#endif
/*
* TIM 2 clock after the prescaler.
@@ -60,14 +62,9 @@ CH_IRQ_HANDLER(13) {
}
/*
- * Board initialization code.
+ * Board-specific initialization code.
*/
-void hwinit(void) {
-
- /*
- * HAL initialization.
- */
- halInit();
+void boardInit(void) {
/*
* TIM2 initialization as system tick.
diff --git a/boards/ST_STM8S_DISCOVERY/board.h b/boards/ST_STM8S_DISCOVERY/board.h
index 06035f820..38bebe6e8 100644
--- a/boards/ST_STM8S_DISCOVERY/board.h
+++ b/boards/ST_STM8S_DISCOVERY/board.h
@@ -111,12 +111,14 @@
#define VAL_GPIOGCR1 0xFF /* All pull-up or push-pull. */
#define VAL_GPIOGCR2 0
+#if !defined(_FROM_ASM_)
#ifdef __cplusplus
extern "C" {
#endif
- void hwinit(void);
+ void boardInit(void);
#ifdef __cplusplus
}
#endif
+#endif /* _FROM_ASM_ */
#endif /* _BOARD_H_ */
diff --git a/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c b/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c
index d1545a84d..6245449cf 100644
--- a/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c
+++ b/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c
@@ -42,18 +42,18 @@ static msg_t Thread1(void *arg) {
}
/*
- * Entry point.
+ * Application entry point.
*/
void main(void) {
/*
- * Board/HAL initialization.
- */
- hwinit();
-
- /*
- * OS initialization.
+ * System initializations.
+ * - HAL initialization, this also initializes the configured device drivers
+ * and performs the board-specific initializations.
+ * - Kernel initialization, the main() function becomes a thread and the
+ * RTOS is active.
*/
+ halInit();
chSysInit();
/*
diff --git a/demos/STM8S-STM8S105-DISCOVERY-STVD/ChibiOS-RT.stw b/demos/STM8S-STM8S105-DISCOVERY-STVD/ChibiOS-RT.stw
index 130504bef..a6630271a 100644
--- a/demos/STM8S-STM8S105-DISCOVERY-STVD/ChibiOS-RT.stw
+++ b/demos/STM8S-STM8S105-DISCOVERY-STVD/ChibiOS-RT.stw
@@ -11,6 +11,6 @@ Dependencies=
Filename=raisonance\raisonance.stp
Dependencies=
[Options]
-ActiveProject=raisonance
+ActiveProject=cosmic
ActiveConfig=Release
AddSortedElements=0
diff --git a/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/main.c b/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/main.c
index 35321bf62..41f38ac80 100644
--- a/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/main.c
+++ b/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/main.c
@@ -38,18 +38,18 @@ static msg_t Thread1(void *arg) {
}
/*
- * Entry point.
+ * Application entry point.
*/
void main(void) {
/*
- * Board/HAL initialization.
- */
- hwinit();
-
- /*
- * OS initialization.
+ * System initializations.
+ * - HAL initialization, this also initializes the configured device drivers
+ * and performs the board-specific initializations.
+ * - Kernel initialization, the main() function becomes a thread and the
+ * RTOS is active.
*/
+ halInit();
chSysInit();
/*
diff --git a/demos/STM8S-STM8S208-RC/ch.rapp b/demos/STM8S-STM8S208-RC/ch.rapp
index fbe5413e6..3b4e4b047 100644
--- a/demos/STM8S-STM8S208-RC/ch.rapp
+++ b/demos/STM8S-STM8S208-RC/ch.rapp
@@ -1,6 +1,6 @@
-<ApplicationBuild Header="ch" Extern=".\ch.rapp" Path=".\ch.rapp" OutputFile="..\STM8S-STM8S208-RC/bin\ch.aof" sate="2" AsyncBuild="" >
- <Group Header="kernel" Marker="-1" OutputFile="" sate="96" AsyncBuild="" >
+<ApplicationBuild Header="ch" Extern=".\ch.rapp" Path=".\ch.rapp" OutputFile="..\STM8S-STM8S208-RC/bin\ch.aof" sate="98" AsyncBuild="" >
+ <Group Header="kernel" Marker="-1" OutputFile="" sate="0" AsyncBuild="" >
<NodeC Path="..\..\os\kernel\src\chcond.c" Header="chcond.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chcond.obj" sate="0" AsyncBuild="" />
<NodeC Path="..\..\os\kernel\src\chdebug.c" Header="chdebug.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chdebug.obj" sate="0" AsyncBuild="" />
<NodeC Path="..\..\os\kernel\src\chdynamic.c" Header="chdynamic.c" Marker="-1" AsyncBuild="" OutputFile="..\STM8S-STM8S208-RC/bin\chdynamic.obj" sate="0" />
@@ -11,15 +11,15 @@
<Set Header="RCST7" >
<Section Header="Model" >
<Property Header="GlobalMemory" Value="" Removable="1" />
-
+
</Section>
-
+
</Set>
-
+
</Config>
-
+
</Options>
-
+
</NodeC>
<NodeC Path="..\..\os\kernel\src\chlists.c" Header="chlists.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chlists.obj" sate="0" AsyncBuild="" />
<NodeC Path="..\..\os\kernel\src\chmboxes.c" Header="chmboxes.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chmboxes.obj" sate="0" AsyncBuild="" />
@@ -31,7 +31,7 @@
<NodeC Path="..\..\os\kernel\src\chregistry.c" Header="chregistry.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chregistry.obj" sate="0" AsyncBuild="" />
<NodeC Path="..\..\os\kernel\src\chschd.c" Header="chschd.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chschd.obj" sate="0" AsyncBuild="" >
<Options/>
-
+
</NodeC>
<NodeC Path="..\..\os\kernel\src\chsem.c" Header="chsem.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chsem.obj" sate="0" AsyncBuild="" />
<NodeC Path="..\..\os\kernel\src\chsys.c" Header="chsys.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chsys.obj" sate="0" AsyncBuild="" />
@@ -42,17 +42,17 @@
<Set Header="RCST7" >
<Section Header="Model" >
<Property Header="GlobalMemory" Value="" Removable="1" />
-
+
</Section>
-
+
</Set>
-
+
</Config>
-
+
</Options>
-
+
</NodeC>
-
+
</Group>
<Group Header="test" Marker="-1" OutputFile="" sate="0" AsyncBuild="" >
<NodeC Path="..\..\test\test.c" Header="test.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\test.obj" sate="0" AsyncBuild="" />
@@ -67,11 +67,11 @@
<NodeC Path="..\..\test\testqueues.c" Header="testqueues.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\testqueues.obj" sate="0" AsyncBuild="" />
<NodeC Path="..\..\test\testsem.c" Header="testsem.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\testsem.obj" sate="0" AsyncBuild="" />
<NodeC Path="..\..\test\testthd.c" Header="testthd.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\testthd.obj" sate="0" AsyncBuild="" />
-
+
</Group>
<Group Header="port" Marker="-1" OutputFile="" sate="0" AsyncBuild="" >
<NodeC Path="..\..\os\ports\RC\STM8\chcore.c" Header="chcore.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\chcore.obj" sate="0" AsyncBuild="" />
-
+
</Group>
<Group Header="hal" Marker="-1" OutputFile="" sate="0" AsyncBuild="" >
<NodeC Path="..\..\os\hal\src\adc.c" Header="adc.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\adc.obj" sate="0" AsyncBuild="" />
@@ -88,12 +88,13 @@
<NodeC Path="..\..\os\hal\platforms\STM8S\pal_lld.c" Header="pal_lld.c" Marker="-1" AsyncBuild="" OutputFile="..\STM8S-STM8S208-RC/bin\pal_lld.obj" sate="0" />
<NodeC Path="..\..\os\hal\platforms\STM8S\serial_lld.c" Header="serial_lld.c" Marker="-1" AsyncBuild="" OutputFile="..\STM8S-STM8S208-RC/bin\serial_lld.obj" sate="0" />
<NodeC Path="..\..\os\hal\platforms\STM8S\spi_lld.c" Header="spi_lld.c" Marker="-1" AsyncBuild="" OutputFile="..\STM8S-STM8S208-RC/bin\spi_lld.obj" sate="0" />
+
</Group>
-
+
</Group>
<Group Header="board" Marker="-1" OutputFile="" sate="0" AsyncBuild="" >
<NodeC Path="..\..\boards\RAISONANCE_REVA_STM8S\board.c" Header="board.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\board.obj" sate="0" AsyncBuild="" />
-
+
</Group>
<NodeC Path=".\main.c" Header="main.c" Marker="-1" OutputFile="..\STM8S-STM8S208-RC/bin\main.obj" sate="0" AsyncBuild="" />
<Options>
@@ -101,21 +102,21 @@
<Set Header="ApplicationBuild" >
<Section Header="General" >
<Property Header="TargetFamily" Value="ST7" />
-
+
</Section>
<Section Header="Directories" >
<Property Header="IncDir" Value="$(RkitInc);$(RkitInc)\ST7;..\..\os\kernel\include;..\..\os\ports\RC\STM8;..\..\os\hal\include;..\..\os\hal\platforms\STM8S;..\..\boards\RAISONANCE_REVA_STM8S;..\..\test" Removable="1" />
<Property Header="OutDir" Value="$(ApplicationDir)/bin" Removable="1" />
<Property Header="ListDir" Value="$(ApplicationDir)/lst" Removable="1" />
<Property Header="LinkerOutputDir" Value="Output Directory" Removable="1" />
-
+
</Section>
-
+
</Set>
<Set Header="Target" >
<Section Header="ProcessorST7" >
<Property Header="Processor" Value="STM8S208MB" Removable="1" />
-
+
</Section>
<Section Header="ToolSetST7" >
<Property Header="BuildToolSetST7" Value="ST7\RaisonanceTools.config" Removable="1" />
@@ -126,33 +127,33 @@
<Section Header="DebugST7" >
<Property Header="Startup" Value="1" Removable="1" />
<Property Header="DebugTool_STM8" Value="RLINK_STM8" Removable="1" />
-
+
</Section>
</Set>
<Set Header="RCST7" >
<Section Header="CodeGen" >
<Property Header="ENUMTYPE" Value="ET(CHAR)" Removable="1" />
-
+
</Section>
<Section Header="Model" >
<Property Header="GlobalMemory" Value="DGC(DATA)" Removable="1" />
<Property Header="ModelP" Value="STM8(SMALL)" Removable="1" />
-
+
</Section>
<Section Header="OPTIM" >
<Property Header="OTLEVEL" Value="3" Removable="1" />
<Property Header="SPEEDSIZE" Value="SPEED" Removable="1" />
-
+
</Section>
-
+
</Set>
<Set Header="MAST7" >
<Section Header="Set" >
<Property Header="Defines" Value="STM8S208RB" Removable="1" />
-
+
</Section>
-
+
</Set>
</Config>
</Options>
diff --git a/demos/STM8S-STM8S208-RC/ch.rprj b/demos/STM8S-STM8S208-RC/ch.rprj
index 138f43304..ad8b9b39e 100644
--- a/demos/STM8S-STM8S208-RC/ch.rprj
+++ b/demos/STM8S-STM8S208-RC/ch.rprj
@@ -1,4 +1,4 @@
<Project Header="Project 'ch'" Path=".\ch.rprj" Project="Yes" OutputFile="" sate="96" ActiveApp="ch" AsyncBuild="" >
- <ApplicationBuild Header="ch" Extern=".\ch.rapp" Path=".\ch.rapp" OutputFile="..\STM8S-STM8S208-RC/bin\ch.aof" sate="2" AsyncBuild="" />
+ <ApplicationBuild Header="ch" Extern=".\ch.rapp" Path=".\ch.rapp" OutputFile="..\STM8S-STM8S208-RC/bin\ch.aof" sate="98" AsyncBuild="" />
</Project> \ No newline at end of file
diff --git a/demos/STM8S-STM8S208-RC/main.c b/demos/STM8S-STM8S208-RC/main.c
index 4e714fc15..c676f05d5 100644
--- a/demos/STM8S-STM8S208-RC/main.c
+++ b/demos/STM8S-STM8S208-RC/main.c
@@ -38,18 +38,18 @@ static msg_t Thread1(void *arg) {
}
/*
- * Entry point.
+ * Application entry point.
*/
void main(void) {
/*
- * Board/HAL initialization.
- */
- hwinit();
-
- /*
- * OS initialization.
+ * System initializations.
+ * - HAL initialization, this also initializes the configured device drivers
+ * and performs the board-specific initializations.
+ * - Kernel initialization, the main() function becomes a thread and the
+ * RTOS is active.
*/
+ halInit();
chSysInit();
/*
diff --git a/docs/reports/STM8L152-16-Cosmic.txt b/docs/reports/STM8L152-16-Cosmic.txt
index 34ffb7966..7c82ce881 100644
--- a/docs/reports/STM8L152-16-Cosmic.txt
+++ b/docs/reports/STM8L152-16-Cosmic.txt
@@ -6,7 +6,7 @@ Compiler: Cosmic STM8 compiler 4.3.3.3.
*** ChibiOS/RT test suite
***
-*** Kernel: 2.1.4unstable
+*** Kernel: 2.1.6unstable
*** Architecture: STM8
*** Platform: STM8L
*** Test Board: ST STM8L-Discovery
diff --git a/docs/reports/STM8L152-16-Raisonance.txt b/docs/reports/STM8L152-16-Raisonance.txt
index ed51144bc..076d771d2 100644
--- a/docs/reports/STM8L152-16-Raisonance.txt
+++ b/docs/reports/STM8L152-16-Raisonance.txt
@@ -6,7 +6,7 @@ Compiler: Raisonance RKit-STM8_2.30.10.0175
*** ChibiOS/RT test suite
***
-*** Kernel: 2.1.4unstable
+*** Kernel: 2.1.6unstable
*** Architecture: STM8
*** Platform: STM8L
*** Test Board: ST STM8L-Discovery
diff --git a/docs/reports/STM8S105-16-Cosmic.txt b/docs/reports/STM8S105-16-Cosmic.txt
index 271e51f2f..220994fef 100644
--- a/docs/reports/STM8S105-16-Cosmic.txt
+++ b/docs/reports/STM8S105-16-Cosmic.txt
@@ -6,7 +6,7 @@ Compiler: Cosmic STM8 compiler 4.3.3.3.
*** ChibiOS/RT test suite
***
-*** Kernel: 2.1.4unstable
+*** Kernel: 2.1.6unstable
*** Architecture: STM8
*** Platform: STM8S
*** Test Board: ST STM8S-Discovery
diff --git a/docs/reports/STM8S105-16-Raisonance.txt b/docs/reports/STM8S105-16-Raisonance.txt
index bb08d71be..3c909b0be 100644
--- a/docs/reports/STM8S105-16-Raisonance.txt
+++ b/docs/reports/STM8S105-16-Raisonance.txt
@@ -6,7 +6,7 @@ Compiler: Raisonance RKit-STM8_2.30.10.0175
*** ChibiOS/RT test suite
***
-*** Kernel: 2.1.4unstable
+*** Kernel: 2.1.6unstable
*** Architecture: STM8
*** Platform: STM8S
*** Test Board: ST STM8S-Discovery
diff --git a/docs/reports/STM8S208-16-Raisonance.txt b/docs/reports/STM8S208-16-Raisonance.txt
index 267f008f2..9d7577735 100644
--- a/docs/reports/STM8S208-16-Raisonance.txt
+++ b/docs/reports/STM8S208-16-Raisonance.txt
@@ -6,7 +6,7 @@ Compiler: Raisonance RKit-STM8_2.30.10.0175
*** ChibiOS/RT test suite
***
-*** Kernel: 2.1.4unstable
+*** Kernel: 2.1.6unstable
*** Architecture: STM8
*** Platform: STM8S
*** Test Board: Raisonance REva V3 + STM8S208RB