[Harpoon Yocto][iMX8MN] Configure the CPU cores in the cell

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

[Harpoon Yocto][iMX8MN] Configure the CPU cores in the cell

跳至解决方案
2,105 次查看
khang_letruong
Senior Contributor III

Dear Harpoon Experts,

From the UG10170 - Harpoon User's Guide,  I learn that there's a possibility to configure the number of CPU core(s) allocated to the RTOS :

For a multicore (SMP) cell, two cores can be used. For instance, on i.MX 8M:
  .cpus = {
      0b1100,
  },

 

I would like to know if it is feasible to allocate up to 3 cores to the RTOS ? And what file(s) among the below should I modify in the case of iMX8M Nano EVK and FreeRTOS, please ?

• configs/arm64/imx{8m*,93,95}-harpoon-freertos.c for the cell configuration of the FreeRTOS
hello_world and rt_latency use case
• configs/arm64/imx{8m*,93,95}-harpoon-zephyr.c for the cell configuration of the Zephyr
hello_world and rt_latency use case
• configs/arm64/imx{8m*,93}-harpoon-freertos-audio.c for the cell configuration of the
FreeRTOS audio use case
• configs/arm64/imx{8m*,93}-harpoon-zephyr-audio.c for the cell configuration of the Zephyr
audio use case
• configs/arm64/imx{8m*,93}-harpoon-freertos-avb.c for the cell configuration of the FreeRTOS
audio (AVB) use case
• configs/arm64/imx{8m*,93}-harpoon-zephyr-avb.c for the cell configuration of the Zephyr audio
(AVB) use case
• configs/arm64/imx{8m*,93}-harpoon-freertos-industrial.c for the cell configuration of the
FreeRTOS industrial use case
• configs/arm64/imx{8m*,93}-harpoon-zephyr-industrial.c for the cell configuration of the
Zephyr industrial use case
• configs/arm64/imx{8m*,93}-harpoon-freertos-virtio.c for the cell configuration of the
FreeRTOS Virtio Networking use case

 

Thanks in advance and best regards,

Khang

标签 (1)
0 项奖励
回复
1 解答
1,944 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi  khang:

 

I would suggest you modify the CONFIG_INMATE_CORE_BITMAP in configs/arm64/imx8mn-harpoon-freertos.c

 

 

Regards

Daniel

在原帖中查看解决方案

0 项奖励
回复
6 回复数
1,800 次查看
3517884267
Contributor I

Where to download the source file

configs/arm64/imx8mn-harpoon-freertos.c

0 项奖励
回复
1,776 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi @3517884267 

 

I would suggest you check the Harpoon user's guider,  you can get the source code from github.

danielchen_0-1742991052850.png

 

Regards

Daniel

 

0 项奖励
回复
1,801 次查看
3517884267
Contributor I
configs/arm64/imx{8m*,93,95}-harpoon-freertos.c  源文件在哪下载 

 

 

0 项奖励
回复
2,071 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi @khang_letruong 

 

It is possible to configure the number of core to '3'  to allocate to the RTOS.  

 You need to change here

45     .cpus = {
46 #if defined(SINGLE_CORE)
47         0x1,
48 #elif defined(THREE_CORES)
49         0x7,
50 #else
51         0x3,
52 #endif
53     },

 

Since we don't test this scenario on our side before, you need to do more tests,  and let us know if you come across some issues.

 

Regards

Daniel

 

 

0 项奖励
回复
1,991 次查看
khang_letruong
Senior Contributor III

Hi @danielchen,

Thanks for your answer. Can you please tell which file should I apply the modification ?

Searching within imx-jailhouse, I only found :

 

