Repository navigation
feat(nxp/pxp): add Zephyr Support - #6298
Conversation
| NVIC_SetPriority(PXP_IRQ_ID, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 1); | ||
| NVIC_EnableIRQ(PXP_IRQ_ID); | ||
| #elif defined(__ZEPHYR__) | ||
| IRQ_CONNECT(DT_IRQN(DT_NODELABEL(pxp)), CONFIG_LV_Z_PXP_INTERRUPT_PRIORITY, PXP_ZephyrIRQHandler, NULL, 0); |
There was a problem hiding this comment.
I understand now, you included the ZEPHYR header just for this CONFIG_LV_Z_PXP_INTERRUPT_PRIORITY.
We should not mix any longer this with lv_osal support.
There was a problem hiding this comment.
The includes are needed for the entire interrupt logic (retrieving nodes from DT, hooking up the IRQ).
I have a problem with the code above. It is not exactly OSAL as it claims and it also breaks our build. There has to be a better way |
Yeah, these includes are needed for the interrupts. Personally I think that an OSAL is maybe not the right place for an abstraction for this, the OSAL should be kept as thin as possible. Maybe it would be an option somehow provide the user a way to give LVGL a |
Add semaphore and connect IRQ. Originally proposed by @0xFarahFl.
e339205 to
cb4c167
Compare
|
We got a lot request about updating Zephyr to LVGL v9 so I wonder if we can help to make it happen soon. @becseya is interested in Zephyr, so he can help with LVGL related issues. We also have several NXP boards so we can help with PXP as well. |
0f12024 to
083a95b
Compare
Please add |
|
The function var had to be renamed to |
Which one? 🙂 |
|
The last version of these patches fix the build regression I was looking at (PXP = 1 , OS_NONE on MCUXpresso SDK projects that always define SDK_OS_FREE_RTOS). There are other improvements that could be made but they can be addressed later. |
|
Please add |
3ac2d39 to
7ac33bc
Compare
| **********************/ | ||
|
|
||
| void PXP_IRQHandler(void) | ||
| #if defined(__ZEPHYR__) |
There was a problem hiding this comment.
Please do not remove the PXP_IRQHandler(). @faxe1008
There was a problem hiding this comment.
Within LVGL this is not used outside of the osa file - is this something that needs to be callable from the outside?
There was a problem hiding this comment.
PXP_IRQHandler() is what the name suggest - the handler of the PXP IRQ.
It is similar to what you already added PXP_ZephyrIRQHandler except that in case of our platform (w/ or w/o FreeRTOS) the PXP handler is mapped in the vector table outside of the lvgl code.
There was a problem hiding this comment.
Okay, so that function is called from outside? I wasn't clear on that.
Even though it wasn't perfect, I approved yesterday because it was harmless and close enough. But the naming is still confusing because PXP_IRQHandler is actually called from outside and the name is important, because it maps to something in the symbol table as you say, while PXP_ZephyrIRQHandler is not special yet has a name that makes it seem like it maps to something in the symbol table.
There was a problem hiding this comment.
In this case we can rename the PXP_ZephyrIRQHandler as this is a static function.
But PXP_IRQHandler need to stay in place with exactly the same name.
Thanks.
There was a problem hiding this comment.
Reverted this part of the change moved the zephyr handler to the static section.
Changes the PXP osal to use the thread_sync to signal PXP readyness from the ISR.
| @@ -112,24 +114,45 @@ pxp_cfg_t * pxp_get_default_cfg(void) | |||
| * STATIC FUNCTIONS | |||
| **********************/ | |||
|
|
|||
There was a problem hiding this comment.
Why do you ever need the static _pxp_zephyr_irq_handler? You can use directly PXP_IRQHandler() for zephyr as well.
There was a problem hiding this comment.
I can not use it, the IRQ_CONNECT macro needs a function with a (void)(void*) signature:
https://docs.zephyrproject.org/apidoc/latest/group__isr__apis.html#ga131739d1faf501a15590053817aba984
|
We need some feedback on this pull request. Now we mark this as "stale" because there was no activity here for 14 days. Remove the "stale" label or comment else this will be closed in 7 days. |
|
Hi, What is missing to finalize this PR and for LVGL v9 Zephyr support in general? I'd like to be sure all are added before releasing v9.2. |
|
@kisvegabor at least from my side there are no more blockers to this PR. I guess some testing from the other RTOSes might be helpful to avoid regressions. As for the requirements of updating zephyr to v9.2 the only thing left for me is to figure out what to do about STM32 DMA2D support, as we have added it in 8.4 but I am unsure if it can be used in 9.1. |
|
I have already approved, no more issues from my side. |
|
Great! Is the missing DMA2D is blocking to have LVGL v9.2 in Zephyr? We got closer to ST, so now we can add DMA2D support but it might take some time. |
People using the new version on STM32 boards will experience a performance hit, but imo that should be accetable to some degree. Btw. I started drafting this implementation over here: |
|
@liamHowatt is also looking into it now. I'd like to have at least something basic in v9.2. |

Description of the feature or fix
Reopening of #6159 since it got merged and reverted the original PR does not track changes anymore (@nicusorcitu ).
Notes
lv_conf_template.hrun lv_conf_internal_gen.py and update Kconfig.scripts/code-format.py(astyle version v3.4.12 needs to be installed) and follow the Code Conventions.