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

Simulation Debugging Issue with GNU ARM

I'm using Keil 5.34.

I have created a project for the Texas Instruments TM4C123GH6PM. I have NOT enabled any software components, as I wish to write my own startup files etc.

In Project -> Manage -> Project Items | Folders/Extensions I have enabled 'Use GCC Compiler (GNU) for ARM projects'

As per the ARMV8 manual, the SP is at 0x00000000 and the IP at 0x00000004:

stack_ptr_addr = 0x20007FFF;
.word stack_ptr_addr
.word main

.section .text
main:
MOV r0, #1
MOV r1, #2
ADD r2, r0, r1

My linker script is:

MEMORY
{
rom (rx) : ORIGIN = 0x00000000, LENGTH = 0x0003FFFF
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00007FFF
}

SECTIONS
{
.text :
{
*(.text*)
} > rom
}

I build with:

arm-none-eabi-gcc -Wl,-Tlinker.ld -mcpu=cortex-m4 -mthumb -gdwarf-2 -O0 -mapcs-frame -mthumb-interwork -ffreestanding -nostdlib another.s -o Objects\another.elf

arm-none-eabi-objcopy -O binary Objects\another.elf Objects\another.bin

My debug options are:

When I debug under the simulator I get the correct starting screen:

However, when I hit Step Over, the cursor does not advance to the next instruction and the time (t1) at the bottom right of Keil advances without bounds. So in effect, hitting Step Over just causes the program to run in an infinite loop.

I know that this board is supported as Keil can debug it when I use it's startup files and default ARM toolchain.

Any help would be greatly appreciated.

Thanks.