$ ag ".cpus =" | grep imx8mn
configs/arm64/imx8mn-lk.c:177:	.cpus = {
configs/arm64/imx8mn.c:65:	.cpus = {
configs/arm64/imx8mn-linux-demo.c:42:	.cpus = {
configs/arm64/imx8mn-inmate-demo.c:45:	.cpus = {
configs/arm64/imx8mn-root-lk.c:66:	.cpus = {

 

But nothing relevant to RTOS.

 

Best Regards,

K.

0 项奖励
回复
1,945 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi  khang:

 

I would suggest you modify the CONFIG_INMATE_CORE_BITMAP in configs/arm64/imx8mn-harpoon-freertos.c

 

 

Regards

Daniel

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2039757%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%5BHarpoon%20Yocto%5D%5BiMX8MN%5D%20%E9%85%8D%E7%BD%AE%E5%8D%95%E5%85%83%E4%B8%AD%E7%9A%84%20CPU%20%E6%A0%B8%E5%BF%83%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2039757%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%B0%8A%E6%95%AC%E7%9A%84%20Harpoon%20%E4%B8%93%E5%AE%B6%E4%BB%AC%EF%BC%9A%3C%2FP%3E%3CP%3E%E4%BB%8E%20UG10170%20-%20Harpoon%20%E7%94%A8%E6%88%B7%E6%8C%87%E5%8D%97%E4%B8%AD%EF%BC%8C%E6%88%91%E4%BA%86%E8%A7%A3%E5%88%B0%E5%8F%AF%E4%BB%A5%E9%85%8D%E7%BD%AE%E5%88%86%E9%85%8D%E7%BB%99%20RTOS%20%E7%9A%84%20CPU%20%E6%A0%B8%E5%BF%83%E6%95%B0%E9%87%8F%EF%BC%9A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%20translate%3D%22no%22%3EFor%20a%20multicore%20(SMP)%20cell%2C%20two%20cores%20can%20be%20used.%20For%20instance%2C%20on%20i.MX%208M%3A%0A%20%20.cpus%20%3D%20%7B%0A%20%20%20%20%20%200b1100%2C%0A%20%20%7D%2C%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3E%E6%88%91%E6%83%B3%E7%9F%A5%E9%81%93%E4%B8%BA%20RTOS%20%E5%88%86%E9%85%8D%E6%9C%80%E5%A4%9A%203%20%E4%B8%AA%E6%A0%B8%E5%BF%83%E6%98%AF%E5%90%A6%E5%8F%AF%E8%A1%8C%EF%BC%9F%E8%AF%B7%E9%97%AE%EF%BC%8C%E5%AF%B9%E4%BA%8E%20iMX8M%20Nano%20EVK%20%E5%92%8C%20FreeRTOS%EF%BC%8C%E6%88%91%E5%BA%94%E8%AF%A5%E4%BF%AE%E6%94%B9%E4%BB%A5%E4%B8%8B%E5%93%AA%E4%B8%AA%E6%96%87%E4%BB%B6%EF%BC%9F%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%20translate%3D%22no%22%3E%E2%80%A2%20configs%2Farm64%2Fimx%7B8m*%2C93%2C95%7D-harpoon-freertos.c%20for%20the%20cell%20configuration%20of%20the%20FreeRTOS%0Ahello_world%20and%20rt_latency%20use%20case%0A%E2%80%A2%20configs%2Farm64%2Fimx%7B8m*%2C93%2C95%7D-harpoon-zephyr.c%20for%20the%20cell%20configuration%20of%20the%20Zephyr%0Ahello_world%20and%20rt_latency%20use%20case%0A%E2%80%A2%20configs%2Farm64%2Fimx%7B8m*%2C93%7D-harpoon-freertos-audio.c%20for%20the%20cell%20configuration%20of%20the%0AFreeRTOS%20audio%20use%20case%0A%E2%80%A2%20configs%2Farm64%2Fimx%7B8m*%2C93%7D-harpoon-zephyr-audio.c%20for%20the%20cell%20configuration%20of%20the%20Zephyr%0Aaudio%20use%20case%0A%E2%80%A2%20configs%2Farm64%2Fimx%7B8m*%2C93%7D-harpoon-freertos-avb.c%20for%20the%20cell%20configuration%20of%20the%20FreeRTOS%0Aaudio%20(AVB)%20use%20case%0A%E2%80%A2%20configs%2Farm64%2Fimx%7B8m*%2C93%7D-harpoon-zephyr-avb.c%20for%20the%20cell%20configuration%20of%20the%20Zephyr%20audio%0A(AVB)%20use%20case%0A%E2%80%A2%20configs%2Farm64%2Fimx%7B8m*%2C93%7D-harpoon-freertos-industrial.c%20for%20the%20cell%20configuration%20of%20the%0AFreeRTOS%20industrial%20use%20case%0A%E2%80%A2%20configs%2Farm64%2Fimx%7B8m*%2C93%7D-harpoon-zephyr-industrial.c%20for%20the%20cell%20configuration%20of%20the%0AZephyr%20industrial%20use%20case%0A%E2%80%A2%20configs%2Farm64%2Fimx%7B8m*%2C93%7D-harpoon-freertos-virtio.c%20for%20the%20cell%20configuration%20of%20the%0AFreeRTOS%20Virtio%20Networking%20use%20case%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3E%E6%8F%90%E5%89%8D%E6%84%9F%E8%B0%A2%E4%BD%A0%E7%9A%84%E5%B8%AE%E5%8A%A9%EF%BC%8C%E9%A1%BA%E7%A5%9D%E5%95%86%E7%A5%BA%EF%BC%81%3C%2FP%3E%3CP%3EKhang%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2039757%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX%208M%20%7C%20i.MX%208M%20Mini%20%7C%20i.MX%208M%20Nano%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2068664%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%5BHarpoon%20Yocto%5D%5BiMX8MN%5D%20%E9%85%8D%E7%BD%AE%E5%8D%95%E5%85%83%E4%B8%AD%E7%9A%84%20CPU%20%E6%A0%B8%E5%BF%83%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2068664%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F245733%22%20target%3D%22_blank%22%3E%403517884267%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E6%88%91%E5%BB%BA%E8%AE%AE%E4%BD%A0%E6%9F%A5%E7%9C%8B%20Harpoon%20%E7%94%A8%E6%88%B7%E6%8C%87%E5%8D%97%EF%BC%8C%E4%BD%A0%E5%8F%AF%E4%BB%A5%E4%BB%8E%20github%20%E8%8E%B7%E5%8F%96%E6%BA%90%E4%BB%A3%E7%A0%81%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22danielchen_0-1742991052850.png%22%20style%3D%22width%3A%20616px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22danielchen_0-1742991052850.png%22%20style%3D%22width%3A%20616px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F329884i431AF2348DEB7146%2Fimage-dimensions%2F616x139%3Fv%3Dv2%22%20width%3D%22616%22%20height%3D%22139%22%20role%3D%22button%22%20title%3D%22danielchen_0-1742991052850.png%22%20alt%3D%22danielchen_0-1742991052850.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E6%AD%A4%E8%87%B4%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2068231%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%5BHarpoon%20Yocto%5D%5BiMX8MN%5D%20%E9%85%8D%E7%BD%AE%E5%8D%95%E5%85%83%E4%B8%AD%E7%9A%84%20CPU%20%E6%A0%B8%E5%BF%83%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2068231%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%BA%90%E6%96%87%E4%BB%B6%E5%9C%A8%E5%93%AA%E9%87%8C%E4%B8%8B%E8%BD%BD%3C%2FP%3E%3CP%3E%3CSPAN%3E%E9%85%8D%E7%BD%AE%2Farm64%2Fimx8mn-harpoon-freertos.c%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2068230%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%5BHarpoon%20Yocto%5D%5BiMX8MN%5D%20%E9%85%8D%E7%BD%AE%E5%8D%95%E5%85%83%E4%B8%AD%E7%9A%84%20CPU%20%E6%A0%B8%E5%BF%83%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2068230%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%20translate%3D%22no%22%3Econfigs%2Farm64%2Fimx%7B8m*%2C93%2C95%7D-harpoon-freertos.c%20%20%E6%BA%90%E6%96%87%E4%BB%B6%E5%9C%A8%E5%93%AA%E4%B8%8B%E8%BD%BD%20%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2055529%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%5BHarpoon%20Yocto%5D%5BiMX8MN%5D%20%E9%85%8D%E7%BD%AE%E5%8D%95%E5%85%83%E4%B8%AD%E7%9A%84%20CPU%20%E6%A0%B8%E5%BF%83%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2055529%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%20khang%3A%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E6%88%91%E5%BB%BA%E8%AE%AE%E6%82%A8%E4%BF%AE%E6%94%B9%20configs%2Farm64%2Fimx8mn-harpoon-freertos.c%20%E4%B8%AD%E7%9A%84%20CONFIG_INMATE_CORE_BITMAP%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditordanielchen_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E6%AD%A4%E8%87%B4%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2054127%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%5BHarpoon%20Yocto%5D%5BiMX8MN%5D%20%E9%85%8D%E7%BD%AE%E5%8D%95%E5%85%83%E4%B8%AD%E7%9A%84%20CPU%20%E6%A0%B8%E5%BF%83%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2054127%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F369%22%20target%3D%22_blank%22%3E%40danielchen%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%E8%B0%A2%E8%B0%A2%E4%BD%A0%E7%9A%84%E5%9B%9E%E7%AD%94%E3%80%82%E6%82%A8%E8%83%BD%E5%91%8A%E8%AF%89%E6%88%91%E5%BA%94%E8%AF%A5%E5%BA%94%E7%94%A8%E5%93%AA%E4%B8%AA%E6%96%87%E4%BB%B6%E8%BF%9B%E8%A1%8C%E4%BF%AE%E6%94%B9%E5%90%97%EF%BC%9F%3C%2FP%3E%3CP%3E%E5%9C%A8%20imx-jailhouse%20%E4%B8%AD%E6%90%9C%E7%B4%A2%EF%BC%8C%E6%88%91%E5%8F%AA%E5%8F%91%E7%8E%B0%EF%BC%9A%3C%2FP%3E%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%20translate%3D%22no%22%3E%24%20ag%20%22.cpus%20%3D%22%20%7C%20grep%20imx8mn%0Aconfigs%2Farm64%2Fimx8mn-lk.c%3A177%3A%09.cpus%20%3D%20%7B%0Aconfigs%2Farm64%2Fimx8mn.c%3A65%3A%09.cpus%20%3D%20%7B%0Aconfigs%2Farm64%2Fimx8mn-linux-demo.c%3A42%3A%09.cpus%20%3D%20%7B%0Aconfigs%2Farm64%2Fimx8mn-inmate-demo.c%3A45%3A%09.cpus%20%3D%20%7B%0Aconfigs%2Farm64%2Fimx8mn-root-lk.c%3A66%3A%09.cpus%20%3D%20%7B%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3E%E4%BD%86%E4%B8%8E%20RTOS%20%E6%97%A0%E5%85%B3%E3%80%82%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%E9%A1%BA%E7%A5%9D%E5%95%86%E7%A5%BA%EF%BC%81%3C%2FP%3E%3CP%3EK.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2040501%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%5BHarpoon%20Yocto%5D%5BiMX8MN%5D%20%E9%85%8D%E7%BD%AE%E5%8D%95%E5%85%83%E4%B8%AD%E7%9A%84%20CPU%20%E6%A0%B8%E5%BF%83%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2040501%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F147542%22%20target%3D%22_blank%22%3E%40khang_letruong%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E5%8F%AF%E4%BB%A5%E5%B0%86%E6%A0%B8%E5%BF%83%E6%95%B0%E9%87%8F%E9%85%8D%E7%BD%AE%E4%B8%BA%E2%80%9C3%E2%80%9D%E4%BB%A5%E5%88%86%E9%85%8D%E7%BB%99%20RTOS%E3%80%82%3C%2FP%3E%0A%3CP%3E%E4%BD%A0%E9%9C%80%E8%A6%81%E5%9C%A8%E8%BF%99%E9%87%8C%E6%94%B9%E5%8F%98%3C%2FP%3E%0A%3CP%3E45%20.CPU%3D%20%7B%3CBR%20%2F%3E%2046%20%23%E5%A6%82%E6%9E%9C%E5%AE%9A%E4%B9%89%EF%BC%88SINGLE_CORE%EF%BC%89%3CBR%20%2F%3E%2047%200x1%EF%BC%8C%3CBR%20%2F%3E%2048%20%23elif%20%E5%AE%9A%E4%B9%89%EF%BC%88THREE_CORES%EF%BC%89%3CBR%20%2F%3E%2049%200x7%EF%BC%8C%3CBR%20%2F%3E%2050%20%23%E5%85%B6%E4%BB%96%3CBR%20%2F%3E51%200x3%EF%BC%8C%3CBR%20%2F%3E%2052%20%23%E7%BB%93%E6%9D%9F%3CBR%20%2F%3E53%7D%EF%BC%8C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E7%94%B1%E4%BA%8E%E6%88%91%E4%BB%AC%E4%B9%8B%E5%89%8D%E6%B2%A1%E6%9C%89%E6%B5%8B%E8%AF%95%E8%BF%87%E8%BF%99%E7%A7%8D%E6%83%85%E5%86%B5%EF%BC%8C%E5%9B%A0%E6%AD%A4%E6%82%A8%E9%9C%80%E8%A6%81%E5%81%9A%E6%9B%B4%E5%A4%9A%E7%9A%84%E6%B5%8B%E8%AF%95%EF%BC%8C%E5%A6%82%E6%9E%9C%E9%81%87%E5%88%B0%E9%97%AE%E9%A2%98%E8%AF%B7%E5%91%8A%E7%9F%A5%E6%88%91%E4%BB%AC%E3%80%82%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E6%AD%A4%E8%87%B4%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E