dual debug connection

cancel
Showing results for 
Search instead for 
Did you mean: 

dual debug connection

Jump to solution
906 Views
amarti
Contributor II

According to the documentation 'Vybrid DS-5 Getting Started Guide', I tried to set up a debug connection to the vybrid tower board. In the first example there, a single debug connection to the A5 core is established. When the Debugging is started, the M4 is also started (using a 'start_m4()' function). This works fine. In a next example, a dual debug connection should be set up, which does not work.

The debug configuration dialog in DS-5, version 5.18, has changed compared to the documentation, and I can not make the demanded adaptions like 'Enable Cortex-M4 clock', nor find any other working configuration.

has anybody set up sucessfully this example, using the vybrid tower (TWR-VF65GS10) and DS-5 v. 5.18 ?

Thanks

Labels (3)
1 Solution
242 Views
CommunityBot
Community Manager
This an automatic process.

We are marking this post as solved, due to the either low activity or any reply marked as correct.

If you have additional questions, please create a new post and reference to this closed post.

NXP Community!

View solution in original post

0 Kudos
7 Replies
243 Views
CommunityBot
Community Manager
This an automatic process.

We are marking this post as solved, due to the either low activity or any reply marked as correct.

If you have additional questions, please create a new post and reference to this closed post.

NXP Community!

View solution in original post

0 Kudos
244 Views
jiri-b36968
NXP Employee
NXP Employee

Hello Andreas

yes it is slightly different, but main parts are same.

You need two debug configurations: one for CA5 and one for CM4:

pastedImage_1.png

Click at button DTSL and check Start secondary core .....

pastedImage_0.png

Then you should connect to both cores separately.

pastedImage_2.png

/Jiri

244 Views
alanball
Contributor III

Is it also incorrect to specify "Connect only" for the M4 when you've just reconnected the A5  (as stated in the getting started doc) ?
Without the "start_m4" call the M4 just sits in a loop waiting for an interrupt that never comes - I guess it needs a valid start address ?

"Debug from entry point" works better

Please enlighten me if I've got the wrong end of the stick - I'm new to this !

0 Kudos
244 Views
jiri-b36968
NXP Employee
NXP Employee

Hello Andreas,

All option you need clock for secondary core. In default configuration where Cortex-A5 is primary core the clock for Cortex-M4 is not enabled after reset. So you can :

  • enable CM4 clock from debugger (DTSL options). In this case you can immediately start second debug connection for Cortex-M4
  • or you can enable it from Cortex-A5 code. In this can you can start Cortex-M4 debug session after Cortex-A5 core run "start_m4" routine where clock is enabled

you can see a video for it https://www.youtube.com/watch?feature=player_embedded&v=djExDHsBa5w (in newest DS-5 the connection configuration is little bit different)

/Jiri

0 Kudos
244 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Have tried to comment out the start_m4 function and start first a A5 debug session, and after that start the M4 debug session?

The debug session can be left as default.

Please let me know how it goes.

Best Regards,

Alejandro

0 Kudos
244 Views
amarti
Contributor II

Finally I could make it work, but only after commenting out the printf() calls in the funtions main() and hello_M4() in M4 project. (see code snippet at bottom)

Otherwise the while(1) statement is never reached.

I have no idea what could be the reason for this behaviour.

Unfortunately I can even not check the terminal output of printf(). I tried to use the terminal of DS-5 with following settings, but get no output, neither from M4 nor A5

pastedImage_1.png

(even though changing the UART_PORT to UART2 according to Rev G Tower Board Changes)

// dual_core_m4.c

...

int main()

{

    /* Enable IO for LED operation */

    ENABLE_LEDS;

    // printf("Hello World from M4 Core!\n"); // NEEDS TO BE COMMENTED OUT

    while(1)

    {

        /* Blink Tower LEDs */

        led_blink_tower(1);

        /* Say Hello */

        hello_M4();

    }

    return 0;

}

...

void hello_M4()

{

    /* Lock gate to write UART, then unlock */

    SEMA4->GATE[1] = CORE1_LOCK;

    if(SEMA4->GATE[1] == CORE1_LOCK)

    {

        /* Output message from M4 */

        // printf("Hello M4!\n"); // NEEDS TO BE COMMENTED OUT

        /* Unlock Semaphore */

        SEMA4->GATE[1] = UNLOCK;

    }

}

0 Kudos
244 Views
jiri-b36968
NXP Employee
NXP Employee

Hi Andreas,

please check which serial channel is available on your machine i device manager:

pastedImage_0.png

then use puTTy, TerraTerm, Hercules or any other application and set communication parameters to 115200 b/s, no parity, 1 stop bit and no flow control.

pastedImage_1.png

pastedImage_2.png

Not sure what happens in your code, but maybe you can start new DS5 worspace and import project from Vybrid sample code (from Vybrid web pages) and then you can go back to your code.

/Jiri

0 Kudos