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

How to correctly exit a USPI application. #36

Open
Java6502 opened this issue Nov 6, 2023 · 1 comment
Open

How to correctly exit a USPI application. #36

Java6502 opened this issue Nov 6, 2023 · 1 comment

Comments

@Java6502
Copy link

Java6502 commented Nov 6, 2023

I am currently in the testing phase for an application that will be using uspi. On my RPI 2B, I have a simple monitor program that allows me to view memory locations, execute code at a particular memory address, and most importantly load code via a serial connection for execution at memory location 0x8000.

Given the keyboard sample included with uspi, I am trying to figure out the correct way to exit the application (break out of the key pressed handler) so I can return from main. Once I return from main I should be in the sysinit.c code, where I should be able to simply ignore the call to halt() and branch to the start location of my monitor program. Currently this doesn't seem to work. My monitor code starts at 0x200000, and I wonder if the memory management of the environment is overwriting the monitor code. Would you be able to provide a memory map usage for the uspi environment.

Just to be clear, my kernel7.img loads my monitor/bootloader, pads a bunch of space and starts executing the monitor code at 0x200000. When I load the sample keyboard program from uspi, the bootloader loads it at 0x8000. I want to basically get out of the program and back to the start of the monitor ready to upload a new sample. I am trying to avoid having to keep unplugging the power to reset the board.

Thanks
Jonathan

@rsta2
Copy link
Owner

rsta2 commented Nov 7, 2023

Unfortunately undoing USPiInitialize() and exiting from an USPIEnv application is not implemented and it is not trivial to implement it. Because my focus is now on porting Circle to the new RPi 5, unfortunately I also do not have the time to add this at the moment.

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