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
  • I told you what the difference is in my answer. There are two possible differences either

    1. the Keil version was compiled with the profile for a 16kB chip and the GCC one was compiled with a link map for the 32Kb chip. The 16k version will run on either OR

    2. Keil puts the stack directly after the last block of allocated memory, which in the case of blinky is very low down, and doesn't use the rest of the 32Kb because it doesn't need it, however the GCC linker map always puts the stack at the very end of user memory (which is generally a good idea) so if you tell it you have the wrong amount of RAM, it doesn't work.

Reply
  • I told you what the difference is in my answer. There are two possible differences either

    1. the Keil version was compiled with the profile for a 16kB chip and the GCC one was compiled with a link map for the 32Kb chip. The 16k version will run on either OR

    2. Keil puts the stack directly after the last block of allocated memory, which in the case of blinky is very low down, and doesn't use the rest of the 32Kb because it doesn't need it, however the GCC linker map always puts the stack at the very end of user memory (which is generally a good idea) so if you tell it you have the wrong amount of RAM, it doesn't work.

Children
No Data