/**
 * \file
 * \brief chip::lowLevelInitialization() implementation for STM32F0
 *
 * \author Copyright (C) 2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
 *
 * \par License
 * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
 * distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include "distortos/chip/lowLevelInitialization.hpp"

#include "distortos/chip/STM32F0-FLASH.hpp"

#include "distortos/distortosConfiguration.h"

namespace distortos
{

namespace chip
{

/*---------------------------------------------------------------------------------------------------------------------+
| global functions
+---------------------------------------------------------------------------------------------------------------------*/

void lowLevelInitialization()
{
#ifdef CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE
	configurePrefetchBuffer(true);
#else	// !def CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE
	configurePrefetchBuffer(false);
#endif	// !def CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE
}

}	// namespace chip

}	// namespace distortos

/**
 * \file
 * \brief chip::lowLevelInitialization() implementation for STM32F0
 *
 * \author Copyright (C) 2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
 *
 * \par License
 * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
 * distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include "distortos/chip/lowLevelInitialization.hpp"

namespace distortos
{

namespace chip
{

/*---------------------------------------------------------------------------------------------------------------------+
| global functions
+---------------------------------------------------------------------------------------------------------------------*/

void lowLevelInitialization()
{

}

}	// namespace chip

}	// namespace distortos

--- 
+++ 
@@ -11,6 +11,10 @@
 
 #include "distortos/chip/lowLevelInitialization.hpp"
 
+#include "distortos/chip/STM32F0-FLASH.hpp"
+
+#include "distortos/distortosConfiguration.h"
+
 namespace distortos
 {
 
@@ -23,7 +27,11 @@
 
 void lowLevelInitialization()
 {
-
+#ifdef CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE
+	configurePrefetchBuffer(true);
+#else	// !def CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE
+	configurePrefetchBuffer(false);
+#endif	// !def CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE
 }
 
 }	// namespace chip
Enable flash prefetch in low-level initialization for STM32F0

Flash prefetch is enabled or disabled depending on whether
CONFIG_CHIP_STM32F0_FLASH_PREFETCH_ENABLE is defined or not.