Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running new Assembly Code on PicoRV32 #241

Open
AshvinVaidyanathan opened this issue Jun 8, 2023 · 1 comment
Open

Running new Assembly Code on PicoRV32 #241

AshvinVaidyanathan opened this issue Jun 8, 2023 · 1 comment

Comments

@AshvinVaidyanathan
Copy link

I have been trying to figure out how to run my own asm_test.S file during the simulation. I have tried adding the file to the firmware directory and made changes to the Makefile so that my file shows up in the FIRMWARE_OBJS variable as firmware/asm_test.o. Then I made a target for my firmware/asm_test.o with the .S file as a pre-requisite and made the command the same as that of firmware/start.o. After running I am able to see the commands show up in firmware.hex but it's obviously not being executed because it's not called anywhere in the start.S file. My question is how can I make the start.S jump to the asm_test part of the code like it does for hello.c for example?

Thanks in advance

@prashant-pvip
Copy link

prashant-pvip commented Nov 16, 2023

Hi @AshvinVaidyanathan,
I believe it works the same way as hello.c. In start.S you are jumping on a label/function "hello" which is define inside hello.c. same way you can create a label inside asm_test(also make it global)file and once you test is done jump/return to the PC+4 from when you have jumped to this file. rest is same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants