Cannot access target, debug stopped STM32F407 ARM Cortex

Hello,

I am trying to run deep learning neural model described in https://www.dlology.com/blog/how-to-run-deep-learning-model-on-microcontroller-with-cmsis-nn/, I am using updated MDK Lite version 5.27. The trace starts running for about 600 seconds and then the error message pops up. The MDK is evaluating version and the only difference in the configuration from the above mentioned URL is "one ELF section per Function is checked".

I am also providing the github link for the code https://github.com/Tony607/arm_nn_examples/tree/master/cifar10.

Please let me know how can I resolve it. Thanks

Parents
  • I tried this example and I had to make a few settings to make it work. This example project contains a *.uvprojx µVision project file but no *.uvoptx project file. Because of that, the debugger (and some other) settings are missing. This is what I selected:

    • Select the target 'STM32F407DISCO' in the µVision toolbar
    • Build the project
    • In the dialog 'Project - Options for Target - Debug'  select 'ST-Link Debugger'
    • Press the button 'Settings' next to the ST-LINK selection. You should then see a ST-Link Serial Number and version numbers etc. as well as a 'ARM CoreSight SW-DP' device in the upper right corner. If you see all this, the hardware setup with the STM32F4 Discovery board should be correct.
    • Select the tab 'Trace' in this Settings dialog. Now you must set the 'Core Clock' to 168.00000 MHz and enable the checkbox 'Trace Enable'
    • Start a debug session. The program counter should be at the beginning of 'main()' now.
    • Please note that the function 'main()' ends with a 'return'. This is not typical for an embedded application. Usually an embedded application is endless loop.
    • When you run this application, you should see the following output in the 'Debug (printf) Viewer' window:
      start execution
      0: 0
      1: 0
      2: 0
      3: 102
      4: 0
      5: 0
      6: 25
      7: 0
      8: 0
      9: 0
    • The function main is executed in less than one second and then the CPU goes back to the startup code and does some weird things because the startup code is not designed to return from main. I have seen it entering main() a second time before it gets stuck in an endless loop. As mentioned above, an embedded application is usually an endless loop and does not leave main().

    Even if I keep the application running, µVision does not create any error messages after 600 seconds on my PC. So I cannot duplicate this issue. The option 'One ELF section per function' does not make any difference.

Reply
  • I tried this example and I had to make a few settings to make it work. This example project contains a *.uvprojx µVision project file but no *.uvoptx project file. Because of that, the debugger (and some other) settings are missing. This is what I selected:

    • Select the target 'STM32F407DISCO' in the µVision toolbar
    • Build the project
    • In the dialog 'Project - Options for Target - Debug'  select 'ST-Link Debugger'
    • Press the button 'Settings' next to the ST-LINK selection. You should then see a ST-Link Serial Number and version numbers etc. as well as a 'ARM CoreSight SW-DP' device in the upper right corner. If you see all this, the hardware setup with the STM32F4 Discovery board should be correct.
    • Select the tab 'Trace' in this Settings dialog. Now you must set the 'Core Clock' to 168.00000 MHz and enable the checkbox 'Trace Enable'
    • Start a debug session. The program counter should be at the beginning of 'main()' now.
    • Please note that the function 'main()' ends with a 'return'. This is not typical for an embedded application. Usually an embedded application is endless loop.
    • When you run this application, you should see the following output in the 'Debug (printf) Viewer' window:
      start execution
      0: 0
      1: 0
      2: 0
      3: 102
      4: 0
      5: 0
      6: 25
      7: 0
      8: 0
      9: 0
    • The function main is executed in less than one second and then the CPU goes back to the startup code and does some weird things because the startup code is not designed to return from main. I have seen it entering main() a second time before it gets stuck in an endless loop. As mentioned above, an embedded application is usually an endless loop and does not leave main().

    Even if I keep the application running, µVision does not create any error messages after 600 seconds on my PC. So I cannot duplicate this issue. The option 'One ELF section per function' does not make any difference.

Children
No data