This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Ulink2 download problem on Smartfusion2

My project uses Microsemi's Smartfusion2 SoC FPGA. After I got the hardware, I tested that using Microsemi's FlashPro, I am able to download hardware configurations using Flashpro11.3 and debug firmware using MicroSemi's Softconsole IDE.

When I tried to use uVision and Ulink2, I am only able to erase the on board flash (eNVM), but not able to download firmware to the flash. Here is the error message:

Erase Done.
Programming Failed!
Error: Flash Download failed – “Cortex-M3”

Please advice as to where to begin to solve the problem!

Thanks a lot.

Jim

Parents Reply Children
  • JTAG vs SWD?

    Is this an Eval version, how large is the code?
    Any other messages prior to the failure?

    The method of flashing is to download load code to SRAM, and execute a small applet.

    If you program via your other tools, and NOT "Update Target Before Debugging", can you step through your code then?

    Turn off "run to main", see what runs, if the cpu appears functional.

  • I am using the Ulink2 JGAT/SW Adapter. The Port is chosen as SW.

    I have the Eval version on one computer but I tried on the full version on the other computer, it is exactly the same.

    The full message is as follows:

    Load "C:\\Microsemi\\AcquisitionNode\\Keil\\obj\\metisMSS_CM3_app.axf"
    Erase Done.
    Programming Failed!
    Error: Flash Download failed - "Cortex-M3"

    I am able to step through my code using Softconsole, and here is the message it dispays:

    source .gdbinit
    source C:/Microsemi/SoftConsole v3.4/Eclipse//../Sourcery-G++/share/gdbinit/microsemi-cortex-m3-target-gdbinit
    target remote | "C:/Microsemi/SoftConsole v3.4/Eclipse//../Sourcery-G++/bin/arm-none-eabi-sprite" flashpro:?cpu=Cortex-M3 "S:/EE/MD7_3G/MD7_Node_SF2/AcquisitionNode/SoftConsole/metisMSS_CM3/metisMSS_CM3_app/Debug"
    arm-none-eabi-sprite: Using memory map S:/EE/MD7_3G/MD7_Node_SF2/AcquisitionNode/SoftConsole/metisMSS_CM3/metisMSS_CM3_app/Debug/memory-map.xml
    arm-none-eabi-sprite: Target reset
    0x00001a24 in ?? ()
    load
    Loading section .vector_table, size 0x190 lma 0x20000000
    Loading section .init, size 0x620 lma 0x20000190
    Loading section .text, size 0xc0 lma 0x200007b0
    Loading section .data, size 0x10 lma 0x20000870
    Start address 0x20000190, load size 2176
    Transfer rate: 34 KB/sec, 544 bytes/write.
    Temporary breakpoint 1 at 0x200007e6: file ..\main.c, line 7.
    cont

    Temporary breakpoint 1, main () at ..\main.c:7
    7 a=0;

    I could not find where to config is to NOT "Update Target Before Debugging". Does the message above saying it is updated before debugging?

    I could not find where to toggle "run to main" either.

  • I'm not really interested in what SoftConsole does, you're describing a problem with uVision and ULINK connectivity, and I'm trying to determine if you have any credible debug connectivity via the ULINK.

    In uV4 you have the Project Options -> Debug pane, and the Project Options -> Utilities pane. From those you have configuration "options" including the ability to not run to main, allowing you to see ROM or startup code executing from reset, and the ability not to download code, so you can inject it via other means, or use what's already in the part, ie Flash or ROM, or whatever.

  • Got it. It runs to startup_m2sxxx.s. Then I Step Over many times, it runs to main().

  • Hi Westonsupermare, Can you advice where should I start to get the problem solved? Thanks.

  • Well your responses suggest that the ULINK connectivity is there, so you're back to the flashing algorithm and what's going on with that.

    Have you pursued your support options through Keil and Actel/MicroSemi? How about any colleagues or college staff setting the project requirements, or having direct usage experience?

    Does the version of Keil have some code size limitation related to it's license or evaluation? What specific version of uVision are you using?

    Do the direct Flash->Erase or Flash->Download menu commands function?

    Is this a standard development board others might have, or some custom board?

  • I have contacted both Microsemi and Keil. Microsemi says that they are not familiar with uVision. Keil goes through the uVision configuration with me, but they think they are all set up correctly. So bad that I don't know anyone that have direct usage experience at work.

    I have uVision license, so there should be any issue with code size. Flash->Erase says it erased OK. Flash->Download gives the error that I have described before.

    One thing I noticed is that after a full Chip Erase, I can still do the debugging process as you have suggested. Does that mean I actually have not erased anything in the flash?

    I have a Dev Kit, and works fine with uVision after getting rid of pull down resistor. I basically copied the design for the JTAG part. Maybe I should compare the signal waveform on the scope to see the difference.

  • Ok, beyond the JTAG/SWD interface pins, you should perhaps look at the power (supply/ground) and reset pins. Compare those to the working reference design. If that doesn't locate and issue start looking at other pins.

    Looking at the signals on the JTAG/SWD is like searching for a needle in a haystack, I'd try to look for more obvious issues first.

    What's the version number of the uVision being used here?

  • It is the latest version of uVision, V5.11.1.0.