Hi, I’m really new to PlatformIO so please be kind and patient. When I debug my code, stepping through each instruction the register view doesn’t update - all the values remain 0. I assume that it is meant to update. Any help fixing whatever I have done incorrectly is greatly appreciated. I have tried looking for answers here and with a general web search as well.
My setup: Pop OS, Vscode with PlatformIO and C/C++ extensions, physical Intel CPU computer (not virtual machine).
My project configuration (I am using qemu instead of a physical board):
[env:hifive1]
platform = sifive
board = hifive1
framework = freedom-e-sdk
debug_tool = qemu
build_type = debug
My test application is trivial so I can ensure my setup works
main.c:
extern int asm_add(int left, int right);
int main()
{
int left = 3;
int right = 5;
int result = 0;
result = asm_add(left, right);
result++;
return result;
}
asm_add.S:
.global asm_add
.align 2
.text
asm_add:
add a0, a0, a1
ret