This provides scaffolding for a new Picocomputer 6502 software project. Both
C and assembly examples of "Hello, world!" are included. Make sure
CMakeLists.txt points to your choice of main.c or main.s, then delete
the one you aren't using.
- VS Code - This has its own installer.
- A source build of CC65.
- The following tools installed from your package managers:
sudo apt install cmake python3 git build-essential
winget install -e --id Microsoft.VisualStudioCodewinget install -e --id Git.Gitwinget install -e --id Kitware.CMakewinget install -e --id GnuWin32.MakeAddC:\Program Files (x86)\GnuWin32\binto your PATH.- The current snapshot of CC65 -
Do not skip the step about adding the
bindirectory to your PATH. - Install Python by typing
python3in a command prompt, which will launch the Microsoft Store where you can start the installation. If Python runs, this has already been done - exit Python with Ctrl-Z plus Enter.
Go to the GitHub template and select "Use this template" then "Create a new repository". GitHub will create a clean project for you to start with. Then you can clone the repository and open the files.
$ git clone [path_to_github]
$ cd [to_where_it_cloned]
$ code .Install the recommended extensions when VS Code prompts you, choosing the
default or obvious choice for any other prompts. The tools we use in VS Code
are constantly improving and have their own documentation. The first problem
you might encounter is that no kit is configured, so begin by reading this
and choosing the [RP6502] kit:
https://code.visualstudio.com/docs/cpp/cmake-linux
The full documentation for the CMake plugin is here:
https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/README.md
"Start Debugging" (F5) will build your project and run it on a Picocomputer. Connect with a USB cable plugged into the RP6502-VGA USB port.
If you get a Python error about the communications device not being found,
edit .rp6502 in the project root. This file will be created the first time
you "Start Debugging" and will be ignored by git. You may also connect over
telnet by instead providing a hostname for the device and setting the key.
Once the program is running, a debug console becomes available on the terminal tab. It will say "Python Debug Console" because the rp6502.py tool is Python. Ctrl-A then X will exit. Ctrl-A then B will send a break.
Edit CMakeLists.txt to add new source and asset files. From here on, it's
standard C/assembly development for the 6502 platform.