When attempting to build a project w/ an assembly function call I get the noted error.
in a header
#ifndef leds_asm_isr_H_
#define leds_asm_isr_H_
extern "C" void ASM_ISR(uint32_t *, uint32_t **, uint32_t **, uint32_t **, uint32_t const *, uint32_t);
#endif /* leds_asm_isr_H_ */
in "main"
#include "leds_asm_isr.h"
void TCC0_Handler(){ // Interrupt Service Routine (ISR) for timer TCC0
ASM_ISR(&iCount, &Strip4_mask_pntr, &Strip4_pntr, &Strip4_base_pntr, &Strip4_Num_LED, CC3_Addr);
}
and in the asm func
.text
.global ASM_ISR
/* R0 = iCount addr, R1=Strip4_mask_pntr addr, R2 = Strip4_pntr addr, R3 = Strip4_base_pntr addr, Stack = Strip4_Num_LED addr, CC addr */
ASM_ISR:
cpsid i @ disable all interrupts
ldr r4, [r0, #0] @ get iCounter
cmp r4,#0 @ is iCount = 0 ?
beq ext @ exit routine if so
pop {r4} @ CC Addr
pop {r5} @ Num LEDs Addr
push {r0} @ Free r0 | iCount Addr on stack
ldr r7, = 0x38 @ value for 1 CC PWM LED
lsl r7, r7, #6 @ Position for CC reg
ldr r0, [r1, #0] @ get mask
ldr r6, [r2, #0] @ get array element
and r6, r6, r0 @ test bit
beq jmp1 @ if it's 1 jmp
lsr r7, r7, #1 @ value for 0 CC PWM LED
jmp1: str r7, [r4, #0] @ set new CC val | open regs r4, r6
lsr r0, r0, #1 @ shift mask bit
cmp r0, #0 @ Did we empty mask reg
bne ext @ if not we're done
ldr r4, = 0x80 @ reinitialize mask | open regs r6
lsl r4, r4, #16 @ 0x00800000
mov r6, r2 @ get array pointer address
add r6, #4 @ increment array pntr address
lsl r5, r5, #2 @ multi num leds x4 for address calculation
add r5, r5, r3 @ point to end of array
cmp r6, r5 @ are we at the last array element
bne jmp2 @ if not jmp
ldr r6, [r3, #0] @ array pointer back to top of array
jmp2: str r4, [r1, #0] @ mask reg to memory
str r6, [r2, #0] @ array pointer to memory
pop {r0} @ get iCount address
ldr r4, [r0, #0] @ get iCount
sub r4, #1 @ Decrement iCount
str r4, [r0, #0] @ iCount to memory
ext: cpsie i @ Enable interrupts
bx lr @ Exit
.end
both the .ino and .S are members of one "solution" in Atmel Studio ..
Asm compiles fine
.ino compiles fine (if I comment out the asm call)
I'm at a loss .. I do note that the VS build, and the VM build store files at different locations .. ??