diff --git a/readme.txt b/readme.txt index 7101addc4..4eeb585ab 100644 --- a/readme.txt +++ b/readme.txt @@ -74,7 +74,7 @@ ***************************************************************************** *** Next *** -- NEW: Added an STM32 WDG "multi" demo. +- NEW: Added an STM32 WDG "multi" demo. Removed all old WDG demos. - NEW: Added option to copy vectors in RAM on GCC startup for ARMv6-M, ARMv7-M and ARMv8-M-ML. - NEW: On STM32WBxx added a check on STM32_LSI_ENABLE required by IWDG. diff --git a/testhal/STM32/STM32F0xx/WDG/.cproject b/testhal/STM32/STM32F0xx/WDG/.cproject deleted file mode 100644 index c19bcb65c..000000000 --- a/testhal/STM32/STM32F0xx/WDG/.cproject +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/testhal/STM32/STM32F0xx/WDG/.project b/testhal/STM32/STM32F0xx/WDG/.project deleted file mode 100644 index af8c09587..000000000 --- a/testhal/STM32/STM32F0xx/WDG/.project +++ /dev/null @@ -1,38 +0,0 @@ - - - STM32F0xx-WDG - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - board - 2 - CHIBIOS/os/hal/boards/ST_STM32F0_DISCOVERY - - - os - 2 - CHIBIOS/os - - - diff --git a/testhal/STM32/STM32F0xx/WDG/main.c b/testhal/STM32/STM32F0xx/WDG/main.c deleted file mode 100644 index 4d2f8a59c..000000000 --- a/testhal/STM32/STM32F0xx/WDG/main.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "ch.h" -#include "hal.h" - -/* - * Watchdog deadline set to more than one second (LSI=40000 / (64 * 1000)). - */ -static const WDGConfig wdgcfg = { - STM32_IWDG_PR_64, - STM32_IWDG_RL(1000), - STM32_IWDG_WIN_DISABLED -}; - -/* - * Application entry point. - */ -int main(void) { - - /* - * 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(); - - /* - * Starting the watchdog driver. - */ - wdgStart(&WDGD1, &wdgcfg); - - /* - * Normal main() thread activity, it resets the watchdog. - */ - while (true) { - wdgReset(&WDGD1); - palToggleLine(LINE_LED4); - chThdSleepMilliseconds(500); - } - return 0; -} diff --git a/testhal/STM32/STM32F0xx/WDG/readme.txt b/testhal/STM32/STM32F0xx/WDG/readme.txt deleted file mode 100644 index 46b93c1ba..000000000 --- a/testhal/STM32/STM32F0xx/WDG/readme.txt +++ /dev/null @@ -1,30 +0,0 @@ -***************************************************************************** -** ChibiOS/HAL - WDG driver demo for STM32F3xx. ** -***************************************************************************** - -** TARGET ** - -The demo runs on an ST STM32F3-Discovery board. - -** The Demo ** - -The application demonstrates the use of the STM32F3xx WDG driver. - -** Board Setup ** - -None. - -** Build Procedure ** - -The demo has been tested using the free Codesourcery GCC-based toolchain -and YAGARTO. -Just modify the TRGT line in the makefile in order to use different GCC ports. - -** Notes ** - -Some files used by the demo are not part of ChibiOS/RT but are copyright of -ST Microelectronics and are licensed under a different license. -Also note that not all the files present in the ST library are distributed -with ChibiOS/RT, you can find the whole library on the ST web site: - - http://www.st.com diff --git a/testhal/STM32/STM32F3xx/WDG/.cproject b/testhal/STM32/STM32F3xx/WDG/.cproject deleted file mode 100644 index 5909ca37a..000000000 --- a/testhal/STM32/STM32F3xx/WDG/.cproject +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/testhal/STM32/STM32F3xx/WDG/.project b/testhal/STM32/STM32F3xx/WDG/.project deleted file mode 100644 index e1e78a8a0..000000000 --- a/testhal/STM32/STM32F3xx/WDG/.project +++ /dev/null @@ -1,38 +0,0 @@ - - - STM32F3xx-WDG - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - board - 2 - CHIBIOS/os/hal/boards/ST_STM32F3_DISCOVERY - - - os - 2 - CHIBIOS/os - - - diff --git a/testhal/STM32/STM32F3xx/WDG/main.c b/testhal/STM32/STM32F3xx/WDG/main.c deleted file mode 100644 index e33a7ae76..000000000 --- a/testhal/STM32/STM32F3xx/WDG/main.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "ch.h" -#include "hal.h" - -/* - * Watchdog deadline set to more than one second (LSI=40000 / (64 * 1000)). - */ -static const WDGConfig wdgcfg = { - STM32_IWDG_PR_64, - STM32_IWDG_RL(1000), - STM32_IWDG_WIN_DISABLED -}; - -/* - * Application entry point. - */ -int main(void) { - - /* - * 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(); - - /* - * Starting the watchdog driver. - */ - wdgStart(&WDGD1, &wdgcfg); - - /* - * Normal main() thread activity, it resets the watchdog. - */ - while (true) { - wdgReset(&WDGD1); - palToggleLine(LINE_LED4_BLUE); - chThdSleepMilliseconds(500); - } - return 0; -} diff --git a/testhal/STM32/STM32F3xx/WDG/readme.txt b/testhal/STM32/STM32F3xx/WDG/readme.txt deleted file mode 100644 index 46b93c1ba..000000000 --- a/testhal/STM32/STM32F3xx/WDG/readme.txt +++ /dev/null @@ -1,30 +0,0 @@ -***************************************************************************** -** ChibiOS/HAL - WDG driver demo for STM32F3xx. ** -***************************************************************************** - -** TARGET ** - -The demo runs on an ST STM32F3-Discovery board. - -** The Demo ** - -The application demonstrates the use of the STM32F3xx WDG driver. - -** Board Setup ** - -None. - -** Build Procedure ** - -The demo has been tested using the free Codesourcery GCC-based toolchain -and YAGARTO. -Just modify the TRGT line in the makefile in order to use different GCC ports. - -** Notes ** - -Some files used by the demo are not part of ChibiOS/RT but are copyright of -ST Microelectronics and are licensed under a different license. -Also note that not all the files present in the ST library are distributed -with ChibiOS/RT, you can find the whole library on the ST web site: - - http://www.st.com diff --git a/testhal/STM32/STM32F4xx/WDG/.cproject b/testhal/STM32/STM32F4xx/WDG/.cproject deleted file mode 100644 index b638ed4b3..000000000 --- a/testhal/STM32/STM32F4xx/WDG/.cproject +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/testhal/STM32/STM32F4xx/WDG/.project b/testhal/STM32/STM32F4xx/WDG/.project deleted file mode 100644 index a540ca68c..000000000 --- a/testhal/STM32/STM32F4xx/WDG/.project +++ /dev/null @@ -1,38 +0,0 @@ - - - STM32F4xx-WDG - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - board - 2 - CHIBIOS/os/hal/boards/ST_STM32F4_DISCOVERY - - - os - 2 - CHIBIOS/os - - - diff --git a/testhal/STM32/STM32F4xx/WDG/main.c b/testhal/STM32/STM32F4xx/WDG/main.c deleted file mode 100644 index 843392f12..000000000 --- a/testhal/STM32/STM32F4xx/WDG/main.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "ch.h" -#include "hal.h" - -/* - * Watchdog deadline set to more than one second (LSI=40000 / (64 * 1000)). - */ -static const WDGConfig wdgcfg = { - STM32_IWDG_PR_64, - STM32_IWDG_RL(1000) -}; - -/* - * Application entry point. - */ -int main(void) { - - /* - * 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(); - - /* - * Starting the watchdog driver. - */ - wdgStart(&WDGD1, &wdgcfg); - - /* - * Normal main() thread activity, it resets the watchdog. - */ - while (true) { - wdgReset(&WDGD1); - palToggleLine(LINE_LED4); - chThdSleepMilliseconds(500); - } - return 0; -} diff --git a/testhal/STM32/STM32F4xx/WDG/readme.txt b/testhal/STM32/STM32F4xx/WDG/readme.txt deleted file mode 100644 index 68755b908..000000000 --- a/testhal/STM32/STM32F4xx/WDG/readme.txt +++ /dev/null @@ -1,30 +0,0 @@ -***************************************************************************** -** ChibiOS/HAL - WDG driver demo for STM32F4xx. ** -***************************************************************************** - -** TARGET ** - -The demo runs on an ST STM32F4-Discovery board. - -** The Demo ** - -The application demonstrates the use of the STM32F4xx WDG driver. - -** Board Setup ** - -None. - -** Build Procedure ** - -The demo has been tested using the free Codesourcery GCC-based toolchain -and YAGARTO. -Just modify the TRGT line in the makefile in order to use different GCC ports. - -** Notes ** - -Some files used by the demo are not part of ChibiOS/RT but are copyright of -ST Microelectronics and are licensed under a different license. -Also note that not all the files present in the ST library are distributed -with ChibiOS/RT, you can find the whole library on the ST web site: - - http://www.st.com diff --git a/testhal/STM32/multi/WDG/.cproject b/testhal/STM32/multi/WDG/.cproject index 9d218288d..758b2389b 100644 --- a/testhal/STM32/multi/WDG/.cproject +++ b/testhal/STM32/multi/WDG/.cproject @@ -69,26 +69,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - @@ -99,28 +188,51 @@ + + + + + + + + + + + + + + + - + - - - - + + + + + + + + + + + + + - \ No newline at end of file diff --git a/testhal/STM32/multi/WDG/Makefile b/testhal/STM32/multi/WDG/Makefile index 959d6450e..2be49f404 100644 --- a/testhal/STM32/multi/WDG/Makefile +++ b/testhal/STM32/multi/WDG/Makefile @@ -3,6 +3,18 @@ # all: + @echo + @echo === Building for STM32F051-Discovery =============================== + +@make --no-print-directory -f make/stm32f051_discovery.make all + @echo ==================================================================== + @echo + @echo === Building for STM32F303_Discovery ============================== + +@make --no-print-directory -f ./make/stm32f303_discovery.make all + @echo ==================================================================== + @echo + @echo === Building for STM32F407-Discovery =============================== + +@make --no-print-directory -f make/stm32f407_discovery.make all + @echo ==================================================================== @echo @echo === Building for STM32WB55RG_Nucleo68 ============================= +@make --no-print-directory -f ./make/stm32wb55rg_nucleo68.make all @@ -10,6 +22,12 @@ all: @echo clean: + @echo + +@make --no-print-directory -f ./make/stm32f051_discovery.make clean + @echo + +@make --no-print-directory -f ./make/stm32f303_discovery.make clean + @echo + +@make --no-print-directory -f ./make/stm32f407_discovery.make clean @echo +@make --no-print-directory -f ./make/stm32wb55rg_nucleo68.make clean @echo diff --git a/testhal/STM32/STM32F0xx/WDG/chconf.h b/testhal/STM32/multi/WDG/cfg/stm32f051_discovery/chconf.h similarity index 100% rename from testhal/STM32/STM32F0xx/WDG/chconf.h rename to testhal/STM32/multi/WDG/cfg/stm32f051_discovery/chconf.h diff --git a/testhal/STM32/STM32F0xx/WDG/halconf.h b/testhal/STM32/multi/WDG/cfg/stm32f051_discovery/halconf.h similarity index 100% rename from testhal/STM32/STM32F0xx/WDG/halconf.h rename to testhal/STM32/multi/WDG/cfg/stm32f051_discovery/halconf.h diff --git a/testhal/STM32/STM32F0xx/WDG/mcuconf.h b/testhal/STM32/multi/WDG/cfg/stm32f051_discovery/mcuconf.h similarity index 96% rename from testhal/STM32/STM32F0xx/WDG/mcuconf.h rename to testhal/STM32/multi/WDG/cfg/stm32f051_discovery/mcuconf.h index 07eaf4831..36ac27393 100644 --- a/testhal/STM32/STM32F0xx/WDG/mcuconf.h +++ b/testhal/STM32/multi/WDG/cfg/stm32f051_discovery/mcuconf.h @@ -152,7 +152,7 @@ /* * SERIAL driver system settings. */ -#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART1 TRUE #define STM32_SERIAL_USE_USART2 FALSE /* diff --git a/testhal/STM32/multi/WDG/cfg/stm32f051_discovery/portab.c b/testhal/STM32/multi/WDG/cfg/stm32f051_discovery/portab.c new file mode 100644 index 000000000..51beb324b --- /dev/null +++ b/testhal/STM32/multi/WDG/cfg/stm32f051_discovery/portab.c @@ -0,0 +1,55 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file portab.c + * @brief Application portability module code. + * + * @addtogroup application_portability + * @{ + */ + +#include "portab.h" + +/*===========================================================================*/ +/* Module local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module local types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module local variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module local functions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module exported functions. */ +/*===========================================================================*/ + +void portab_setup(void) { + +} + +/** @} */ diff --git a/testhal/STM32/multi/WDG/cfg/stm32f051_discovery/portab.h b/testhal/STM32/multi/WDG/cfg/stm32f051_discovery/portab.h new file mode 100644 index 000000000..9777a480f --- /dev/null +++ b/testhal/STM32/multi/WDG/cfg/stm32f051_discovery/portab.h @@ -0,0 +1,68 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file portab.h + * @brief Application portability macros and structures. + * + * @addtogroup application_portability + * @{ + */ + +#ifndef PORTAB_H +#define PORTAB_H + +/*===========================================================================*/ +/* Module constants. */ +/*===========================================================================*/ + +#define PORTAB_LINE_LED1 LINE_LED3 + +/*===========================================================================*/ +/* Module pre-compile time settings. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module data structures and types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module macros. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ + +#ifdef __cplusplus +extern "C" { +#endif + void portab_setup(void); +#ifdef __cplusplus +} +#endif + +/*===========================================================================*/ +/* Module inline functions. */ +/*===========================================================================*/ + +#endif /* PORTAB_H */ + +/** @} */ diff --git a/testhal/STM32/STM32F3xx/WDG/chconf.h b/testhal/STM32/multi/WDG/cfg/stm32f303_discovery/chconf.h similarity index 100% rename from testhal/STM32/STM32F3xx/WDG/chconf.h rename to testhal/STM32/multi/WDG/cfg/stm32f303_discovery/chconf.h diff --git a/testhal/STM32/STM32F3xx/WDG/halconf.h b/testhal/STM32/multi/WDG/cfg/stm32f303_discovery/halconf.h similarity index 100% rename from testhal/STM32/STM32F3xx/WDG/halconf.h rename to testhal/STM32/multi/WDG/cfg/stm32f303_discovery/halconf.h diff --git a/testhal/STM32/STM32F3xx/WDG/mcuconf.h b/testhal/STM32/multi/WDG/cfg/stm32f303_discovery/mcuconf.h similarity index 96% rename from testhal/STM32/STM32F3xx/WDG/mcuconf.h rename to testhal/STM32/multi/WDG/cfg/stm32f303_discovery/mcuconf.h index da9203767..b06d5b30b 100644 --- a/testhal/STM32/STM32F3xx/WDG/mcuconf.h +++ b/testhal/STM32/multi/WDG/cfg/stm32f303_discovery/mcuconf.h @@ -127,8 +127,8 @@ * DAC driver system settings. */ #define STM32_DAC_DUAL_MODE FALSE -#define STM32_DAC_USE_DAC1_CH1 TRUE -#define STM32_DAC_USE_DAC1_CH2 TRUE +#define STM32_DAC_USE_DAC1_CH1 FALSE +#define STM32_DAC_USE_DAC1_CH2 FALSE #define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 #define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 #define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 diff --git a/testhal/STM32/multi/WDG/cfg/stm32f303_discovery/portab.c b/testhal/STM32/multi/WDG/cfg/stm32f303_discovery/portab.c new file mode 100644 index 000000000..51beb324b --- /dev/null +++ b/testhal/STM32/multi/WDG/cfg/stm32f303_discovery/portab.c @@ -0,0 +1,55 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file portab.c + * @brief Application portability module code. + * + * @addtogroup application_portability + * @{ + */ + +#include "portab.h" + +/*===========================================================================*/ +/* Module local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module local types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module local variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module local functions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module exported functions. */ +/*===========================================================================*/ + +void portab_setup(void) { + +} + +/** @} */ diff --git a/testhal/STM32/multi/WDG/cfg/stm32f303_discovery/portab.h b/testhal/STM32/multi/WDG/cfg/stm32f303_discovery/portab.h new file mode 100644 index 000000000..853f8151b --- /dev/null +++ b/testhal/STM32/multi/WDG/cfg/stm32f303_discovery/portab.h @@ -0,0 +1,68 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file portab.h + * @brief Application portability macros and structures. + * + * @addtogroup application_portability + * @{ + */ + +#ifndef PORTAB_H +#define PORTAB_H + +/*===========================================================================*/ +/* Module constants. */ +/*===========================================================================*/ + +#define PORTAB_LINE_LED1 LINE_LED4_BLUE + +/*===========================================================================*/ +/* Module pre-compile time settings. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module data structures and types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module macros. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ + +#ifdef __cplusplus +extern "C" { +#endif + void portab_setup(void); +#ifdef __cplusplus +} +#endif + +/*===========================================================================*/ +/* Module inline functions. */ +/*===========================================================================*/ + +#endif /* PORTAB_H */ + +/** @} */ diff --git a/testhal/STM32/STM32F4xx/WDG/chconf.h b/testhal/STM32/multi/WDG/cfg/stm32f407_discovery/chconf.h similarity index 100% rename from testhal/STM32/STM32F4xx/WDG/chconf.h rename to testhal/STM32/multi/WDG/cfg/stm32f407_discovery/chconf.h diff --git a/testhal/STM32/STM32F4xx/WDG/halconf.h b/testhal/STM32/multi/WDG/cfg/stm32f407_discovery/halconf.h similarity index 100% rename from testhal/STM32/STM32F4xx/WDG/halconf.h rename to testhal/STM32/multi/WDG/cfg/stm32f407_discovery/halconf.h diff --git a/testhal/STM32/STM32F4xx/WDG/mcuconf.h b/testhal/STM32/multi/WDG/cfg/stm32f407_discovery/mcuconf.h similarity index 96% rename from testhal/STM32/STM32F4xx/WDG/mcuconf.h rename to testhal/STM32/multi/WDG/cfg/stm32f407_discovery/mcuconf.h index eed7d08bb..bc50b4366 100644 --- a/testhal/STM32/STM32F4xx/WDG/mcuconf.h +++ b/testhal/STM32/multi/WDG/cfg/stm32f407_discovery/mcuconf.h @@ -64,7 +64,7 @@ #define STM32_MCO1PRE STM32_MCO1PRE_DIV1 #define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK #define STM32_MCO2PRE STM32_MCO2PRE_DIV5 -#define STM32_I2SSRC STM32_I2SSRC_PLLI2S +#define STM32_I2SSRC STM32_I2SSRC_CKIN #define STM32_PLLI2SN_VALUE 192 #define STM32_PLLI2SR_VALUE 5 @@ -267,7 +267,7 @@ * SERIAL driver system settings. */ #define STM32_SERIAL_USE_USART1 FALSE -#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART2 TRUE #define STM32_SERIAL_USE_USART3 FALSE #define STM32_SERIAL_USE_UART4 FALSE #define STM32_SERIAL_USE_UART5 FALSE diff --git a/testhal/STM32/multi/WDG/cfg/stm32f407_discovery/portab.c b/testhal/STM32/multi/WDG/cfg/stm32f407_discovery/portab.c new file mode 100644 index 000000000..51beb324b --- /dev/null +++ b/testhal/STM32/multi/WDG/cfg/stm32f407_discovery/portab.c @@ -0,0 +1,55 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file portab.c + * @brief Application portability module code. + * + * @addtogroup application_portability + * @{ + */ + +#include "portab.h" + +/*===========================================================================*/ +/* Module local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module local types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module local variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module local functions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module exported functions. */ +/*===========================================================================*/ + +void portab_setup(void) { + +} + +/** @} */ diff --git a/testhal/STM32/multi/WDG/cfg/stm32f407_discovery/portab.h b/testhal/STM32/multi/WDG/cfg/stm32f407_discovery/portab.h new file mode 100644 index 000000000..9777a480f --- /dev/null +++ b/testhal/STM32/multi/WDG/cfg/stm32f407_discovery/portab.h @@ -0,0 +1,68 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file portab.h + * @brief Application portability macros and structures. + * + * @addtogroup application_portability + * @{ + */ + +#ifndef PORTAB_H +#define PORTAB_H + +/*===========================================================================*/ +/* Module constants. */ +/*===========================================================================*/ + +#define PORTAB_LINE_LED1 LINE_LED3 + +/*===========================================================================*/ +/* Module pre-compile time settings. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module data structures and types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module macros. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ + +#ifdef __cplusplus +extern "C" { +#endif + void portab_setup(void); +#ifdef __cplusplus +} +#endif + +/*===========================================================================*/ +/* Module inline functions. */ +/*===========================================================================*/ + +#endif /* PORTAB_H */ + +/** @} */ diff --git a/testhal/STM32/multi/WDG/cfg/stm32wb55rg_nucleo68/portab.h b/testhal/STM32/multi/WDG/cfg/stm32wb55rg_nucleo68/portab.h index 547b9690e..4909d7eb7 100644 --- a/testhal/STM32/multi/WDG/cfg/stm32wb55rg_nucleo68/portab.h +++ b/testhal/STM32/multi/WDG/cfg/stm32wb55rg_nucleo68/portab.h @@ -29,7 +29,7 @@ /* Module constants. */ /*===========================================================================*/ -#define PORTAB_BLINK_LED1 LINE_LED_GREEN +#define PORTAB_LINE_LED1 LINE_LED_GREEN /*===========================================================================*/ /* Module pre-compile time settings. */ diff --git a/testhal/STM32/multi/WDG/main.c b/testhal/STM32/multi/WDG/main.c index 36ed31e81..070773d6d 100644 --- a/testhal/STM32/multi/WDG/main.c +++ b/testhal/STM32/multi/WDG/main.c @@ -22,9 +22,11 @@ * Watchdog deadline set to more than one second (LSI=40000 / (64 * 1000)). */ static const WDGConfig wdgcfg = { - STM32_IWDG_PR_64, - STM32_IWDG_RL(1000), - STM32_IWDG_WIN_DISABLED + .pr = STM32_IWDG_PR_64, + .rlr = STM32_IWDG_RL(1000), +#if STM32_IWDG_IS_WINDOWED + .winr = STM32_IWDG_WIN_DISABLED, +#endif }; /* @@ -52,7 +54,7 @@ int main(void) { */ while (true) { wdgReset(&WDGD1); - palToggleLine(PORTAB_BLINK_LED1); + palToggleLine(PORTAB_LINE_LED1); chThdSleepMilliseconds(500); } return 0; diff --git a/testhal/STM32/STM32F0xx/WDG/Makefile b/testhal/STM32/multi/WDG/make/stm32f051_discovery.make similarity index 61% rename from testhal/STM32/STM32F0xx/WDG/Makefile rename to testhal/STM32/multi/WDG/make/stm32f051_discovery.make index 0f15013bf..f083ac975 100644 --- a/testhal/STM32/STM32F0xx/WDG/Makefile +++ b/testhal/STM32/multi/WDG/make/stm32f051_discovery.make @@ -5,12 +5,12 @@ # 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). ifeq ($(USE_COPT),) - USE_COPT = + USE_COPT = endif # C++ specific options here (added to USE_OPT). @@ -18,26 +18,21 @@ ifeq ($(USE_CPPOPT),) USE_CPPOPT = -fno-rtti endif -# Enable this if you want the linker to remove unused code and data +# Enable this if you want the linker to remove unused code and data. ifeq ($(USE_LINK_GC),) USE_LINK_GC = yes endif # Linker extra options here. ifeq ($(USE_LDOPT),) - USE_LDOPT = + USE_LDOPT = endif -# Enable this if you want link time optimizations (LTO) +# Enable this if you want link time optimizations (LTO). ifeq ($(USE_LTO),) USE_LTO = yes endif -# If enabled, this option allows to compile the application in THUMB mode. -ifeq ($(USE_THUMB),) - USE_THUMB = yes -endif - # Enable this if you want to see the full log while compiling. ifeq ($(USE_VERBOSE_COMPILE),) USE_VERBOSE_COMPILE = no @@ -66,7 +61,17 @@ endif # Stack size to the allocated to the Cortex-M main/exceptions stack. This # stack is used for processing interrupts and exceptions. ifeq ($(USE_EXCEPTIONS_STACKSIZE),) - USE_EXCEPTIONS_STACKSIZE = 0x400 + USE_EXCEPTIONS_STACKSIZE = 0x200 +endif + +# Enables the use of FPU (no, softfp, hard). +ifeq ($(USE_FPU),) + USE_FPU = no +endif + +# FPU-related options. +ifeq ($(USE_FPU_OPT),) + USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16 endif # @@ -74,14 +79,20 @@ endif ############################################################################## ############################################################################## -# Project, sources and paths +# Project, target, sources and paths # # Define project name here PROJECT = ch -# Imported source files and paths -CHIBIOS = ../../../.. +# Target settings. +MCU = cortex-m0 + +# Imported source files and paths. +CHIBIOS := ../../../.. +CONFDIR := ./cfg/stm32f051_discovery +BUILDDIR := ./build/stm32f051_discovery +DEPDIR := ./.dep/stm32f051_discovery # Licensing files. include $(CHIBIOS)/os/license/license.mk @@ -95,6 +106,8 @@ include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk # RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/common/ports/ARMv6-M/compilers/GCC/mk/port.mk +# Auto-build files in ./source recursively. +include $(CHIBIOS)/tools/mk/autobuild.mk # Other files (optional). #include $(CHIBIOS)/os/test/test.mk #include $(CHIBIOS)/test/rt/rt_test.mk @@ -107,79 +120,30 @@ LDSCRIPT= $(STARTUPLD)/STM32F051x8.ld # setting. CSRC = $(ALLCSRC) \ $(TESTSRC) \ + $(CONFDIR)/portab.c \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global # setting. CPPSRC = $(ALLCPPSRC) -# C sources to be compiled in ARM mode regardless of the global setting. -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler -# option that results in lower performance and larger code size. -ACSRC = - -# C++ sources to be compiled in ARM mode regardless of the global setting. -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler -# option that results in lower performance and larger code size. -ACPPSRC = - -# C sources to be compiled in THUMB mode regardless of the global setting. -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler -# option that results in lower performance and larger code size. -TCSRC = - -# C sources to be compiled in THUMB mode regardless of the global setting. -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler -# option that results in lower performance and larger code size. -TCPPSRC = - -# List ASM source files here +# List ASM source files here. ASMSRC = $(ALLASMSRC) + +# List ASM with preprocessor source files here. ASMXSRC = $(ALLXASMSRC) -INCDIR = $(ALLINC) $(TESTINC) +# Inclusion directories. +INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC) -# -# Project, sources and paths -############################################################################## - -############################################################################## -# Compiler settings -# - -MCU = cortex-m0 - -#TRGT = arm-elf- -TRGT = arm-none-eabi- -CC = $(TRGT)gcc -CPPC = $(TRGT)g++ -# Enable loading with g++ only if you need C++ runtime support. -# NOTE: You can use C++ even without C++ support if you are careful. C++ -# runtime support makes code size explode. -LD = $(TRGT)gcc -#LD = $(TRGT)g++ -CP = $(TRGT)objcopy -AS = $(TRGT)gcc -x assembler-with-cpp -AR = $(TRGT)ar -OD = $(TRGT)objdump -SZ = $(TRGT)size -HEX = $(CP) -O ihex -BIN = $(CP) -O binary - -# ARM-specific options here -AOPT = - -# THUMB-specific options here -TOPT = -mthumb -DTHUMB - -# Define C warning options here +# Define C warning options here. CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes -# Define C++ warning options here +# Define C++ warning options here. CPPWARN = -Wall -Wextra -Wundef # -# Compiler settings +# Project, target, sources and paths ############################################################################## ############################################################################## @@ -202,8 +166,25 @@ ULIBDIR = ULIBS = # -# End of user defines +# End of user section ############################################################################## +############################################################################## +# Common rules +# + RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk +include $(RULESPATH)/arm-none-eabi.mk include $(RULESPATH)/rules.mk + +# +# Common rules +############################################################################## + +############################################################################## +# Custom rules +# + +# +# Custom rules +############################################################################## diff --git a/testhal/STM32/STM32F3xx/WDG/Makefile b/testhal/STM32/multi/WDG/make/stm32f303_discovery.make similarity index 62% rename from testhal/STM32/STM32F3xx/WDG/Makefile rename to testhal/STM32/multi/WDG/make/stm32f303_discovery.make index b9c9cb6c3..639af2a0d 100644 --- a/testhal/STM32/STM32F3xx/WDG/Makefile +++ b/testhal/STM32/multi/WDG/make/stm32f303_discovery.make @@ -5,12 +5,12 @@ # 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). ifeq ($(USE_COPT),) - USE_COPT = + USE_COPT = endif # C++ specific options here (added to USE_OPT). @@ -18,26 +18,21 @@ ifeq ($(USE_CPPOPT),) USE_CPPOPT = -fno-rtti endif -# Enable this if you want the linker to remove unused code and data +# Enable this if you want the linker to remove unused code and data. ifeq ($(USE_LINK_GC),) USE_LINK_GC = yes endif # Linker extra options here. ifeq ($(USE_LDOPT),) - USE_LDOPT = + USE_LDOPT = endif -# Enable this if you want link time optimizations (LTO) +# Enable this if you want link time optimizations (LTO). ifeq ($(USE_LTO),) USE_LTO = yes endif -# If enabled, this option allows to compile the application in THUMB mode. -ifeq ($(USE_THUMB),) - USE_THUMB = yes -endif - # Enable this if you want to see the full log while compiling. ifeq ($(USE_VERBOSE_COMPILE),) USE_VERBOSE_COMPILE = no @@ -74,19 +69,30 @@ ifeq ($(USE_FPU),) USE_FPU = no endif +# FPU-related options. +ifeq ($(USE_FPU_OPT),) + USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16 +endif + # # Architecture or project specific options ############################################################################## ############################################################################## -# Project, sources and paths +# Project, target, sources and paths # # Define project name here PROJECT = ch -# Imported source files and paths -CHIBIOS = ../../../.. +# Target settings. +MCU = cortex-m4 + +# Imported source files and paths. +CHIBIOS := ../../../.. +CONFDIR := ./cfg/stm32f303_discovery +BUILDDIR := ./build/stm32f303_discovery +DEPDIR := ./.dep/stm32f303_discovery # Licensing files. include $(CHIBIOS)/os/license/license.mk @@ -100,6 +106,8 @@ include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk # RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/common/ports/ARMv7-M/compilers/GCC/mk/port.mk +# Auto-build files in ./source recursively. +include $(CHIBIOS)/tools/mk/autobuild.mk # Other files (optional). #include $(CHIBIOS)/os/test/test.mk #include $(CHIBIOS)/test/rt/rt_test.mk @@ -112,79 +120,30 @@ LDSCRIPT= $(STARTUPLD)/STM32F303xC.ld # setting. CSRC = $(ALLCSRC) \ $(TESTSRC) \ + $(CONFDIR)/portab.c \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global # setting. CPPSRC = $(ALLCPPSRC) -# C sources to be compiled in ARM mode regardless of the global setting. -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler -# option that results in lower performance and larger code size. -ACSRC = - -# C++ sources to be compiled in ARM mode regardless of the global setting. -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler -# option that results in lower performance and larger code size. -ACPPSRC = - -# C sources to be compiled in THUMB mode regardless of the global setting. -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler -# option that results in lower performance and larger code size. -TCSRC = - -# C sources to be compiled in THUMB mode regardless of the global setting. -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler -# option that results in lower performance and larger code size. -TCPPSRC = - -# List ASM source files here +# List ASM source files here. ASMSRC = $(ALLASMSRC) + +# List ASM with preprocessor source files here. ASMXSRC = $(ALLXASMSRC) -INCDIR = $(ALLINC) $(TESTINC) +# Inclusion directories. +INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC) -# -# Project, sources and paths -############################################################################## - -############################################################################## -# Compiler settings -# - -MCU = cortex-m4 - -#TRGT = arm-elf- -TRGT = arm-none-eabi- -CC = $(TRGT)gcc -CPPC = $(TRGT)g++ -# Enable loading with g++ only if you need C++ runtime support. -# NOTE: You can use C++ even without C++ support if you are careful. C++ -# runtime support makes code size explode. -LD = $(TRGT)gcc -#LD = $(TRGT)g++ -CP = $(TRGT)objcopy -AS = $(TRGT)gcc -x assembler-with-cpp -AR = $(TRGT)ar -OD = $(TRGT)objdump -SZ = $(TRGT)size -HEX = $(CP) -O ihex -BIN = $(CP) -O binary - -# ARM-specific options here -AOPT = - -# THUMB-specific options here -TOPT = -mthumb -DTHUMB - -# Define C warning options here +# Define C warning options here. CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes -# Define C++ warning options here +# Define C++ warning options here. CPPWARN = -Wall -Wextra -Wundef # -# Compiler settings +# Project, target, sources and paths ############################################################################## ############################################################################## @@ -207,8 +166,25 @@ ULIBDIR = ULIBS = # -# End of user defines +# End of user section ############################################################################## +############################################################################## +# Common rules +# + RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk +include $(RULESPATH)/arm-none-eabi.mk include $(RULESPATH)/rules.mk + +# +# Common rules +############################################################################## + +############################################################################## +# Custom rules +# + +# +# Custom rules +############################################################################## diff --git a/testhal/STM32/STM32F4xx/WDG/Makefile b/testhal/STM32/multi/WDG/make/stm32f407_discovery.make similarity index 62% rename from testhal/STM32/STM32F4xx/WDG/Makefile rename to testhal/STM32/multi/WDG/make/stm32f407_discovery.make index 11782a7da..5e3a1159b 100644 --- a/testhal/STM32/STM32F4xx/WDG/Makefile +++ b/testhal/STM32/multi/WDG/make/stm32f407_discovery.make @@ -5,12 +5,12 @@ # 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). ifeq ($(USE_COPT),) - USE_COPT = + USE_COPT = endif # C++ specific options here (added to USE_OPT). @@ -18,26 +18,21 @@ ifeq ($(USE_CPPOPT),) USE_CPPOPT = -fno-rtti endif -# Enable this if you want the linker to remove unused code and data +# Enable this if you want the linker to remove unused code and data. ifeq ($(USE_LINK_GC),) USE_LINK_GC = yes endif # Linker extra options here. ifeq ($(USE_LDOPT),) - USE_LDOPT = + USE_LDOPT = endif -# Enable this if you want link time optimizations (LTO) +# Enable this if you want link time optimizations (LTO). ifeq ($(USE_LTO),) USE_LTO = yes endif -# If enabled, this option allows to compile the application in THUMB mode. -ifeq ($(USE_THUMB),) - USE_THUMB = yes -endif - # Enable this if you want to see the full log while compiling. ifeq ($(USE_VERBOSE_COMPILE),) USE_VERBOSE_COMPILE = no @@ -74,19 +69,30 @@ ifeq ($(USE_FPU),) USE_FPU = no endif +# FPU-related options. +ifeq ($(USE_FPU_OPT),) + USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16 +endif + # # Architecture or project specific options ############################################################################## ############################################################################## -# Project, sources and paths +# Project, target, sources and paths # # Define project name here PROJECT = ch -# Imported source files and paths -CHIBIOS = ../../../.. +# Target settings. +MCU = cortex-m4 + +# Imported source files and paths. +CHIBIOS := ../../../.. +CONFDIR := ./cfg/stm32f407_discovery +BUILDDIR := ./build/stm32f407_discovery +DEPDIR := ./.dep/stm32f407_discovery # Licensing files. include $(CHIBIOS)/os/license/license.mk @@ -100,6 +106,8 @@ include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk # RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/common/ports/ARMv7-M/compilers/GCC/mk/port.mk +# Auto-build files in ./source recursively. +include $(CHIBIOS)/tools/mk/autobuild.mk # Other files (optional). #include $(CHIBIOS)/os/test/test.mk #include $(CHIBIOS)/test/rt/rt_test.mk @@ -112,79 +120,30 @@ LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld # setting. CSRC = $(ALLCSRC) \ $(TESTSRC) \ + $(CONFDIR)/portab.c \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global # setting. CPPSRC = $(ALLCPPSRC) -# C sources to be compiled in ARM mode regardless of the global setting. -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler -# option that results in lower performance and larger code size. -ACSRC = - -# C++ sources to be compiled in ARM mode regardless of the global setting. -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler -# option that results in lower performance and larger code size. -ACPPSRC = - -# C sources to be compiled in THUMB mode regardless of the global setting. -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler -# option that results in lower performance and larger code size. -TCSRC = - -# C sources to be compiled in THUMB mode regardless of the global setting. -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler -# option that results in lower performance and larger code size. -TCPPSRC = - -# List ASM source files here +# List ASM source files here. ASMSRC = $(ALLASMSRC) + +# List ASM with preprocessor source files here. ASMXSRC = $(ALLXASMSRC) -INCDIR = $(ALLINC) $(TESTINC) +# Inclusion directories. +INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC) -# -# Project, sources and paths -############################################################################## - -############################################################################## -# Compiler settings -# - -MCU = cortex-m4 - -#TRGT = arm-elf- -TRGT = arm-none-eabi- -CC = $(TRGT)gcc -CPPC = $(TRGT)g++ -# Enable loading with g++ only if you need C++ runtime support. -# NOTE: You can use C++ even without C++ support if you are careful. C++ -# runtime support makes code size explode. -LD = $(TRGT)gcc -#LD = $(TRGT)g++ -CP = $(TRGT)objcopy -AS = $(TRGT)gcc -x assembler-with-cpp -AR = $(TRGT)ar -OD = $(TRGT)objdump -SZ = $(TRGT)size -HEX = $(CP) -O ihex -BIN = $(CP) -O binary - -# ARM-specific options here -AOPT = - -# THUMB-specific options here -TOPT = -mthumb -DTHUMB - -# Define C warning options here +# Define C warning options here. CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes -# Define C++ warning options here +# Define C++ warning options here. CPPWARN = -Wall -Wextra -Wundef # -# Compiler settings +# Project, target, sources and paths ############################################################################## ############################################################################## @@ -207,8 +166,25 @@ ULIBDIR = ULIBS = # -# End of user defines +# End of user section ############################################################################## +############################################################################## +# Common rules +# + RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk +include $(RULESPATH)/arm-none-eabi.mk include $(RULESPATH)/rules.mk + +# +# Common rules +############################################################################## + +############################################################################## +# Custom rules +# + +# +# Custom rules +##############################################################################