Skip to content

@micropython.asm_thumb code fails with an internal sim error #81

@microbit-matt-hillsdon

Description

@microbit-matt-hillsdon

E.g.

@micropython.asm_thumb
def asm_add(r0, r1):
    add(r0, r0, r1)

print(asm_add(1, 2))

Results in:

instrument.ts:109 RuntimeError: table index is out of bounds
    at 004b255a
    at 004b255a
    at 004b255a
    at ret.<computed> (firmware.js:1948:35)
    at firmware.js:1045:22
    at invoke_iiiii (firmware.js:2459:12)
    at imports.<computed> (firmware.js:1914:35)
    at 004b255a
    at 004b255a
    at 004b255a

Ideally we'd fail cleanly saying it wasn't supported but only when the relevant code is run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions