This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

J-Link lite under Eclipse

Hello,

I am porting a blinky program to my custom board having nRF51822. The program is compiled under Eclipse (+ GCC) and is downloaded to the board via J-Link Lite. But the program is halted as follows: ...Target halted (PC = 0xFFFFFFFE). I would like to know the reason and how to solve it.

I have two boards as follows: Board A: PCA10028 (Nordic Development Kit including SEGGER J-Link OB) Board B: A custom board having nRF51822 (connected with J-Link Lite)

When I compiled the blinky program with Keil, the same executable file could be download to Board A and Board B, and the program could run well on both boards. However, when I compiled the program with Eclipse+GCC, the executable program could be download to Board A and run well on the board. For Board B, the program halted at 0xFFFFFFFE.

I think that the custom board plus J-Link Lite is probably similar to PCA10028 and this seems to be proven by running the same executable file compiled by Keil. I expected naturally that GCC compiled program run on both boards. But the result is not so.

I am not sure the reason, but I assume that J-Link Lite has no GDB server capability but J-Link OB in PCA10028 has it. But if so, with Keil, why does the same program run on both boards?

I would appreciate having your advice and suggestion how to solve it. Than you.

Parents
  • Do you have a different version of the nrf51822 on your custom board, one with a different amount of RAM in it than on the PCA10028? If you do then you need to change the linker map file when you're using GCC so that the stack stays within the actual RAM on the chip. That's exactly the error I'd expect to see if you're trying to initialize the stack where there is no RAM. The GCC linker files tend to put the stack at the top of all available RAM, so if you get that wrong, the program won't run. Either Keil doesn't do that, or you have specified a smaller-RAM version of the chip when you're compiling in Keil so the image works on either board.

    And J-Link Lite has GDB server and all the other capabilities of the other JLinks, a Segger is a Segger is a Segger ,they all work about the same.

Reply
  • Do you have a different version of the nrf51822 on your custom board, one with a different amount of RAM in it than on the PCA10028? If you do then you need to change the linker map file when you're using GCC so that the stack stays within the actual RAM on the chip. That's exactly the error I'd expect to see if you're trying to initialize the stack where there is no RAM. The GCC linker files tend to put the stack at the top of all available RAM, so if you get that wrong, the program won't run. Either Keil doesn't do that, or you have specified a smaller-RAM version of the chip when you're compiling in Keil so the image works on either board.

    And J-Link Lite has GDB server and all the other capabilities of the other JLinks, a Segger is a Segger is a Segger ,they all work about the same.

Children
No Data
Related