Skip to content

Commit

Permalink
Update new system kernel arch.
Browse files Browse the repository at this point in the history
  • Loading branch information
At-EC committed Feb 3, 2025
1 parent e67d6b6 commit 0114b8f
Show file tree
Hide file tree
Showing 76 changed files with 55 additions and 75 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ jobs:
matrix:
path:
- check: './include'
exclude: './include/kernel/init.h' # Nothing to exclude
- check: './kernel'
exclude: '' # Nothing to exclude
- check: './clock'
exclude: './include/arch/arch32/' # Nothing to exclude
exclude: './include/init.h' # Nothing to exclude
- check: './source'
exclude: '' # Nothing to exclude
steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ target_sources(atos_kernel
)

include(${CMAKE_CURRENT_LIST_DIR}/include/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/kernel/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/clock/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/port/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/source/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/source/clock/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/source/port/CMakeLists.txt)

if(NOT TARGET atos_config)
message(FATAL_ERROR " atos_config target not specified. Please specify a cmake target that defines the include path for atos_configuration.h\n")
Expand Down
20 changes: 0 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,26 +203,6 @@ int main(void)
OS_THREAD_INIT(static_id, OS_PRIORITY_COOPERATION_SET(2), STACK_SIZE, entry_function);
```

The following kernel H file path must be included in your project workshop.

```shell
<root path>\
<root path>\include\
<root path>\include\kernel\
```
The following kernel C file should be placed in your project workshop based on your chip feature and compiler.

```shell
<root path>\kernel\<all of them>.c
<root path>\clock\clock_systick.c
<root path>\port\port_common.c
<root path>\port\<your compiler>.c
```

## Roadmap

The At-EC road-map documentation is not ready. The At-RTOS is a beginning and basic component and will be an important member of the At-EC family.

## Contribution

The contributing documentation is not ready, You can check the open issue right now that we're developing.
Expand Down
6 changes: 3 additions & 3 deletions build_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
extern "C" {
#endif

#define ATOS_BUILD_TIME "2025-02-01,11:32"
#define ATOS_COMMIT_HEAD_ID "ee4223b81fddf0ea5f2520f2adcfc2247091b865"
#define ATOS_BUILD_TIME "2025-02-03,14:12"
#define ATOS_COMMIT_HEAD_ID "e67d6b6d5955a438a676872675d7cbc0cbb5df19"
#define ATOS_VERSION_MAJOR_NUMBER (2u)
#define ATOS_VERSION_MINOR_NUMBER (0u)
#define ATOS_VERSION_PATCH_NUMBER (10u)
#define ATOS_VERSION_PATCH_NUMBER (11u)

#define ATOS_VERSION_MAJOR_NUMBER_MASK (0x03FFu)
#define ATOS_VERSION_MAJOR_NUMBER_POS (22u)
Expand Down
34 changes: 19 additions & 15 deletions include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
add_library(kernel_include INTERFACE)

include_directories(${KERNEL_PATH}/include)
include_directories(${KERNEL_PATH}/include/kernel)
include_directories(${KERNEL_PATH}/include/arch)
include_directories(${KERNEL_PATH}/include/clock)
include_directories(${KERNEL_PATH}/include/port)

target_sources(kernel_include
PUBLIC
${KERNEL_PATH}/include/arch.h

${KERNEL_PATH}/include/kernel/at_rtos.h
${KERNEL_PATH}/include/kernel/compiler.h
${KERNEL_PATH}/include/kernel/configuration.h
${KERNEL_PATH}/include/kernel/kernel.h
${KERNEL_PATH}/include/kernel/linker.h
${KERNEL_PATH}/include/kernel/kstruct.h
${KERNEL_PATH}/include/kernel/postcode.h
${KERNEL_PATH}/include/kernel/timer.h
${KERNEL_PATH}/include/kernel/trace.h
${KERNEL_PATH}/include/kernel/type_def.h
${KERNEL_PATH}/include/kernel/ktype.h
${KERNEL_PATH}/include/kernel/init.h
${KERNEL_PATH}/include/arch/arch.h
${KERNEL_PATH}/include/clock/clock_tick.h
${KERNEL_PATH}/include/port/port.h

${KERNEL_PATH}/include/at_rtos.h
${KERNEL_PATH}/include/compiler.h
${KERNEL_PATH}/include/configuration.h
${KERNEL_PATH}/include/kernel.h
${KERNEL_PATH}/include/linker.h
${KERNEL_PATH}/include/kstruct.h
${KERNEL_PATH}/include/postcode.h
${KERNEL_PATH}/include/timer.h
${KERNEL_PATH}/include/trace.h
${KERNEL_PATH}/include/type_def.h
${KERNEL_PATH}/include/ktype.h
${KERNEL_PATH}/include/init.h
)
File renamed without changes.
14 changes: 7 additions & 7 deletions include/arch.h → include/arch/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,25 +90,25 @@ typedef enum IRQn {
#endif

#if defined(ARCH_ARM_CORTEX_CM0)
#include "../arch/arch32/arm/cmsis/include/core_cm0.h"
#include "./arch/arch32/arm/cmsis/include/core_cm0.h"

#elif defined(ARCH_ARM_CORTEX_CM0plus)
#include "../arch/arch32/arm/cmsis/include/core_cm0plus.h"
#include "./arch/arch32/arm/cmsis/include/core_cm0plus.h"

#elif defined(ARCH_ARM_CORTEX_CM3)
#include "../arch/arch32/arm/cmsis/include/core_cm3.h"
#include "./arch/arch32/arm/cmsis/include/core_cm3.h"

#elif defined(ARCH_ARM_CORTEX_CM4)
#include "../arch/arch32/arm/cmsis/include/core_cm4.h"
#include "./arch/arch32/arm/cmsis/include/core_cm4.h"

#elif defined(ARCH_ARM_CORTEX_CM23)
#include "../arch/arch32/arm/cmsis/include/core_cm23.h"
#include "./arch/arch32/arm/cmsis/include/core_cm23.h"

#elif defined(ARCH_ARM_CORTEX_CM33)
#include "../arch/arch32/arm/cmsis/include/core_cm33.h"
#include "./arch/arch32/arm/cmsis/include/core_cm33.h"

#elif defined ARCH_ARM_CORTEX_CM7
#include "../arch/arch32/arm/cmsis/include/core_cm7.h"
#include "./arch/arch32/arm/cmsis/include/core_cm7.h"

#elif defined ARCH_NATIVE_GCC
// Nothing to do
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions include/kernel/at_rtos.h → include/at_rtos.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#ifndef _AT_RTOS_H_
#define _AT_RTOS_H_

#define AT_RTOS_TYPE_API_DEFINE

#include "ktype.h"
#include "kstruct.h"
#include "configuration.h"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion include/kernel/compiler.h → include/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define _COMPILER_H_

#if !defined(ARCH_NATIVE_GCC)
#include "../arch/arch32/arm/cmsis/include/cmsis_compiler.h"
#include "./arch/arch32/arm/cmsis/include/cmsis_compiler.h"
#endif

#endif /* _COMPILER_H_ */
2 changes: 1 addition & 1 deletion include/kernel/configuration.h → include/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define _CONFIGURATION_H_

#include "atos_configuration.h"
#include "build_version.h"
#include "../build_version.h"

#ifndef THREAD_RUNTIME_NUMBER_SUPPORTED
#define THREAD_RUNTIME_NUMBER_SUPPORTED (1u)
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions include/kernel/kernel.h → include/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
#ifndef _KERNEL_H_
#define _KERNEL_H_

#include "./arch/arch.h"
#include "./port/port.h"
#include "./clock/clock_tick.h"
#include "kstruct.h"
#include "arch.h"
#include "ktype.h"
#include "port.h"

#ifndef KERNEL_THREAD_STACK_SIZE
#define KERNEL_SCHEDULE_THREAD_STACK_SIZE (1024u)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion include/port.h → include/port/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define _PORT_H_

#include "type_def.h"
#include "arch.h"
#include "./arch/arch.h"

#define STACT_UNUSED_DATA (0xDEu)
#define STACT_UNUSED_FRAME_MARK (0xDEDEDEDEu)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "At-RTOS",
"homepage": "https://github.com/At-EC/At-RTOS",
"version": "2.0.10",
"timestamp": "2025-02-01,11:32",
"commit_id": "63252f7f41b13855be4b71aaacb392da700d92cd"
"version": "2.0.11",
"timestamp": "2025-02-03,14:12",
"commit_id": "e67d6b6d5955a438a676872675d7cbc0cbb5df19"
}
File renamed without changes.
2 changes: 1 addition & 1 deletion clock/CMakeLists.txt → source/clock/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include_directories(${KERNEL_PATH}/include)

target_sources(atos_kernel
PUBLIC
${KERNEL_PATH}/include/clock_tick.h
${KERNEL_PATH}/include/clock/clock_tick.h

PRIVATE
${CMAKE_CURRENT_LIST_DIR}/clock_native_gcc.c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
**/
#include "clock_tick.h"
#include "./clock/clock_tick.h"
#include "configuration.h"

/**
Expand Down
6 changes: 3 additions & 3 deletions clock/clock_systick.c → source/clock/clock_systick.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
**/
#include "clock_tick.h"
#include "./arch/arch.h"
#include "./port/port.h"
#include "./clock/clock_tick.h"
#include "configuration.h"
#include "arch.h"
#include "port.h"
#include "ktype.h"

/* Convert the microsecond to clock count */
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion kernel/kernel.c → source/kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "kernel.h"
#include "timer.h"
#include "compiler.h"
#include "clock_tick.h"
#include "ktype.h"
#include "postcode.h"
#include "trace.h"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion port/CMakeLists.txt → source/port/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include_directories(${KERNEL_PATH}/include)

target_sources(atos_kernel
PUBLIC
${KERNEL_PATH}/include/port.h
${KERNEL_PATH}/include/port/port.h

PRIVATE
${CMAKE_CURRENT_LIST_DIR}/port_native_gcc.c
Expand Down
4 changes: 2 additions & 2 deletions port/port_common.c → source/port/port_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
**/
#include "./port/port.h"
#include "./clock/clock_tick.h"
#include "linker.h"
#include "clock_tick.h"
#include "port.h"

/**
* @brief ARM core systick interrupt handle function.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion port/port_keil_ac5.c → source/port/port_keil_ac5.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
**/
#include "port.h"
#include "./port/port.h"

#if defined ( __FPU_PRESENT )
#define FPU_ENABLED __FPU_PRESENT
Expand Down
2 changes: 1 addition & 1 deletion port/port_keil_ac6.c → source/port/port_keil_ac6.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
**/
#include "port.h"
#include "./port/port.h"

#if defined ( __FPU_PRESENT )
#define FPU_ENABLED __FPU_PRESENT
Expand Down
2 changes: 1 addition & 1 deletion port/port_native_gcc.c → source/port/port_native_gcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
**/
#include "./arch/arch.h"
#include "type_def.h"
#include "arch.h"

/**
* @brief ARM core trigger the svc call interrupt.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion kernel/timer.c → source/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
**/
#include "kernel.h"
#include "clock_tick.h"
#include "timer.h"
#include "postcode.h"
#include "trace.h"
Expand Down
File renamed without changes.

0 comments on commit 0114b8f

Please sign in to comment.