forked from wolfSSL/wolfssl
fix MPU menu
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#define NO_MAIN_DRIVER
|
||||
#define BENCH_EMBEDDED
|
||||
#define NO_DEV_RANDOM
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
|
||||
// <h>Common options
|
||||
// <o> MPU<0=>Undefined<1=>STM32F4xx<2=>STM32F7xx<3=>STM32F7xx
|
||||
// <o> MPU<0=>Undefined<1=>STM32F2xx<2=>STM32F4xx<3=>STM32F7xx
|
||||
#define MDK_CONF_MPU 3
|
||||
#if MDK_CONF_MPU == 0
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
// <o> Network<0=>None <1=>RLnet <2=>User I/O
|
||||
#define MDK_CONF_NETWORK 1
|
||||
#if MDK_CONF_NETWORK_ == 0
|
||||
#if MDK_CONF_NETWORK == 0
|
||||
#elif MDK_CONF_NETWORK == 1
|
||||
#define WOLFSSL_KEIL_TCP_NET
|
||||
#elif MDK_CONF_NETWORK == 2
|
||||
|
@@ -36,7 +36,7 @@
|
||||
#if defined(STM32F7xx)
|
||||
#include "stm32f7xx_hal.h"
|
||||
#elif defined(STM32F4xx)
|
||||
#include "stm32f2xx_hal.h"
|
||||
#include "stm32f4xx_hal.h"
|
||||
#elif defined(STM32F2xx)
|
||||
#include "stm32f2xx_hal.h"
|
||||
#endif
|
||||
@@ -58,8 +58,63 @@ static void CPU_CACHE_Enable (void) {
|
||||
extern uint32_t os_time;
|
||||
static time_t epochTime;
|
||||
|
||||
uint32_t HAL_GetTick(void) {
|
||||
return os_time;
|
||||
uint32_t HAL_GetTick(void) {
|
||||
return os_time;
|
||||
}
|
||||
|
||||
time_t time(time_t *t){
|
||||
return epochTime ;
|
||||
}
|
||||
|
||||
void setTime(time_t t){
|
||||
epochTime = t;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_CURRTIME_OSTICK
|
||||
|
||||
#include <stdint.h>
|
||||
extern uint32_t os_time;
|
||||
|
||||
double current_time(int reset)
|
||||
{
|
||||
if(reset) os_time = 0 ;
|
||||
return (double)os_time /1000.0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <stdint.h>
|
||||
#define DWT ((DWT_Type *) (0xE0001000UL) )
|
||||
typedef struct
|
||||
{
|
||||
uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */
|
||||
uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */
|
||||
} DWT_Type;
|
||||
|
||||
extern uint32_t SystemCoreClock ;
|
||||
|
||||
double current_time(int reset)
|
||||
{
|
||||
if(reset) DWT->CYCCNT = 0 ;
|
||||
return ((double)DWT->CYCCNT/SystemCoreClock) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void MPU_Config (void) {
|
||||
|
||||
}
|
||||
|
||||
static void CPU_CACHE_Enable (void) {
|
||||
|
||||
}
|
||||
|
||||
#ifdef RTE_CMSIS_RTOS_RTX
|
||||
extern uint32_t os_time;
|
||||
static time_t epochTime;
|
||||
|
||||
uint32_t HAL_GetTick(void) {
|
||||
return os_time;
|
||||
}
|
||||
|
||||
time_t time(time_t *t){
|
||||
|
@@ -38,7 +38,7 @@
|
||||
#if defined(STM32F7xx)
|
||||
#include "stm32f7xx_hal.h"
|
||||
#elif defined(STM32F4xx)
|
||||
#include "stm32f2xx_hal.h"
|
||||
#include "stm32f4xx_hal.h"
|
||||
#elif defined(STM32F2xx)
|
||||
#include "stm32f2xx_hal.h"
|
||||
#endif
|
||||
|
@@ -32,7 +32,7 @@
|
||||
#if defined(STM32F7xx)
|
||||
#include "stm32f7xx_hal.h"
|
||||
#elif defined(STM32F4xx)
|
||||
#include "stm32f2xx_hal.h"
|
||||
#include "stm32f4xx_hal.h"
|
||||
#elif defined(STM32F2xx)
|
||||
#include "stm32f2xx_hal.h"
|
||||
#endif
|
||||
@@ -49,10 +49,7 @@
|
||||
// </h>
|
||||
|
||||
//------------- <<< end of configuration section >>> -----------------------
|
||||
#warning "write MPU specific Set ups\n"
|
||||
static void SystemClock_Config (void) {
|
||||
|
||||
}
|
||||
#warning "write MPU specific Set ups\n"
|
||||
static void SystemClock_Config (void) {
|
||||
|
||||
|
@@ -33,7 +33,7 @@
|
||||
#if defined(STM32F7xx)
|
||||
#include "stm32f7xx_hal.h"
|
||||
#elif defined(STM32F4xx)
|
||||
#include "stm32f2xx_hal.h"
|
||||
#include "stm32f4xx_hal.h"
|
||||
#elif defined(STM32F2xx)
|
||||
#include "stm32f2xx_hal.h"
|
||||
#endif
|
||||
|
@@ -32,7 +32,7 @@
|
||||
#if defined(STM32F7xx)
|
||||
#include "stm32f7xx_hal.h"
|
||||
#elif defined(STM32F4xx)
|
||||
#include "stm32f2xx_hal.h"
|
||||
#include "stm32f4xx_hal.h"
|
||||
#elif defined(STM32F2xx)
|
||||
#include "stm32f2xx_hal.h"
|
||||
#endif
|
||||
|
@@ -32,7 +32,7 @@
|
||||
#if defined(STM32F7xx)
|
||||
#include "stm32f7xx_hal.h"
|
||||
#elif defined(STM32F4xx)
|
||||
#include "stm32f2xx_hal.h"
|
||||
#include "stm32f4xx_hal.h"
|
||||
#elif defined(STM32F2xx)
|
||||
#include "stm32f2xx_hal.h"
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user