From 2323298b5735066b8c1dee53f3844319a45c4ac5 Mon Sep 17 00:00:00 2001 From: strahi-linux Date: Mon, 17 Jun 2024 09:01:15 +0200 Subject: [PATCH] Fixed issues with dsPIC and RISCV --- RISCV/gcc_clang/CMakeLists.txt | 2 +- dsPIC/mikroC/cmake/coreUtils.cmake | 13 ------------- dsPIC/mikroC/cmake/dspic/dspic33.cmake | 5 +---- dsPIC/mikroC/cmake/dspic/dspic33e.cmake | 7 +++++++ dsPIC/mikroC/cmake/dspic/pic24.cmake | 5 +---- dsPIC/mikroC/cmake/dspic/pic24e.cmake | 7 +++++++ 6 files changed, 17 insertions(+), 22 deletions(-) create mode 100644 dsPIC/mikroC/cmake/dspic/dspic33e.cmake create mode 100644 dsPIC/mikroC/cmake/dspic/pic24e.cmake diff --git a/RISCV/gcc_clang/CMakeLists.txt b/RISCV/gcc_clang/CMakeLists.txt index 8320f21db..26c9487bf 100644 --- a/RISCV/gcc_clang/CMakeLists.txt +++ b/RISCV/gcc_clang/CMakeLists.txt @@ -70,7 +70,7 @@ install( ${CMAKE_BINARY_DIR}/core_header.h interrupts/include/interrupts.h - interrupts/include/interrupts_mcu/gd32vf103xx/interrupts_mcu.h + interrupts/include/interrupts_mcu/${MCU_NAME_LOWER}/interrupts_mcu.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/core ) diff --git a/dsPIC/mikroC/cmake/coreUtils.cmake b/dsPIC/mikroC/cmake/coreUtils.cmake index d46c1ec82..1f119f18a 100644 --- a/dsPIC/mikroC/cmake/coreUtils.cmake +++ b/dsPIC/mikroC/cmake/coreUtils.cmake @@ -196,16 +196,3 @@ macro(create_core_library) preinit_support(lib_core) endmacro() - -############################################################################# -## Macro to set MCU specific variables -############################################################################# -macro(set_file_list) - if(${MCU_NAME} MATCHES "^dsPIC33(.+)$|^PIC24(.+)$") - if(${MCU_NAME} MATCHES "^dsPIC33E[VP](.+)$|^PIC24E[VP](.+)$") - set(DELAY_SOURCE "delay/dspic_ep/__lib_delays.c") - else() - set(DELAY_SOURCE "delay/dspic/__lib_delays.c") - endif() - endif() -endmacro() diff --git a/dsPIC/mikroC/cmake/dspic/dspic33.cmake b/dsPIC/mikroC/cmake/dspic/dspic33.cmake index 041706ee6..8b01eeb2d 100644 --- a/dsPIC/mikroC/cmake/dspic/dspic33.cmake +++ b/dsPIC/mikroC/cmake/dspic/dspic33.cmake @@ -1,9 +1,6 @@ -include(coreUtils) - -set_file_list() - if(${MCU_NAME} MATCHES "^dsPIC33(.+)$") set(SYSTEM_LIB_SOURCE "system/src/__Lib_System.c") + set(DELAY_SOURCE "delay/dspic/__lib_delays.c") set(SYSTEM_LIB_INCLUDE_DIR "") set(MATH_LIB_SOURCE "math/__Lib_math.c") set(MATH_DOUBLE_SOURCE "math_double/__Lib_MathDouble.c") diff --git a/dsPIC/mikroC/cmake/dspic/dspic33e.cmake b/dsPIC/mikroC/cmake/dspic/dspic33e.cmake new file mode 100644 index 000000000..8d40dd070 --- /dev/null +++ b/dsPIC/mikroC/cmake/dspic/dspic33e.cmake @@ -0,0 +1,7 @@ +if(${MCU_NAME} MATCHES "^dsPIC33(.+)$") + set(SYSTEM_LIB_SOURCE "system/src/__Lib_System.c") + set(DELAY_SOURCE "delay/dspic_ep/__lib_delays.c") + set(SYSTEM_LIB_INCLUDE_DIR "") + set(MATH_LIB_SOURCE "math/__Lib_math.c") + set(MATH_DOUBLE_SOURCE "math_double/__Lib_MathDouble.c") +endif() diff --git a/dsPIC/mikroC/cmake/dspic/pic24.cmake b/dsPIC/mikroC/cmake/dspic/pic24.cmake index d8f919713..e9f0a53cf 100644 --- a/dsPIC/mikroC/cmake/dspic/pic24.cmake +++ b/dsPIC/mikroC/cmake/dspic/pic24.cmake @@ -1,9 +1,6 @@ -include(coreUtils) - -set_file_list() - if(${MCU_NAME} MATCHES "^PIC24(.+)$") set(SYSTEM_LIB_SOURCE "system/src/__Lib_System.c") + set(DELAY_SOURCE "delay/dspic/__lib_delays.c") set(SYSTEM_LIB_INCLUDE_DIR "") set(MATH_LIB_SOURCE "math/__Lib_math.c") set(MATH_DOUBLE_SOURCE "math_double/__Lib_MathDouble.c") diff --git a/dsPIC/mikroC/cmake/dspic/pic24e.cmake b/dsPIC/mikroC/cmake/dspic/pic24e.cmake new file mode 100644 index 000000000..6dc0d691e --- /dev/null +++ b/dsPIC/mikroC/cmake/dspic/pic24e.cmake @@ -0,0 +1,7 @@ +if(${MCU_NAME} MATCHES "^PIC24(.+)$") + set(SYSTEM_LIB_SOURCE "system/src/__Lib_System.c") + set(DELAY_SOURCE "delay/dspic_ep/__lib_delays.c") + set(SYSTEM_LIB_INCLUDE_DIR "") + set(MATH_LIB_SOURCE "math/__Lib_math.c") + set(MATH_DOUBLE_SOURCE "math_double/__Lib_MathDouble.c") +endif()