modify path name & stm32f2 support without mpu.

This commit is contained in:
ATShining
2024-03-01 14:39:52 +08:00
parent e61b83c3e3
commit 9bea17b7e5
17 changed files with 20 additions and 19 deletions

View File

@@ -76,6 +76,7 @@ sudo apt update
sudo apt install ninja-build
sudo apt install cpio srecord
sudo apt install python3
sudo apt install srecord
```
3. 下载gcc
- 直接使用ubuntu命令安装的gcc arm会没有gdb可以直接到我给定的仓库下载

View File

@@ -1,7 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set FLASH_SIZE 0x80000
adapter driver jlink
transport select swd
adapter speed 2000
source [find target/stm32f1x.cfg]

View File

@@ -19,4 +19,4 @@ set(PythonInterp_FIND_VERSION_MAJOR 3)
set(PythonInterp_FIND_VERSION_MINOR 6)
set(PythonInterp_FIND_VERSION_EXACT 0)
set(PythonInterp_FIND_REQUIRED 1)
include(cmake/backports/FindPythonInterp.cmake)
include(mkrtos_cmake/backports/FindPythonInterp.cmake)

View File

@@ -1,12 +1,12 @@
set(PROJECT_ROOT ${CMAKE_SOURCE_DIR})
set(KCONFIG_ROOT ${CMAKE_SOURCE_DIR}/Kconfig)
set(BOARD_DIR ${CMAKE_SOURCE_DIR}/configs)
set(BOARD_DIR ${CMAKE_SOURCE_DIR}/mkrtos_configs)
set(AUTOCONF_H ${CMAKE_CURRENT_BINARY_DIR}/autoconf.h)
# Re-configure (Re-execute all CMakeLists.txt code) when autoconf.h changes
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${AUTOCONF_H})
include(cmake/extensions.cmake)
include(cmake/python.cmake)
include(cmake/kconfig.cmake)
include(mkrtos_cmake/extensions.cmake)
include(mkrtos_cmake/python.cmake)
include(mkrtos_cmake/kconfig.cmake)

View File

@@ -6,7 +6,7 @@ CONFIG_KNL_INFO=y
CONFIG_KNL_TEXT_ADDR=0x8000000
CONFIG_KNL_TEXT_SIZE=0x100000
CONFIG_KNL_DATA_ADDR=0x20000000
CONFIG_KNL_DATA_SIZE=0x2000000
CONFIG_KNL_DATA_SIZE=0x100000
CONFIG_KNL_OFFSET=0x2000
CONFIG_INIT_TASK_OFFSET=0x10000
CONFIG_BOOTFS_OFFSET=0x22000

View File

@@ -4,14 +4,13 @@
* Created on: ATShining
* Author: Administrator
*/
#include "types.h"
#include "assert.h"
#include "mpu.h"
#include <mk_sys.h>
#include <mpu_armv7.h>
#include "thread.h"
#include "task.h"
#if CONFIG_MK_MPU_CFG
static volatile umword_t *MPUCR = (umword_t *)0xE000ED94;
void mpu_init(void)
@@ -65,3 +64,11 @@ void mpu_switch_to(void)
mpu_switch_to_task(tk);
}
#else
void mpu_switch_to(void)
{
}
void mpu_switch_to_task(struct task *tk)
{
}
#endif

View File

@@ -1,7 +1,7 @@
ENTRY(Reset_Handler)
MEMORY
{
RAM (arw) : ORIGIN = 0x20000000, LENGTH = 0x2000000
RAM (arw) : ORIGIN = 0x20000000, LENGTH = 0x100000
FLASH (arx) : ORIGIN = 0x8000000 + 0x2000, LENGTH = 0x10000 - 0x2000
}
SECTIONS

View File

@@ -1,7 +1,7 @@
#!/bin/bash
export TOOLCHAIN=/home/zhangzheng/gcc-arm-none-eabi-5_4-2016q3/bin/
export TOOLCHAIN_LIB=/home/zhangzheng/gcc-arm-none-eabi-5_4-2016q3/lib/gcc/arm-none-eabi/5.4.1/armv7-m
export TOOLCHAIN=/home/zhangzheng/mkrtos-tools/gcc/gcc-arm-none-eabi-5_4-2016q3/bin/
export TOOLCHAIN_LIB=/home/zhangzheng/mkrtos-tools/gcc/gcc-arm-none-eabi-5_4-2016q3/lib/gcc/arm-none-eabi/5.4.1/armv7-m/
# export TOOLCHAIN=/Users/zhangzheng/gcc-arm-none-eabi-10.3-2021.10/bin/
# export TOOLCHAIN_LIB=/Users/zhangzheng/gcc-arm-none-eabi-10.3-2021.10/lib/gcc/arm-none-eabi/10.3.1/thumb/v7-m/nofp
export BOARD=STM32F205

View File

@@ -20,7 +20,7 @@ set(CMAKE_SIZE "${CROSS_COMPILE}size" CACHE PATH "" FORCE)
set(PROJECT_BINARY_DIR ${CMAKE_SOURCE_DIR}/build)
set(BOARD $ENV{BOARD})
include(cmake/top.cmake)
include(mkrtos_cmake/top.cmake)
set(ARCH ${CONFIG_ARCH} CACHE STRING "" FORCE)
message(=======${ARCH})
message(=======${CONFIG_CPU_TYPE})