-
Notifications
You must be signed in to change notification settings - Fork 134
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
RT700 update #444
base: master
Are you sure you want to change the base?
RT700 update #444
Conversation
lucien-nxp
commented
Oct 3, 2024
- add RT700 sdk files
- add RT700 pin header files
# driver_dsp | ||
config MCUX_USE_driver_dsp | ||
bool "dsp Driver" | ||
select MCUX_USE_driver_power |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we include the fsl_power
for the DSP?
The driver has a lot of ARM specific registers or functions.
When compiling for HiFi4 I get:
In file included from /opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c:8:
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.h: In function 'POWER_EnableDeepSleep':
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.h:735:5: error: 'SCB' undeclared (first use in this function)
735 | SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
| ^~~
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.h:735:5: note: each undeclared identifier is reported only once for each function it appears in
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.h:735:17: error: 'SCB_SCR_SLEEPDEEP_Msk' undeclared (first use in this function)
735 | SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
| ^~~~~~~~~~~~~~~~~~~~~
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.h: In function 'POWER_DisableDeepSleep':
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.h:743:5: error: 'SCB' undeclared (first use in this function)
743 | SCB->SCR &= ~SCB_SCR_SLEEPDEEP_Msk;
| ^~~
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.h:743:18: error: 'SCB_SCR_SLEEPDEEP_Msk' undeclared (first use in this function)
743 | SCB->SCR &= ~SCB_SCR_SLEEPDEEP_Msk;
| ^~~~~~~~~~~~~~~~~~~~~
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c: In function 'POWER_SetPmicMode':
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c:226:5: warning: implicit declaration of function '__disable_irq'; did you mean 'DisableIRQ'? [-Wimplicit-function-declaration]
226 | __disable_irq();
| ^~~~~~~~~~~~~
| DisableIRQ
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c:231:5: warning: implicit declaration of function '__enable_irq' [-Wimplicit-function-declaration]
231 | __enable_irq();
| ^~~~~~~~~~~~
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c: In function 'POWER_EnterSleep':
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c:385:12: warning: implicit declaration of function '__get_PRIMASK' [-Wimplicit-function-declaration]
385 | pmsk = __get_PRIMASK();
| ^~~~~~~~~~~~~
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c:387:5: error: 'SCB' undeclared (first use in this function)
387 | SCB->SCR &= ~SCB_SCR_SLEEPDEEP_Msk;
| ^~~
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c:387:18: error: 'SCB_SCR_SLEEPDEEP_Msk' undeclared (first use in this function)
387 | SCB->SCR &= ~SCB_SCR_SLEEPDEEP_Msk;
| ^~~~~~~~~~~~~~~~~~~~~
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c:388:5: warning: implicit declaration of function '__WFI' [-Wimplicit-function-declaration]
388 | __WFI();
| ^~~~~
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c:389:5: warning: implicit declaration of function '__set_PRIMASK' [-Wimplicit-function-declaration]
389 | __set_PRIMASK(pmsk);
| ^~~~~~~~~~~~~
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c: In function 'POWER_EnableAutoWake':
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c:396:24: error: 'PMC_IRQn' undeclared (first use in this function); did you mean 'PMC0_IRQn'?
396 | EnableDeepSleepIRQ(PMC_IRQn);
| ^~~~~~~~
| PMC0_IRQn
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c: In function 'initXSPI':
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c:822:5: warning: implicit declaration of function '__DSB' [-Wimplicit-function-declaration]
822 | __DSB();
| ^~~~~
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c:823:5: warning: implicit declaration of function '__ISB' [-Wimplicit-function-declaration]
823 | __ISB();
| ^~~~~
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c: In function 'POWER_EnterLowPower_FullConfig':
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c:988:5: error: 'SCB' undeclared (first use in this function)
988 | SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
| ^~~
/opt/samba/nxa06898/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT798S/drivers/fsl_power.c:988:17: error: 'SCB_SCR_SLEEPDEEP_Msk' undeclared (first use in this function)
988 | SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
| ^~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
If I want to overpass this I need to put a lot of ifdef in the fsl_power.h
and fsl_power.c
Can we have a power driver just for DSP?
How do you see these errors fixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucien-nxp can you please add the following restriction for fsl_power.c
?
diff --git a/mcux/CMakeLists.txt b/mcux/CMakeLists.txt
index 94de25cb..bf627074 100644
--- a/mcux/CMakeLists.txt
+++ b/mcux/CMakeLists.txt
@@ -48,7 +48,10 @@ zephyr_compile_definitions(${MCUX_CPU})
# build scripts for every mcux device.
zephyr_library_sources(mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers/fsl_clock.c)
if (${MCUX_DEVICE} MATCHES "LPC|MIMXRT6|MIMXRT5|MIMXRT7|RW6|MCXN.4.")
- zephyr_library_sources(mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers/fsl_power.c)
+ # fsl_power.c contains ARM specific symbols, which shouldn't be included for Xtensa cores
+ if (NOT ${MCUX_DEVICE} MATCHES "_dsp|_hifi1|_hifi4")
+ zephyr_library_sources(mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers/fsl_power.c)
+ endif()
zephyr_library_sources(mcux-sdk/devices/${MCUX_DEVICE_PATH}/drivers/fsl_reset.c)
zephyr_library_sources_ifdef(CONFIG_HWINFO_RW61X mcux-sdk/devices/${MCUX_DEVICE}/drivers/fsl_ocotp.c)
endif()
This will fix the compilation for HiFi1 and HiFi4 on i.MXRT700.
I want to use this PR in west.yml
for nxp_hal
, for DSP support - which will be posted on Zephyr repo in the next few days.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for pointing the solutions. Sorry I ignored HIFI core support before, I have updated the code.
c9a35ae
to
2ba2f19
Compare
2ba2f19
to
e9d5cfe
Compare
Only rebase to master's newest commit point. |
e9d5cfe
to
9e0921b
Compare
Use device_system_MIMXRT798S_cm33_core0/device_system_MIMXRT798S_cm33_core1 to distinguish two different cm33 cores. |
@lucien-nxp can you please rebase this on top of latest nxp_hal, because now on my Zephyr PR a test is falling because in nxp_hal is missing the following commit: 683c007, actually in this PR is missing that commit (becase my PR uses this as hal_nxp version). In my PR the failing test is: cc: @dleach02 @Dat-NguyenDuy @mmahadevan108 @manuargue @tunguyen4585 |
add RT700 files from sdk github main branch Signed-off-by: Lucien Zhao <[email protected]>
update script to adapt RT700 generate rt700 pin header files Signed-off-by: Lucien Zhao <[email protected]>
9e0921b
to
d6d6aaa
Compare
Updated. Please rebase your PR on zephyr side and re-test on CI |