Skip to content

Commit

Permalink
Really Tired Of thiS
Browse files Browse the repository at this point in the history
- Moved assembly file to RTOS platform folder
- Deleted timebase source.c file(will most likely cause issues)
  • Loading branch information
DiegoLHendrix committed Jul 20, 2024
1 parent 5bc935d commit 1833f04
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 952 deletions.
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ include(CMakeDependentOption)
include(${CMAKE_CURRENT_LIST_DIR}/cmake/evt-core_compiler.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cmake/evt-core_install.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cmake/evt-core_clang-format.cmake)
#include(${CMAKE_SOURCE_DIR}/libs/threadx/cmake/cortex_m4.cmake)

###############################################################################
# Project Setup
###############################################################################
file(STRINGS version.txt EVT_VERSION)

project(EVT
VERSION ${EVT_VERSION}
LANGUAGES CXX C
LANGUAGES CXX C ASM
)

add_library(${PROJECT_NAME} STATIC)
Expand Down Expand Up @@ -73,7 +73,9 @@ elseif(COMPDEFS MATCHES "(.*)STM32F4xx(.*)")
src/io/platform/f4xx/UARTf4xx.cpp
src/io/platform/f4xx/SPIf4xx.cpp
src/dev/platform/f4xx/IWDGf4xx.cpp
src/dev/platform/f4xx/RTCf4xx.cpp)
src/dev/platform/f4xx/RTCf4xx.cpp
src/RTOS/f4xx/tx_initialize_low_level.s)

else()
message(FATAL_ERROR "the HAL didnt compile in top level CMake")
endif()
Expand Down Expand Up @@ -111,6 +113,9 @@ target_link_libraries(${PROJECT_NAME} PUBLIC canopen-stack)

set(THREADX_ARCH "cortex_m4")
set(THREADX_TOOLCHAIN "gnu")
set(MCPU_FLAGS "-mthumb -mcpu=cortex-m4")
set(VFP_FLAGS "")
set(SPEC_FLAGS "--specs=nosys.specs")

add_subdirectory(libs/threadx)
#install(TARGETS threadx EXPORT threadx-config)
Expand Down
3 changes: 3 additions & 0 deletions cmake/evt-core_compiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ set(CMAKE_C_FLAGS "${EVT_COMMON_FLAGS} \
set(CMAKE_CXX_FLAGS "${EVT_COMMON_FLAGS} \
-fno-rtti -Wvla")

set(CMAKE_ASM_FLAGS "-mthumb -mcpu=cortex-m4 \
-x assembler-with-cpp")

if(TARGET_DEV STREQUAL "STM32F302x8")
set(CMAKE_EXE_LINKER_FLAGS "-T ${EVT_CORE_DIR}/libs/HALf3/STM32F302C8Tx_FLASH.ld")
elseif(TARGET_DEV STREQUAL "STM32F334x8")
Expand Down
2 changes: 1 addition & 1 deletion samples/RTOS/Basic-Test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include(../../../cmake/evt-core_build.cmake)

set(SAMPLE_SOURCES main.cpp tx_initialize_low_level.s)
set(SAMPLE_SOURCES main.cpp)
make_exe(Basic-Test "${SAMPLE_SOURCES}")
3 changes: 0 additions & 3 deletions samples/RTOS/Basic-Test/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
#include <EVT/manager.hpp>
#include <EVT/dev/LED.hpp>
#include <EVT/io/GPIO.hpp>
#include <EVT/io/pin.hpp>
#include <EVT/manager.hpp>
#include <EVT/utils/time.hpp>

///Namespaces
namespace IO = EVT::core::IO;
Expand Down
137 changes: 0 additions & 137 deletions samples/RTOS/Basic-Test/stm32f4xx_hal_timebase_tim.c

This file was deleted.

2 changes: 1 addition & 1 deletion samples/RTOS/Dynamic-Threads/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include(../../../cmake/evt-core_build.cmake)

set(SAMPLE_SOURCES main.cpp tx_initialize_low_level.s)
set(SAMPLE_SOURCES main.cpp)
make_exe(Dynamic-Threads "${SAMPLE_SOURCES}")
13 changes: 0 additions & 13 deletions samples/RTOS/Dynamic-Threads/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
#include <EVT/manager.hpp>
#include <EVT/dev/LED.hpp>
#include <EVT/io/GPIO.hpp>
#include <EVT/io/pin.hpp>
#include <EVT/manager.hpp>
#include <EVT/utils/time.hpp>
#include <stdio.h>

///Namespaces
namespace IO = EVT::core::IO;
Expand Down Expand Up @@ -44,15 +40,6 @@ typedef void (*EntryFunction)(ULONG thread_input);

ThreadData dataArray[ThreadNum+1];

/**
* have a ptr to a threads data
* get index for thread1
* get its ptr
* pass it into the array
* inside thread take input param
* pass it into ThreadData
**/

void ThreadCreator(TX_BYTE_POOL* byte_pool, TX_THREAD* thread, EntryFunction thread_entry, ULONG thread_input) {
IO::UART& uart = IO::getUART<IO::Pin::UART_TX, IO::Pin::UART_RX>(9600);
char* pointer = static_cast<char*>(TX_NULL);
Expand Down
137 changes: 0 additions & 137 deletions samples/RTOS/Dynamic-Threads/stm32f4xx_hal_timebase_tim.c

This file was deleted.

Loading

0 comments on commit 1833f04

Please sign in to comment.