Zephyr:Booting DSP from MCU in Zephyr

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Zephyr:Booting DSP from MCU in Zephyr

312 次查看
jingqi
Contributor I

Hello, I am currently working on a project using the RT595 with the Zephyr RTOS, and I want to know how to start the DSP from the MCU. According to section 4.7 of the official documentation (IMXRT595-EVK-UG), by setting DSP_IMAGE_COPY_TO_RAM=1in the IDE, it is possible to achieve "program once, and the ARM core automatically wakes up the DSP". Now that the project has fully transitioned to the Zephyr build system, I would like to know the specific steps to launch the DSP application and how it should be configured. Thank you for your help.

标签 (1)
标记 (1)
0 项奖励
回复
1 回复

275 次查看
Sam_Gao
NXP Employee
NXP Employee

@jingqi 

General Steps:

To launch the DSP from the MCU in a Zephyr project, you should first build the DSP binary with Xtensa Xplorer, then integrate that binary into your Zephyr build via CMake, and finally call the BOARD_DSP_Init() function from your application to handle the startup sequence.

 

You need to complete the functionality using the official documentation (MCUXpresso + EVK) and you need to have the ability to develop Zephry before you can complete the migration.

 

Refernce:

1. Build the DSP Firmware: Getting Started with Xplorer for EVK-
MIMXRT595 Typically, you will get two output files, such as dsp_text_release.bin and dsp_data_release.bin. These are the firmware images that the Cortex-M33 core will load into the DSP's RAM

2. Integrate the DSP Binary into the Zephyr Build: 
the Zephyr build system requires you to explicitly include these binary files in your Cortex-M33 application. You can do this by modifying the CMakeLists.txt file for your Zephyr application. You may need to use Zephyr's build system features (like zephyr_file_copy or by defining them as a binary blob) to place the files in a known location in the final firmware image.

