I think before I get into writing other software, I should focus on a bootloader. I don't like to keep synthesizing my VHDL every time I want to change my program. I need to poke the RAM and execute the program, so I have to give it a memory location and a byte. And it would be VERY useful to have a readback function, but I could do this afterward. So I put together a list of things my bootloader needs to do:
- Echo characters back to uart (DONE!)
- Keep track of string entered
- Process backspace key (subtract one from string pointer if not zero)
- Process enter key (don't store in string)
- Echo command on a new line (DONE!)
- Jump to string processing
- Split string into parts: 1st character is command (W - write, R - read, J - jump) (anything else jumps back to top)
- Skip anything not a hexnumber (so I can have whitespaces and extra stuff for readability)
- Next four hexnumbers are the memory address
- If a write, next two hexnumbers are data to write to the above address
- if a jump command, set PC to entered memory address (begin executing!)
- If a read, grab the memory contents and output them to the uart (converting to ASCII)
So I have my task list here. It should be easy to test as I go. And I can use everything I've written so far.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.