0

Hi I have a question about the order of declaration variables. Little example. If in declaration i write:

    .data
    .align  0
res:    .long 0
num:    .long   7
var2:   .short  30

the program works, but if I write this:

    .data
    .align  0
    res:    .long 0
    var2:   .short  30
    num:    .long   7

the program don't work: for example I can't do a simple

ldr     r5, =num
ldr     r5, [r5]

with the second configuration. the error is: no source available for "0x20010"

I'm using eclipse on a processor am335x Thx

  • 2
    That looks like an alignment issue, but the error message is strange. – Jester Jan 05 '16 at 14:37
  • what is an alignment issue? I don't understand very well the meaning of .aling –  Jan 05 '16 at 14:47
  • See this: http://stackoverflow.com/questions/20926386/what-is-non-aligned-access-arm-keil – Ville Krumlinde Jan 05 '16 at 19:46
  • That looks more like a message from a debugger stopping due to a breakpoint or signal and trying to show the source line of the instruction it's stopped at, rather than whatever error actually caused it to stop in the first place. – Notlikethat Jan 05 '16 at 20:32
  • SOLVED, if some one is interested I explain here: Is a problem of alignment, because I tough that one time you write the directive .aligne this is for all the next command, but is not like that. So if I write .aligne 4 before num it works –  Jan 16 '16 at 12:01

1 Answers1

0

SOLVED, if some one is interested I explain here: It's a problem of alignment, because I tough that once you write the directive .aligne this is for all the next commands, but is not like that. So if I write .aligne 4 before num it works.