eclipse-threadx / threadx

Eclipse ThreadX is an advanced real-time operating system (RTOS) designed specifically for deeply embedded applications.
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/threadx/index.md
MIT License
2.89k stars 782 forks source link

Why is the file tx_initialize_low_level.S part of the port in case of cortex_m33 and doesn't have the possibility to change the SYSTEM_CLOCK? #392

Open Vinzenz82 opened 4 months ago

Vinzenz82 commented 4 months ago

Describe the bug I use ThreadX on a system with cortex_m33 core with proposed CMAKE construct to compile ThreadX into a lib. But confusingly the file tx_initialize_low_level.S with some fixed values like SYSTEM_CLOCK is a part of the port. If I have different clock settings I don't see any possibility to use the lib straight forward without touching it. On another system with cortex_m0 the file tx_initialize_low_level.S is NOT a part of the port and it can easily compiled with the project related code files. After some research I'm confused because at some ports the file is included (e.g. cortex_m33, cortex_m23, cortex_m55) and at some ports not (cortex_m0, cortex_m4, cortex_m7). Maybe I don't get it but why is this difference? Would it be possible to use a CMAKE var to allow a user customized version of the file?

Please also mention any information which could help others to understand the problem you're facing:

HosseinSagha commented 2 months ago

I've got the same problem. It must be moved to the example folder like the other targets, because it's just an exmaple. there is no other way. btw, "{CMAKE_CURRENT_LIST_DIR}/src/tx_thread_secure_stack_initialize.S" is not in the list of target sources and compilation failes.

Vinzenz82 commented 2 months ago

I've got the same problem. It must be moved to the example folder like the other targets, because it's just an example. there is no other way. btw, "{CMAKE_CURRENT_LIST_DIR}/src/tx_thread_secure_stack_initialize.S" is not in the list of target sources and compilation failes.

Thanks for comment. Just a small correction; the problem is that for some ports the file is included in the CMAKE file (like: ports/cortex_m33/gnu/CMakeLists.txt) and then you are fixed to the settings inside the file and your fix/workaround is not usable unfortunately.

HosseinSagha commented 2 months ago

You can fork it and modify the cmake file. that's the only solution for now. That's what I did.