[SOLVED] Processor frezzes after Enabled the Interrupt source

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

  • [SOLVED] Processor frezzes after Enabled the Interrupt source

    Hello,

    I moved project from Keil to Segger Embedded studio and now while i debugging my processor freezes after enabled the interrupt sources.
    When i used keil the whole program worked correctly. What can i do to make debug work correctly at Segger?

    I flash via j-link and use STM32F103VC

    First, I imported using the internal toolchain. When building, I got 2 errors:

    Source Code

    1. 1> error: undefined symbol: __RESETPRIMASK
    2. 1> error: undefined symbol: __SETPRIMASK

    and want to change the following functions:

    C Source Code

    1. /*******************************************************************************
    2. * Function Name : NVIC_SETPRIMASK
    3. * Description : Enables the PRIMASK priority: Raises the execution priority to 0.
    4. * Input : None
    5. * Output : None
    6. * Return : None
    7. *******************************************************************************/
    8. void NVIC_SETPRIMASK(void)
    9. {
    10. __SETPRIMASK();
    11. }
    12. /*******************************************************************************
    13. * Function Name : NVIC_RESETPRIMASK
    14. * Description : Disables the PRIMASK priority.
    15. * Input : None
    16. * Output : None
    17. * Return : None
    18. *******************************************************************************/
    19. void NVIC_RESETPRIMASK(void)
    20. {
    21. __RESETPRIMASK();
    22. }
    Display All

    I have tried to use assembler instructions that replicate the functions but with no avail.



    Does anyone have a similar experience?

    The post was edited 2 times, last by Akatosh ().

  • Hello,

    Thank you for your inquiry.
    Such an issue is not known to us.
    How did you move your application from Keil to ES? Did you use the imported or did you do the setup manually?
    Did you consider the following troubleshooting steps?
    wiki.segger.com/Port_Projects_…kbench_to_Embedded_Studio

    For reference could you give the CPU support package sample solution in Embedded Studio a try?
    1. Install the CPU support package for the STM32F103VC series.
    2. Go to Tools->Show Installed Packages->STMicroelectronics STM32F1xx CPU Support Package.

    3. Click on STM32F1xx Samples Solution.

    4. Select the Systick sample by double clicking it in the Project Explorer window.

    5. Build the project and flash it with F5.

    6. Run the application, it uses Systick interrupt and should print a timer periodically.

    Does this application work on your target?

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    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.
  • Thank you for replay

    I moved the program by the import.

    I didn't follow the troubleshooting yet. I checked now the sample solution and it compiled but after I run debug the program instantly goes to "HardFault_Handler".
    And I think that is only just problem with SEGGER that I can not handle with. I reinstalled SEGGER but it didn't help.
    Do you have any idea for this kind of problem?
  • Hello,

    We tested the sample solution with a NUCLEO-F103RB and everything was working as expected.
    Do you have an eval board to test against?
    To make sure this is no setup issue as you are using a slightly different target device could you set the correct target processor in the sample project as follows?
    Project Options->Build->Target Processor->Select STM32F103VC

    Now rebuild the project by right clicking it and selecting rebuild.
    Does the application debug now?
    If not could you provide a screenshot of your Embedded Studio setup?
    Could you also provide a J-Link log file of the failing session with Embedded Studio?
    wiki.segger.com/Enable_J-Link_log_file



    Akatosh wrote:

    And I think that is only just problem with SEGGER that I can not handle with. I reinstalled SEGGER but it didn't help.
    Could you elaborate what a SEGGER is? SEGGER is our company name. We have many products and software under it.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    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.
  • Hello,

    I have changed the computer and now it works correctly. I don't know what was the reason, because before sample program was crashing and it is still mysterious for me.

    I tried to changed processor in project options and I found out that i don't have "target processor" option in project options. I added it by changing lines in solution code (but I'm not sure is it appropriate solution).

    After this I changed two assemblers files (after importing was "excluded from compilation" for some reason), and thanks to this my previous error vanished, but now I have several other errors.
    I don't know what else I can check now. Have you maybe some idea what else can I do now?



    Sorry about that mistake, by "SEGGER" i mean "SEGGER embeded studio".
    Images
    • solution code.jpg

      589.63 kB, 2,533×1,212, viewed 405 times
    • errors.png

      67.19 kB, 1,681×685, viewed 389 times
  • Hello,

    The target processor option is only available for the example solution that you can launch from the package and was just pointer out by me so you can verify your general hardware and Embedded Studio setup to be working.
    This seems to be the case.
    When creating a new project we recommend using the following approach:


    Creating the project in some other way may lead to issues which we can't provide support for.
    Also we do not recommend editing the emProject file manually but add and remove options via the GUI only.

    A simply getting started guide for Embedded Studio can be found on our product landing page:
    segger.com/products/development-tools/embedded-studio/


    Best regards,

    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    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.