Creating M4 Partition

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

Creating M4 Partition

928 Views
anjalikkrishna
Contributor III

Hi ,

    For creating the M4 partition , I added -p3 option in soc.mak file and when I enabled the ALT_DEBUG_UART macro in the board.c file , the partition and memory regions were listed out and the partition 3 is visible. When I disable the ALT_DEBUG_UART macro no prints are displayed in M4 side and A53 side. I tried moving the debug related pads and resource in the below function from SC partiiton to boot partition

void board_config_sc(sc_rm_pt_t pt_sc)

{

   #ifdef ALT_DEBUG_UART
        (void) rm_set_resource_movable(SC_PT, SC_R_M4_0_UART, SC_R_M4_0_UART,
            SC_FALSE);
        (void) rm_set_pad_movable(SC_PT, SC_P_ADC_IN3, SC_P_ADC_IN2,
            SC_FALSE);
    #endif

ifndef ALT_DEBUG_UART

   (void) rm_set_pad_movable(SC_PT, SC_P_ADC_IN3, SC_P_ADC_IN2,
            SC_TRUE);
       (void) rm_set_resource_movable(SC_PT, SC_R_M4_0_UART, SC_R_M4_0_UART,
            SC_TRUE);
        (void) rm_move_all(SC_PT,SC_PT, BOOT_PT, SC_TRUE,
            SC_TRUE);

#endif

    (void) rm_set_resource_movable(pt_sc, SC_R_SC_I2C, SC_R_SC_I2C,
        SC_FALSE);
    (void) rm_set_pad_movable(pt_sc, SC_P_PMIC_I2C_SCL, SC_P_PMIC_I2C_SDA,
        SC_FALSE);
    (void) rm_set_pad_movable(pt_sc, SC_P_SCU_GPIO0_00, SC_P_SCU_GPIO0_01,
        SC_FALSE);
}

and in the system_config functions , the moved the pads and resources from Boot partiion to M4 as below;

        BRD_ERR(rm_set_pad_movable(pt_boot,SC_P_ADC_IN3,SC_P_ADC_IN2,
            SC_TRUE));
        BRD_ERR(rm_set_resource_movable(pt_boot,SC_R_M4_0_UART,SC_R_M4_0_UART,
            SC_TRUE));

 and finally

       BRD_ERR(rm_move_all(pt_boot, pt_boot, pt_m4_0, SC_TRUE, SC_TRUE));

I tried to configure the uart in M4 Partition .But this does not seems  to be working and the prints are still not coming

 Any help ?

Tags (1)
0 Kudos
2 Replies

625 Views
anjalikkrishna
Contributor III

Hi Igor,

 

 Thank you for the reply.

 I have added the flag and -p3 parameter in soc.mak in the mkimage. And M4 partition is created as third partition. But the problem I am facing is when I comment the ALT_DEBUG_UART in the board.c file no prints are not coming in the A35 or M4 side. If the ALT_DEBUG_UART is enabled , in the below function , the UART and ADC pads are made as non-movable in SC partition

void board_config_sc(sc_rm_pt_t pt_sc)

{

      ifef ALT_DEBUG_UART
      (void) rm_set_resource_movable(SC_PT, SC_R_M4_0_UART, SC_R_M4_0_UART,
            SC_FALSE);
       (void) rm_set_pad_movable(SC_PT, SC_P_ADC_IN3, SC_P_ADC_IN2,
             SC_FALSE);

     #endif

}

I tried to move the same to M4 partition by making it movable and assigning it to boot partition and finally to M4 . But the prints are still not visible in both the sides.

My doubt is when the M4 partition is created is there any further changes to be done for enabling the debug prints in M4 and A53?

0 Kudos

625 Views
igorpadykov
NXP Employee
NXP Employee

Hi Anjalik

one can check if the SC_BD_FLAGS_ALT_CONFIG is set under the boot flags (more details in the Usage chapter
of the sc_fw_port.pdf), the flags are set while building the image with mkimage.

The function rm_dump(pt_boot); dumps the partitioning state of the whole system,
it can be called before and after the partitioning to make sure the device was partitioned as expected.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos