Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.

We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.

Thank you for your understanding.


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

I cannot write the sp register in the monitor mode

I use a Cortex-A7 board and write start up code.

I try to use Security Extension.

I use `smc` instruction and make cpu mode monitor mode.

In the monitor handler, I tried to changed stack pointer value for calling other functions.

But after execute `ldr sp, =_stack_start`, sp value is 0x0 (Of course, _stack_start is not 0x0 and I check it in the assembler code).

Therefore, after `push` some registers and `pop` those registers, the data abort excetpions occurred!

How can I change the sp value?

Parents
  • Thank you for providing information.

    I installed OpenOCD from the package manager, but it is the old version.

    Threfore, I installed the 0.9.0-rc1 from the git repository.

    I find the configuration file for Raspberry Pi 2, which has four Cortex-A7 cores.

    https://gist.githubusercontent.com/jitomesky/4b564b33ef774d359d9d/raw/rpi2.cfg

    I tried to connect to the board with SEGGER J-Link with this configuration file.

    https://gist.github.com/garasubo/d3ff25e6617411412450

    But after connecting gdb, it fails as follow:

    $ sudo openocd  -f ocd.cfg

    Open On-Chip Debugger 0.9.0-rc1 (2015-04-27-13:13)

    Licensed under GNU GPL v2

    For bug reports, read

        http://openocd.org/doc/doxygen/bugs.html

    adapter speed: 1000 kHz

    adapter_nsrst_delay: 400

    Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.

    Info : J-Link V9 compiled Apr 21 2015 18:10:40

    Info : J-Link caps 0xb9ff7bbf

    Info : J-Link hw version 93000

    Info : J-Link hw type J-Link

    Info : J-Link max mem block 70896

    Info : J-Link configuration

    Info : USB-Address: 0x0

    Info : Kickstart power on JTAG-pin 19: 0x0

    Info : Vref = 1.788 TCK = 1 TDI = 0 TDO = 0 TMS = 0 SRST = 1 TRST = 1

    Info : J-Link JTAG Interface ready

    Info : clock speed 1000 kHz

    Info : JTAG tap: ls1021a.tap tap/device found: 0xa21c64cd (mfg: 0x266, part: 0x21c6, ver: 0xa)

    Warn : JTAG tap: ls1021a.tap       UNEXPECTED: 0xa21c64cd (mfg: 0x266, part: 0x21c6, ver: 0xa)

    Error: JTAG tap: ls1021a.tap  expected 1 of 1: 0x5ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x5)

    Info : JTAG tap: auto0.tap tap/device found: 0x5ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x5)

    Info : JTAG tap: auto1.tap tap/device found: 0x06b0001d (mfg: 0x00e, part: 0x6b00, ver: 0x0)

    Error: Trying to use configured scan chain anyway...

    Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 2 -expected-id 0x5ba00477"

    Error: auto0.tap: IR capture error; saw 0x0000 not 0x0001

    Warn : Bypassing JTAG setup events due to errors

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Info : accepting 'gdb' connection on tcp/3333

    Error: Register map is not available yet, the target is not fully initialised

    Could you tell me how to configure for this board?

Reply
  • Thank you for providing information.

    I installed OpenOCD from the package manager, but it is the old version.

    Threfore, I installed the 0.9.0-rc1 from the git repository.

    I find the configuration file for Raspberry Pi 2, which has four Cortex-A7 cores.

    https://gist.githubusercontent.com/jitomesky/4b564b33ef774d359d9d/raw/rpi2.cfg

    I tried to connect to the board with SEGGER J-Link with this configuration file.

    https://gist.github.com/garasubo/d3ff25e6617411412450

    But after connecting gdb, it fails as follow:

    $ sudo openocd  -f ocd.cfg

    Open On-Chip Debugger 0.9.0-rc1 (2015-04-27-13:13)

    Licensed under GNU GPL v2

    For bug reports, read

        http://openocd.org/doc/doxygen/bugs.html

    adapter speed: 1000 kHz

    adapter_nsrst_delay: 400

    Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.

    Info : J-Link V9 compiled Apr 21 2015 18:10:40

    Info : J-Link caps 0xb9ff7bbf

    Info : J-Link hw version 93000

    Info : J-Link hw type J-Link

    Info : J-Link max mem block 70896

    Info : J-Link configuration

    Info : USB-Address: 0x0

    Info : Kickstart power on JTAG-pin 19: 0x0

    Info : Vref = 1.788 TCK = 1 TDI = 0 TDO = 0 TMS = 0 SRST = 1 TRST = 1

    Info : J-Link JTAG Interface ready

    Info : clock speed 1000 kHz

    Info : JTAG tap: ls1021a.tap tap/device found: 0xa21c64cd (mfg: 0x266, part: 0x21c6, ver: 0xa)

    Warn : JTAG tap: ls1021a.tap       UNEXPECTED: 0xa21c64cd (mfg: 0x266, part: 0x21c6, ver: 0xa)

    Error: JTAG tap: ls1021a.tap  expected 1 of 1: 0x5ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x5)

    Info : JTAG tap: auto0.tap tap/device found: 0x5ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x5)

    Info : JTAG tap: auto1.tap tap/device found: 0x06b0001d (mfg: 0x00e, part: 0x6b00, ver: 0x0)

    Error: Trying to use configured scan chain anyway...

    Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 2 -expected-id 0x5ba00477"

    Error: auto0.tap: IR capture error; saw 0x0000 not 0x0001

    Warn : Bypassing JTAG setup events due to errors

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Warn : Invalid ACK 0 in JTAG-DP transaction

    Info : accepting 'gdb' connection on tcp/3333

    Error: Register map is not available yet, the target is not fully initialised

    Could you tell me how to configure for this board?

Children