jlink basic on freescale imx6 multicore

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

  • jlink basic on freescale imx6 multicore

    hi, all

    writing here because support e-mail on the site does not seems to work. maybe 400$ price is too small for
    customer support, or forum is more proper place for questions...

    i am trying to use jlink basic to work with freescale imx6 quad core microprocessor.

    the shop i bought it had the picture of ultra model on the web site lib.chipdip.ru/321/DOC000321562.jpg,
    but when i am bought it i saw that this is a "base" model, which has only gdb license included.

    the questions i send to support e-mail some time ago are
    1) is the multicore supported
    - my ansver - looks like no. if i am debugging multicore target, and doing like
    tmp = get_cpu_number()
    if ( tmp ==1 )
    nop
    else if (tmp==2)
    nop
    etc.. and putting breakpoints to those nop's only first one is working, which means core

    and if i am doing like this
    if ( tmp ==1 )
    cpu1_conter++;
    else if (tmp==2)
    cpu2_conter++;
    i can see all the counters are incremented.
    watchpoint also is working only for first cpu. i was unable to catch point where cpu2_counter is written

    the question is it planned to make support for 2-4 freescale cores? or maybe some other hw instead of
    generic Cortex-A9 will work for multicore?

    2) do i need upper model, and can i upgrade it paying for firmware upgrade only, not involving hw shipping
    - i still do not know the answer

    3) which debugger can i use
    - gdb server and clients are kind of working. but j-link commander is much more stable.

    4) If i want to see execution history before device goes to exception (?is that thing is called
    tracebuffer?), which flavor of jlink i need to buy? or event that one will work in some other mode?

    5) one more issue. jtag can not assert reset correctly. and if i am resetting my board externally it fails to stop.
    so only way to work with it is attach to running process. that's kind of ok, because i can set the breakpoint in the
    bootloader at the end of copy main sw, and start debugging from that point, but better to have it working

    The post was edited 1 time, last by aaa408 ().

  • Hi,

    writing here because support e-mail on the site does not seems to work. maybe 400$ price is too small for customer support, or forum is more proper place for questions...

    Which address did you write to?
    The J-Link Team did not receive any i.MX6 related e-mail.

    he shop i bought it had the picture of ultra model on the web site lib.chipdip.ru/321/DOC000321562.jpg, but when i am bought it i saw that this is a "base" model, which has only gdb license included.
    I do not know where chipdip take the picture from, but it looks like it comes from Atollic...
    atollic.com/index.php/jtag-emulators
    Not even sure if chipdip.ru is allowed to use this picture...
    Anyhow, the product description does not say anything about ULTRA / ULTRA+

    1) is the multicore supported - my ansver - looks like no. if i am debugging multicore target, and doing like
    Well, your answer is not correct.
    Multi-core is supported. You need once debugging instance per core. So each instance is debugging one core.
    So to debug all cores in parallel, you will need 4 debugging instances (most IDEs are not capable of handling more than one core in one instance and currently the J-Link DLL also is not).
    Related: Getting J-Link working with i.MX6Q

    3) which debugger can i use - gdb server and clients are kind of working. but j-link commander is much more stable.
    We are not aware of any problems with GDBServer. What problems do you see?

    5) one more issue. jtag can not assert reset correctly. and if i am resetting my board externally it fails to stop. so only way to work with it is attach to running process. that's kind of ok, because i can set the breakpoint in the bootloader at the end of copy main sw, and start debugging from that point, but better to have it working
    You *must* select the device in whatever software you are using...
    The i.MX6 is special regarding reset, so J-Link needs to know what device it connects to.

    How to start your instance of J-Link Commander:
    JLink.exe -device MCIMX6Q4 -if JTAG -speed 4000


    - 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, Alex

    thank you very much for quick reply

    >Which address did you write to?
    i think the e-mail was info@segger.com from the web site



    >Anyhow, the product description does not say anything about ULTRA / ULTRA+

    what i done before buying was look at that picture and tried to see same product on Segger web site.
    but if it will work finally this one is even better, because it is cheaper in case if we decide to buy some more boxes.


    >You *must* select the device in whatever software you are using...
    >The i.MX6 is special regarding reset, so J-Link needs to know what device it connects to.



    all my experiments was with "Cortex A9" option which was identified by default, so you probably can just ignore this.

    the problem with GDB was like that. it was trying to read from 0 every time when i was trying to connect gdb client (i
    was using IDA pro as gdb client (the problem with it that they do not have startup script for now, but it is possible to do
    monitor commands from special window) and some prebuilt arm command line gdb for windows.
    it was successfully connecting like 1 time of 100 only. finally i found that the problem was in "init regs on start" checkbox. when i was trying
    to attach to target, it was setting PC to 0 and breaking execution flow. the jlink commander was working just fine for attach, so
    i was just debugging in it...


    >You *must* select the device in whatever software you are using...

    oh, that's probably the issue. which one should i pick? like if i am using sabre SD board with micro marked as
    mcimx6q6avt10ao, should i use one you suggested
    JLink.exe -device MCIMX6Q4 -if JTAG -speed 4000

    or maybe MCIMX6Q6 ?

    >Well, your answer is not correct.
    >Multi-core is supported. You need once debugging instance per core. So each instance is debugging one core.
    >So to debug all cores in parallel, you will need 4 debugging instances (most IDEs are not capable of
    >handling more than one core in one instance and currently the J-Link DLL also is not).
    >Related: Getting J-Link working with i.MX6Q



    that's sounds really interesting, but i am not sure if understand how to do it.
    i understand that should run 4 instances of GDB and connect to 4 GDB clients somehow, but the windows GDB server does not seems like
    have the setting for pick a CPU core and debug port for connection? Or i should first run in 1-rst gdb server until the point when the new
    core started, and attach to it somehow?
  • ok. i was using the MCIMX6Q4 for jlink commander (still not sure if it is correct or not). if i am doing
    >r
    command, the board is resetting and sitting in some small address like pc=0x00000577
    i am able to do
    >g
    at that point and the board is starting. but finally it hangs at some point after my multicore app starts

    basically i do not need to do any download, because my stuff in on SD card, i need just run the thing and stop on breakpoint where it is needed. could you please advice the gdb startup script for my case?

    and is it possible to explain multicore debug little bit more? or should i use previous post for this question?
  • if anybody interested, gdb is working much better for me now. not sure if it is due to --device setting or due to i am opening-closing gdb server app after each board reset. it would be nice to know how to setup the key or script for the command line version to avoid "registers init" on attach.
  • aaa408 wrote:

    ok. i was using the MCIMX6Q4 for jlink commander (still not sure if it is correct or not). if i am doing
    >r
    command, the board is resetting and sitting in some small address like pc=0x00000577
    i am able to do
    >g
    at that point and the board is starting. but finally it hangs at some point after my multicore app starts



    i understand that part now. seems like my multicore code start is not 100% correct. the problem was in the GPR3, GPR5 and GPR7 regs.
    if i am doing jtag reset at the time of multicore starts, them have !=0 values and the thing hangs on the next run. if i am cleaning them manually in jlink console or in the bootloader code, the thing runs just fine after that.

    still cannot understand how to use multicore debug (i e run multiple instances of jlink gdb server) i cant understand the way to say to gdbserver which core connect to.