Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed when enabled USE_FREERTOS #70

Open
CodingPapi opened this issue Dec 16, 2024 · 5 comments
Open

Build failed when enabled USE_FREERTOS #70

CodingPapi opened this issue Dec 16, 2024 · 5 comments

Comments

@CodingPapi
Copy link

Hi,
When I disable USE_FREERTOS, every thing goes fine.
After enable this option and set LV_USE_OS to LV_OS_FREERTOS, build failed and shows:

/usr/bin/ld: cannot find -lFreeRTOS: No such file or directory

My environment:
Ubuntu
gcc and clang, ld and lld both failed
@MootSeeker could you plz help to check this issue?

@CodingPapi
Copy link
Author

#62 (comment)

Others also report this issue

@BKDeepak-Microair
Copy link

Same issue here.

@unrecyclable
Copy link

unrecyclable commented Dec 20, 2024

I have the same issue and I have a clue.
"cannot find -lFreeRTOS" means that you try to link a library name "FreeRTOS" with current target, but there is no such library.

In /lv_port_pc_vscode-master/CMakeLists.txt 85: target_link_libraries(main freertos_config FreeRTOS)
this sentence cause try to link FreeRTOS and cause a problem, because there is no such lib named "FreeRTOS". This lib should be generate by user self, but this project have no code to generate such lib.

In fact, you can “#” the whole line. I don't really know why but it not affect the build process.

Then try to build. You may find that there is a issue. It failed and shows: /lvgl/src/osal/lv_freertos.c:265 undefined reference to "xTaskGenericNotify"

Find /lv_port_pc_vscode-master/config/FreeRTOSConfig.h :37 #define configUSE_TASK_NOTIFICATIONS 0
change it to 1 like this #define configUSE_TASK_NOTIFICATIONS 1

Now it can generate target, but I meet a new issue:
When I try to run it, it doesn't works. And debug shows that it stop at /FreeRTOS/task.c :7867 ucOriginalNotifystate = pxTCB->ucNotifyState[ uxIndexToNotify]; with a "Segmentation fault".And this line in the fanction xTaskGenericNotify

I can't deal this new issue, maybe I will open a comment later.

@uLipe
Copy link

uLipe commented Jan 16, 2025

Folks to enable the FreeRTOS to be used you need to enable it on the lv_conf.h but you need also to enable its linking on the CMakeLists, just set to ON this option:

https://github.com/lvgl/lv_port_pc_vscode/blob/3defb84ea5c107bedbc1c9c2222355f2fcf7330d/CMakeLists.txt#L9C1-L9C77

@psanyi
Copy link

psanyi commented Jan 22, 2025

I have the same issue and I have a clue. "cannot find -lFreeRTOS" means that you try to link a library name "FreeRTOS" with current target, but there is no such library.

In /lv_port_pc_vscode-master/CMakeLists.txt 85: target_link_libraries(main freertos_config FreeRTOS) this sentence cause try to link FreeRTOS and cause a problem, because there is no such lib named "FreeRTOS". This lib should be generate by user self, but this project have no code to generate such lib.

In fact, you can “#” the whole line. I don't really know why but it not affect the build process.

Then try to build. You may find that there is a issue. It failed and shows: /lvgl/src/osal/lv_freertos.c:265 undefined reference to "xTaskGenericNotify"

Find /lv_port_pc_vscode-master/config/FreeRTOSConfig.h :37 #define configUSE_TASK_NOTIFICATIONS 0 change it to 1 like this #define configUSE_TASK_NOTIFICATIONS 1

Now it can generate target, but I meet a new issue: When I try to run it, it doesn't works. And debug shows that it stop at /FreeRTOS/task.c :7867 ucOriginalNotifystate = pxTCB->ucNotifyState[ uxIndexToNotify]; with a "Segmentation fault".And this line in the fanction xTaskGenericNotify

I can't deal this new issue, maybe I will open a comment later.

I fixed this issue. I have created a pull request. It works on Ubuntu 24.10.
#73 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants