I have followed examples in the documentation (which was surprisingly clear and well documented so Kudos), however i keep getting a type error if I add the

Code: Select all

`bx(lr)`

Code: Select all

```
TRUE = const(1)
@micropython.asm_thumb
def asm_process(r0, r1, r2):
vldr(s1, [r2, 4]) # Start Bit
vcvt_s32_f32(s0, s0)
vldr(s2, [r2, 8]) # length
vcvt_s32_f32(s1, s1)
vldr(s3, [r2, 12]) # scaling
vldr(s4, [r2, 16]) # wrong_format_flag
mov(r4, TRUE) # required as vmov requires register not constant
vmov(s10, r4)
b(START)
label(CONVERT)
push({lr}) # push to stack for inner loop
add(r4, r0, r1)
sub(r4, 1)
label(CONVERTLOOP)
#convert data format code
cmp(r4, r0) #check how many bytes left to convert
bpl(CONVERTLOOP)
pop({lr})
bx(lr) #TypeError: function doesn't take keyword arguments
# b(MAINPROCESS)
label(START)
vcmp(s4, s10) #check if flag set
vmrs(APSR_nzcv, FPSCR) #move comparison from FPU
beq(CONVERT)
label(MAINPROCESS)
#rest of code
```

Code: Select all

`TypeError: function doesn't take keyword argument`

I assume I'm doing something obviously wrong, but I just can't work out what it is! Any help would be hugely appreciated.