This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123GH6PM: Code generated in data area

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: EK-TM4C123GXL

Using Keil uVision 4 IDE. My test program consists of a single line of executable code which produces an assembly error: 

Test.s(7): error: A1186E: Code generated in data area

This is the complete listing:

;Test.s
; Test short program in assembly
;
THUMB
AREA CODE, READONLY
Start
mov r0, #1
ALIGN
END

I've tried uninstalling the IDE and re-installing it to no avail.

Any comments appreciated

ga5941@gmail.com

  • Hi,

      Can you show your test code? It looks like you are missing the stack pointer and the reset vector. Please note that after reset the CPU will jump to the address 0 and the address 0 must contain a valid stack pointer and address 4 must contain a valid reset vector. I will suggest you start your TM4C123 evaluation with some examples that comes with the TivaWare library. The easiest examples to start are the blinky or the hello program. You can find these examples in <TivaWare_Installation>/examples/boards/ek-tm4c123gxl/blinky or /examples/boards/ek-tm4c123gxl/hello.