Unknown exception in driver 8

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

  • Unknown exception in driver 8

    Hello,
    I got a strange error message when I try to load and debug my application. Each time I start debugging the following error occurs:
    ..
    06.11.13 21:40:48 Found 2 JTAG devices, Total IRLen = 9:
    06.11.13 21:40:48 #0 Id: 0x4BA00477, IRLen: 4, IRPrint: 0x1 CoreSight JTAG-DP
    06.11.13 21:40:48 #1 Id: 0x06413041, IRLen: 5, IRPrint: 0x1 STM32 Boundary Scan
    06.11.13 21:40:52 ELF/DWARF Error: Unexpected exception
    06.11.13 21:40:52 Fatal error: Unknown exception in driver 8 Session aborted!

    A attached the full debug log, if that helps. My setup is IAR Ewarm 6.4 with Eclipse, the target is a STM32F407ZE. The Log shows, that I used version V4.56d of the segger tools but I also have the problem with the newest version V4.78f.

    The strange thing is, that the error occurs depending on the code that I compile. The project has previously worked fine and I was able to flash and debug. But when I add a call to a library function the above error occurs. The Library itself is also used on other code segements and works properly. The call to the one specific function adds about 20KBytes of ROM code to the flash file. Maybe it has something to do with that, but neither the compiler nor the linker complain about size. The section sizes seem to be ok and should fit in the controller.

    Is there a way to check the elf-file? Maybe loading the file into the target using the J-Link commander? Is it possible to get some more detailed error log from the segger tools?

    If it helps I could also provide the elf file but not in public.
    Files
    • j-link_error.txt

      (3.42 kB, downloaded 1,072 times, last: )
  • Hi,

    So far, it does not necessarily look like a problem on the J-Link side, especially that there is an ELF/DWARF error/exception,
    since J-Link does not have anything to do with the ELF/DWARF information handling.

    The log output looks okay but is not very detailed.
    Would it be possible to send a complete J-Link logfile?
    In EWARM, this can be enabled as follows:



    Best regards
    Alex
    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.
  • This is the log output of c-spy:

    Source Code

    1. Logging started @ 2013-11-07 18:38
    2. DLL Compiled: Nov 4 2013 18:51:32
    3. Firmware: J-Link ARM V8 compiled Sep 20 2013 15:09:45
    4. Hardware: V8.00
    5. S/N:
    6. OEM:
    7. Feature(s): FlashBP, GDB returns O.K. (0286ms, 0286ms total)
    8. T1DC0 000:286 JLINK_ExecCommand("device = STM32F407ZE", ...)Device "STM32F407ZE" selected (512 KB flash, 128 KB RAM). returns 0x00 (0001ms, 0287ms total)
    9. T1DC0 000:287 JLINK_GetDLLVersion() returns 47806 (0000ms, 0287ms total)
    10. T1DC0 000:287 JLINK_GetCompileDateTime() (0000ms, 0287ms total)
    11. T1DC0 000:287 JLINK_GetFirmwareString(...) (0000ms, 0287ms total)
    12. T1DC0 000:287 JLINK_SelectDeviceFamily(14) (0000ms, 0287ms total)
    13. T1DC0 000:288 JLINK_SetSpeed(32) (0002ms, 0290ms total)
    14. T1DC0 000:290 JLINK_ExecCommand("SetResetType = 0", ...) returns 0x00 (0000ms, 0290ms total)
    15. T1DC0 000:290 JLINK_ExecCommand("SetResetPulseLen = 200", ...) returns 0x14 (0000ms, 0290ms total)
    16. T1DC0 000:290 JLINK_SetResetDelay(0) (0000ms, 0290ms total)
    17. T1DC0 000:290 JLINK_ResetPullsRESET(ON) (0000ms, 0290ms total)
    18. T1DC0 000:290 JLINK_Reset() >0x2F8 JTAG>TotalIRLen = 9, IRPrint = 0x0011 >0x30 JTAG> >0x210 JTAG> >0x40 JTAG> >0x40 JTAG> >0x40 JTAG> >0x30 JTAG> >0x40 JTAG> >0x40 JTAG> >0x40 JTAG> >0x40 JTAG> >0x40 JTAG> >0x40 JTAG> >0x40 JTAG> >0x40 JTAG> >0x40 JTAG> >0x40 JTAG> >0x40 JTAG> >0x2F8 JTAG>TotalIRLen = 9, IRPrint = 0x0011 >0x30 JTAG> >0x210 JTAG> >0x70 JTAG> >0x40 JTAG> >0x40 JTAG> >0x40 JTAG> >0x50 JTAG> >0x80 JTAG> >0x40 JTAG> >0x30 JTAG> >0x40 JTAG> >0x40 JTAG> >0x30 JTAG> >0x40 JTAG> >0x50 JTAG>
    19. Found Cortex-M4 r0p1, Little endian. -- CPU_WriteMem(4 bytes @ 0xE0002000) -- CPU_ReadMem(4 bytes @ 0xE000EDF0) -- CPU_ReadMem(4 bytes @ 0xE0002000)FPUnit: 6 code (BP) slots and 2 literal slots -- CPU_ReadMem(4 bytes @ 0xE000EDFC) -- CPU_ReadMem(4 bytes @ 0xE0001000) -- CPU_WriteMem(4 bytes @ 0xE0001000) -- CPU_ReadMem(4 bytes @ 0xE00FF010)TPIU fitted. -- CPU_ReadMem(4 bytes @ 0xE00FF014)ETM fitted. -- CPU_ReadMem(4 bytes @ 0xE00FF018) -- CPU is running -- CPU_WriteMem(4 bytes @ 0xE000EDF0)
    20. -- CPU is running -- CPU_WriteMem(4 bytes @ 0xE000EDFC) -- CPU is running -- CPU_WriteMem(4 bytes @ 0xE000ED0C) -- CPU is running -- CPU_ReadMem(4 bytes @ 0xE000EDF0) -- CPU is running -- CPU_ReadMem(4 bytes @ 0xE000EDF0) -- CPU is running -- CPU_WriteMem(4 bytes @ 0xE000EDF0) -- CPU is running -- CPU_WriteMem(4 bytes @ 0xE000EDFC) -- CPU is running -- CPU_ReadMem(4 bytes @ 0xE000EDF0) >0x80 JTAG> >0x40 JTAG> >0x30 JTAG> >0x40 JTAG> >0x50 JTAG> >0x40 JTAG> -- CPU_WriteMem(4 bytes @ 0xE000EDFC)
    21. -- CPU_WriteMem(4 bytes @ 0xE0001028) -- CPU_WriteMem(4 bytes @ 0xE0001038) -- CPU_WriteMem(4 bytes @ 0xE0001048) -- CPU_WriteMem(4 bytes @ 0xE0001058) -- CPU_WriteMem(4 bytes @ 0xE0002000) (0671ms, 0961ms total)
    22. T1DC0 000:961 JLINK_GetIdData(...) ScanLen=9 NumDevices=2 aId[0]=0x4BA00477 aIrRead[0]=0 aScanLen[0]=0 aScanRead[0]=0 (0000ms, 0961ms total)
    23. T1DC0 000:961 JLINK_JTAG_GetDeviceID(DeviceIndex = 0) returns 0x4BA00477 (0000ms, 0961ms total)
    24. T1DC0 000:961 JLINK_JTAG_GetDeviceInfo(DeviceIndex = 0) returns 0x00 (0000ms, 0961ms total)
    25. T1DC0 000:961 JLINK_JTAG_GetDeviceID(DeviceIndex = 1) returns 0x6413041 (0000ms, 0961ms total)
    26. T1DC0 000:961 JLINK_JTAG_GetDeviceInfo(DeviceIndex = 1) returns 0x00 (0000ms, 0961ms total)
    27. T1DC0 000:961 JLINK_GetDeviceFamily() returns 14 (0000ms, 0961ms total)
    28. T1DC0 000:961 JLINK_GetDeviceFamily() returns 14 (0000ms, 0961ms total)
    29. T1DC0 000:961 JLINK_GetDeviceFamily() returns 14 (0000ms, 0961ms total)
    30. T1DC0 000:961 JLINK_GetDeviceFamily() returns 14 (0000ms, 0961ms total)
    31. T1DC0 000:961 JLINK_Halt() returns 0x00 (0000ms, 0961ms total)
    32. T1DC0 000:961 JLINK_GetSpeed() returns 0x20 (0000ms, 0961ms total)
    33. T1DC0 000:961 JLINK_SetMaxSpeed() >0x38 JTAG> (0003ms, 0964ms total)
    34. T1DC0 000:964 JLINK_BeginDownload(Flags = 0x03) (0000ms, 0964ms total)
    35. Closed
    Display All


    Where normally the writing of the code blocks begins is just nothing. When I pass the elf-file to the ielftool by IAR then everything seems to be fine with the file. The tool does not complain about any errors. But also the processed file is not useable for debugging.
  • Hi,

    So far, the log output looks okay.
    The JLINK_BeginDownload() function so far does nothing except resetting / initializing some DLL internal variables.
    If you can provide the ELF file you are using, we will try to reproduce it here.
    For this, it would also be helpful to get information about the exact version of EWARM, you are using (V6.40.1, 40.2, ...)


    Best regards
    Alex
    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.
  • Hi,
    I also created a trouble ticket at IAR but they did not respond with anything helpful yet. I think its more a C-Spy problem, because the debugger must read the flash data from the binary file and pass it to the J-Link api. At first I used the IAR version 6.50.2.4585 but on behalf of IAR I updated to version 6.70.1.5794 which had no positive effect.

    I already made a test project which is very minimal and shows the fault. Attached you will find the elf-file that is created with the 6.70.1 version.

    regards Dirk
    Files
    • IAR-Test-elf.zip

      (555.89 kB, downloaded 711 times, last: )
  • Hi,

    Thanks for letting us know.
    Good to hear that it is working now :)


    Best regards
    Alex
    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.