[SOLVED] Stack pointer is setup to incorrect alignment

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

  • [SOLVED] Stack pointer is setup to incorrect alignment

    Hello
    I'm using
    - J-Link V6.52b
    - NXP MK10DX128xxx7 as target
    - IAR Workbench for ARM 8.11.3.13984
    - Windows 7 Prof., SP 1
    When using Download and Debug I always get the
    Warning: Stack pointer is setup to incorrect alignment. Stack addr = 0x20003FF7
    Afterwards the C-program is ready to run at main(), and upon Go it seems to work correctly.
    My possibly relevant debugger settings are:
    - Debugger > Download: Default, nothing selected
    - J-Link/J-Trace > Setup: Reset 'Normal'
    - J-Link/J-Trace > Connection: USB, JTAG
    Attached are the debug log and the communication log.

    Any suggestion on how to avoid this warning?
    Files
    • cspycomm.log

      (37.72 kB, downloaded 511 times, last: )
    • DebugLog.txt

      (3.87 kB, downloaded 560 times, last: )
  • Hello,

    Thank you for your inquiry.
    Please note that IAR Workbench is no SEGGER product so we can't help you out here.
    We suggest contacting IAR support instead.

    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 Nino for your hint.
    The IAR support let me check the linker file. There I found a definition for the 'Initial Supervisor SP' (VECTOR_000) evaluating to 0x20003FF7. But the initial SP must be 8-byte aligned. Observing this rule solves the problem.
    (I didn't check the linker file earlier because I took the project from one of my colleagues who used an I-Jet instaed of a J-Link. With the I-Jet he didn't see this warning.)
    So you can close this thread.
    Kind regards
    Peter
  • Hello Peter,

    Good to hear that you are up and running again.
    It appears that I-Jet simply ignores the error and works around it.
    We on the other hand will tell you if the IDE tells J-Link something "illegal" to do ;)

    This thread will be marked as solved now.

    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.