Tool/software:
Hi
Without using any uart/sci, is there any possibility to see the CPU2 debug prints in ccs console itself?
If i follow the dual core debug steps, i can see only prints from CPU1 only
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hi
Without using any uart/sci, is there any possibility to see the CPU2 debug prints in ccs console itself?
If i follow the dual core debug steps, i can see only prints from CPU1 only
Hi,
Can you provide information regarding the prints seen on CPU1 and not on CPU2. Are you asking if it's possibly to printf() information on CPU2 to the console?
Regards,
Ozino
Hi Ozino,
yes... I want to do IPC between CPU1 and CPU2. From CPU1 i am getting all the prints(using printf). But from CPU2 not. How can i make debug prints from CPU2 make available.
So even to get debug prints with uart, I configured UART in CPU2 and tried to get log in PC (via minicom). But its not working.. But when i do the same with CPU1 its working fine...
Do i need to change the ownership or anything to CPU2?
Kindly give a solution to make CPU2 log available for dual core operation
CPU1 Code:
void main(void)
{
// Initialize device clock and peripherals
Device_init();
SysCtl_selectCPUForPeripheralInstance(SYSCTL_CPUSEL_UARTA, SYSCTL_CPUSEL_CPU2);
//init ipc and shared memory and boot CPU2
setupSharedMemoryAndBootCPU2();
// Initialize PIE and clear PIE registers. Disable CPU interrupts.
Interrupt_initModule();
Device_initGPIO();
// Disable all CPU interrupts and clear all CPU interrupt flags.
DINT;
IER = 0x0000;
IFR = 0x0000;
// Initialize the PIE vector table with pointers to the shell ISR.
Interrupt_initVectorTable();
// Set up CPUTimer1, LEDs.
Board_init();
FreeRTOS_MCU_BSP();
printf("Error: Scheduler returned unexpectedly!\n");
while (1);
}
CPU2 Code
void main(void)
{
int i;
//
// Initialize device clock and peripherals
//
Device_init();
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_UARTA);
for(i = 0; i <10000;i++);
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts.
//
Interrupt_initModule();
//
// Initialize the PIE vector table with pointers to the shell Interrupt
// Service Routines (ISR).
//
Interrupt_initVectorTable();
Board_init();
//
// Clear any IPC flags if set already
//
IPC_clearFlagLtoR(IPC_CPU2_L_CPU1_R, IPC_FLAG_ALL);
IPC_sync(IPC_CPU2_L_CPU1_R, IPC_FLAG31);
//
// Enable IPC interrupts
//
IPC_registerInterrupt(IPC_CPU2_L_CPU1_R, IPC_INT0, IPC_ISR0);
//
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
//
EINT;
ERTM;
//
// Synchronize both the cores.
//
IPC_sync(IPC_CPU2_L_CPU1_R, SYNC_FLAG);
//
// Loop forever. Wait for IPC interrupt
//
while(1);
}
__interrupt void IPC_ISR0()
{
// int i;
uint32_t command, addr, data;
bool status = false;
// Read IPC command sent by CPU1 on Flag0
IPC_readCommand(IPC_CPU2_L_CPU1_R, IPC_FLAG0, IPC_ADDR_CORRECTION_ENABLE,
&command, &addr, &data);
if(command == IPC_CMD_READ_MEM)
{
UART_writeChar(myUART0_BASE,'S');
status = true;
}
//
// Send response to C28x core
//
if(status)
{
IPC_sendResponse(IPC_CPU2_L_CPU1_R, TEST_PASS);
}
else
{
IPC_sendResponse(IPC_CPU2_L_CPU1_R, TEST_FAIL);
}
//
// Acknowledge the flag
//
IPC_ackFlagRtoL(IPC_CPU2_L_CPU1_R, IPC_FLAG0);
//
// Acknowledge the PIE interrupt.
//
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1);
}
shoudl i change the ownership of UARTA to CPU2 to use it in CPU2?
After the above code the ownershp of UARTA is still with CPU1..
Please help in this
Closing this post as there is an active post already being supported. Please do not double post questions as it slows down our ability to redirect your post to the correct owners. Thank you.