3. The MCUXpresso SDK for the i.MX RT595 provides a driver ( fsl_dsp.c / .h ) to manage the DSP lifecycle. Zephyr for NXP devices includes this SDK, so you can call these functions directly from your Zephyr application code. Details can be found from '3.3 DSP Core Initialization' of Getting Started with Xplorer for EVK-
MIMXRT595

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2253000%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EZephyr%EF%BC%9A%E5%9C%A8%20Zephyr%20%E4%B8%AD%E4%BB%8E%20MCU%20%E5%BC%95%E5%AF%BC%20DSP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2253000%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%EF%BC%8C%E6%88%91%E7%9B%AE%E5%89%8D%E6%AD%A3%E5%9C%A8%E5%BC%80%E5%8F%91%E4%B8%80%E4%B8%AA%E4%BD%BF%E7%94%A8%20RT595%20%E5%92%8C%20Zephyr%20%E5%AE%9E%E6%97%B6%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84%E9%A1%B9%E7%9B%AE%EF%BC%8C%E6%88%91%E6%83%B3%E7%9F%A5%E9%81%93%E5%A6%82%E4%BD%95%E4%BB%8E%20MCU%20%E5%90%AF%E5%8A%A8%20DSP%E3%80%82%E6%A0%B9%E6%8D%AE%E5%AE%98%E6%96%B9%E6%96%87%E6%A1%A3%20(IMXRT595-EVK-UG)%20%E7%AC%AC%204.7%20%E8%8A%82%EF%BC%8C%E9%80%9A%E8%BF%87%E5%9C%A8%20IDE%20%E4%B8%AD%E8%AE%BE%E7%BD%AE%20dsp_image_copy_to_ram%3D1%EF%BC%8C%E5%8F%AF%E4%BB%A5%E5%AE%9E%E7%8E%B0%20%22%20%E7%A8%8B%E5%BA%8F%E4%B8%80%E6%AC%A1%EF%BC%8CARM%20%E5%86%85%E6%A0%B8%E4%BC%9A%E8%87%AA%E5%8A%A8%E5%94%A4%E9%86%92%20DSP%20%22%E3%80%82%E7%8E%B0%E5%9C%A8%E8%AF%A5%E9%A1%B9%E7%9B%AE%E5%B7%B2%E5%AE%8C%E5%85%A8%E8%BF%87%E6%B8%A1%E5%88%B0Zephyr%E7%89%88%E6%9C%AC%E7%B3%BB%E7%BB%9F%EF%BC%8C%E6%88%91%E6%83%B3%E7%9F%A5%E9%81%93%E7%94%A8%E4%B8%8A%E5%B8%82DSP%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E7%9A%84%E5%85%B7%E4%BD%93%E6%AD%A5%E9%AA%A4%E4%BB%A5%E5%8F%8A%E5%BA%94%E5%A6%82%E4%BD%95%E5%AF%B9%E5%85%B6%E8%BF%9B%E8%A1%8C%E9%85%8D%E7%BD%AE%E3%80%82%E6%84%9F%E8%B0%A2%E6%82%A8%E7%9A%84%E5%B8%AE%E5%8A%A9%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2253000%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3E%E8%AF%84%E4%BC%B0%E6%9D%BF%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2253654%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Zephyr%EF%BC%9ABooting%20DSP%20from%20MCU%20in%20Zephyr%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2253654%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F257540%22%20target%3D%22_blank%22%3E%40jingqi%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%E4%B8%80%E8%88%AC%E6%AD%A5%E9%AA%A4%EF%BC%9A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%E8%A6%81%E5%9C%A8%20Zephyr%20%E9%A1%B9%E7%9B%AE%E4%B8%AD%E4%BB%8E%20MCU%20%E4%B8%8A%E5%B8%82%20DSP%EF%BC%8C%E4%BD%A0%E5%BA%94%E8%AF%A5%E9%A6%96%E5%85%88%E4%BD%BF%E7%94%A8%20Xtensa%20Xplorer%20%E7%89%88%E6%9C%AC%20DSP%20%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%96%87%E4%BB%B6%EF%BC%8C%E7%84%B6%E5%90%8E%E9%80%9A%E8%BF%87%20CMake%20%E5%B0%86%E8%AF%A5%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%96%87%E4%BB%B6%E9%9B%86%E6%88%90%E5%88%B0%20Zephyr%20%E7%89%88%E6%9C%AC%E4%B8%AD%EF%BC%8C%E6%9C%80%E5%90%8E%E4%BB%8E%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E4%B8%AD%E8%B0%83%E7%94%A8%3C%2FSPAN%3E%3CSPAN%3E%3C%2FSPAN%3E%3CCODE%20class%3D%22%22%3E%20BOARD_DSP_Init()%3C%2FCODE%3E%3CSPAN%3E%3C%2FSPAN%3E%3CSPAN%3E%20%E5%87%BD%E6%95%B0%E6%9D%A5%E5%A4%84%E7%90%86%E5%90%AF%E5%8A%A8%E9%A1%BA%E5%BA%8F%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3E%E5%9C%A8%E5%AE%8C%E6%88%90%E8%BF%81%E7%A7%BB%E4%B9%8B%E5%89%8D%EF%BC%8C%E6%82%A8%E9%9C%80%E8%A6%81%E4%BD%BF%E7%94%A8%E5%AE%98%E6%96%B9%E6%96%87%E6%A1%A3%EF%BC%88MCUXpresso%20%2B%20EVK%EF%BC%89%3CSTRONG%3E%E5%AE%8C%E6%88%90%E5%8A%9F%E8%83%BD%3C%2FSTRONG%3E%EF%BC%8C%E5%B9%B6%E4%B8%94%E9%9C%80%E8%A6%81%3CSTRONG%3E%E5%85%B7%E5%A4%87%3C%2FSTRONG%3E%E5%BC%80%E5%8F%91%20Zephry%20%E7%9A%84%E8%83%BD%E5%8A%9B%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3E%3CSTRONG%3E%E5%8F%82%E8%80%83%E8%B5%84%E6%96%99%3C%2FSTRONG%3E%EF%BC%9A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E1%E3%80%82%E7%89%88%E6%9C%AC%20DSP%20%E5%9B%BA%E4%BB%B6%EF%BC%9A%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fsupporting-information%2FGSXEVKMIMXRT595.pdf%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%20%E9%80%82%E7%94%A8%E4%BA%8E%20EVK-%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fsupporting-information%2FGSXEVKMIMXRT595.pdf%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%20MIMXRT595%3C%2FA%3E%20%E7%9A%84%20Xplorer%20%E5%85%A5%E9%97%A8%20%E9%80%9A%E5%B8%B8%EF%BC%8C%E4%BD%A0%E4%BC%9A%E5%BE%97%E5%88%B0%E4%B8%A4%E4%B8%AA%E8%BE%93%E5%87%BA%E6%96%87%E4%BB%B6%EF%BC%8C%E4%BE%8B%E5%A6%82%20dsp_text_release.bin%20%E5%92%8C%20dsp_data_release.bin%E3%80%82%E8%BF%99%E4%BA%9B%E6%98%AF%20Cortex-M33%20%E5%86%85%E6%A0%B8%E5%B0%86%E5%8A%A0%E8%BD%BD%E5%88%B0%20DSP%20RAM%20%E4%B8%AD%E7%9A%84%E5%9B%BA%E4%BB%B6%E6%98%A0%E5%83%8F%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E2.%20%E5%B0%86%20DSP%20%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%96%87%E4%BB%B6%E9%9B%86%E6%88%90%E5%88%B0%20Zephyr%20%E7%89%88%E6%9C%AC%E4%B8%AD%EF%BC%9A%3CBR%20%2F%3EZephyr%20%E7%BC%96%E8%AF%91%E7%B3%BB%E7%BB%9F%E8%A6%81%E6%B1%82%E6%82%A8%E5%9C%A8%20Cortex-M33%20%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E4%B8%AD%E6%98%8E%E7%A1%AE%E5%8C%85%E5%90%AB%E8%BF%99%E4%BA%9B%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%96%87%E4%BB%B6%E3%80%82%E4%B8%BA%E6%AD%A4%EF%BC%8C%E6%82%A8%E5%8F%AF%E4%BB%A5%E4%BF%AE%E6%94%B9%20Zephyr%20%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E7%9A%84%20CMakeLists.txt%20%E6%96%87%E4%BB%B6%E3%80%82%E4%BD%A0%E5%8F%AF%E8%83%BD%E9%9C%80%E8%A6%81%E4%BD%BF%E7%94%A8%20Zephyr%20%E7%9A%84%E7%89%88%E6%9C%AC%E7%B3%BB%E7%BB%9F%E5%8A%9F%E8%83%BD%EF%BC%88%E4%BE%8B%E5%A6%82%20zephyr_file_copy%20%E6%88%96%E5%B0%86%E5%AE%83%E4%BB%AC%E5%AE%9A%E4%B9%89%E4%B8%BA%E4%BA%8C%E8%BF%9B%E5%88%B6%20blob%EF%BC%89%E5%B0%86%E6%96%87%E4%BB%B6%E6%94%BE%E7%BD%AE%E5%9C%A8%E6%9C%80%E7%BB%88%E5%9B%BA%E4%BB%B6%E6%98%A0%E5%83%8F%E4%B8%AD%E7%9A%84%E5%B7%B2%E7%9F%A5%E4%BD%8D%E7%BD%AE%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E3.%20%E9%80%82%E7%94%A8%E4%BA%8E%20i.MX%20RT595%20%E7%9A%84%20MCUXpresso%20SDK%20%E6%8F%90%E4%BE%9B%E4%BA%86%E7%94%A8%E4%BA%8E%E7%AE%A1%E7%90%86%20DSP%20%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F%E7%9A%84%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F%20%3CCODE%20class%3D%22%22%3E(%20fsl_dsp.c%2F.h)%E3%80%82%3C%2FCODE%3E%3CCODE%20class%3D%22%22%3E%20%E9%80%82%E7%94%A8%E4%BA%8E%E6%81%A9%E6%99%BA%E6%B5%A6%E8%AE%BE%E5%A4%87%E7%9A%84Zephyr%E5%8C%85%E5%90%AB%E6%AD%A4%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7%E5%8C%85%EF%BC%8C%E5%9B%A0%E6%AD%A4%E6%82%A8%E5%8F%AF%E4%BB%A5%E7%9B%B4%E6%8E%A5%E4%BB%8EZephyr%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E4%BB%A3%E7%A0%81%E4%B8%AD%E8%B0%83%E7%94%A8%E8%BF%99%E4%BA%9B%E5%87%BD%E6%95%B0%E3%80%82%20%E8%AF%A6%E7%BB%86%E4%BF%A1%E6%81%AF%E5%8F%AF%E4%BB%A5%E4%BB%8E%3C%2FCODE%3E%3C%2FSPAN%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fsupporting-information%2FGSXEVKMIMXRT595.pdf%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%20EVK%3C%2FA%3E%20%E7%89%88%20Xplorer%20%E5%85%A5%E9%97%A8%E7%9A%84%20%E2%80%9C3.3%20DSP%20%E5%86%85%E6%A0%B8%E5%88%9D%E5%A7%8B%E5%8C%96%E2%80%9D%20%E4%B8%AD%E6%89%BE%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fsupporting-information%2FGSXEVKMIMXRT595.pdf%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%20%E5%88%B0-MIMXRT595%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E