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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
485 Views
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

Labels (1)
0 Kudos
Reply
1 Solution
324 Views
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

View solution in original post

0 Kudos
Reply
6 Replies
180 Views
3517884267
Contributor I

Where to download the source file

configs/arm64/imx8mn-harpoon-freertos.c

0 Kudos
Reply
156 Views
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 Kudos
Reply
181 Views
3517884267
Contributor I
configs/arm64/imx{8m*,93,95}-harpoon-freertos.c  源文件在哪下载 

 

 

0 Kudos
Reply
451 Views
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 Kudos
Reply
371 Views
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 Kudos
Reply
326 Views
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 Kudos
Reply