[SOLVED] FreeRTOS aware in Segger Embedded Studio

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Hello,

    Well, after a bit more digger, it appears the OZone application is where Segger offers OS aware debugging. And it does a reasonable job, with FreeRTOS on the nRF52.

    NOTE: When I first got it going, it would get stuck attempting to run code under 0x0001000. It was exercised during the call to either vPortStartFirstTask or sd_softdevice_enable. Either way, after a lot of hunting I found that the solution was to replace to functions in the .jdebug file with:

    Source Code

    1. void AfterTargetReset (void)
    2. {
    3. unsigned int SP;
    4. unsigned int PC;
    5. SP = Target.ReadU32(0);
    6. Target.SetReg("SP", SP);
    7. PC = Target.ReadU32(4);
    8. Target.SetReg("PC", PC);
    9. }



    and


    Source Code

    1. void AfterTargetDownload (void)
    2. {
    3. unsigned int SP;
    4. unsigned int PC;
    5. SP = Target.ReadU32(0);
    6. Target.SetReg("SP", SP);
    7. PC = Target.ReadU32(4);
    8. Target.SetReg("PC", PC);
    9. }
    Display All

    thomas
  • Hello Thomas,

    Thank you for your inquiry.
    How to enable thread awareness in ES is explained here:
    wiki.segger.com/SEGGER_Embedde…ble_RTOS_thread_awareness

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.