Dr.-Ing. Martin Göttlicher wrote:

Hello,

while waiting for my msp430x149 device I did some tests of my code with msp430simu. When running the following code:

    int64_t a = 1152921504606846976LL;  // 2^60
    int32_t b = 1073741824L;            // 2^30
    int32_t c = (int32_t)(a / b);

the simulation stops with the following error message:

Traceback (most recent call last):
  File "./testing.py", line 107, in ?
    msp.start()
  File "./testing.py", line 88, in start
    self.step()
  File "./core.py", line 1129, in step
    apply(execfu, [self]+args)
  File "./core.py", line 817, in execRRC
    arg.set(r)
  File "./core.py", line 650, in set
    raise "not possible as destination"
not possible as destination

My question to the mspgcc-experts:

Did I make something wrong, is it a simulator problem or is the msp430x149 or the mspgcc not able to do this kind of calculations?

thats a simulator problem. i have not worked on it for quiet some time and i suspect that there are some smaller bugs in the instruction decoding (regarding the number of cycles). and it should not stop simulating anyway as the real taget cannot be stopped neither.

however its not related to the x149 device because all the MSP430x1xx and MSP430x4xx devices have the same instruction set.

note that msp430-gdb also includes a simu. select the remote "target sim".

chris


Reply via email to