This is a test repository to show how easy it is to compile applications for the Sega Dreamcast, with just a browser.
- Click on the green "Code" button
- Select the "Codespaces" Tab
- Click on "Create codespace on main"
- the sh-elf/arm compilers available in the terminal,
- the kos environ.sh sourced,
- dc-tool-ip installed
- Helper commands to launch in the Terminal (inside your codespace: File-View-Terminal):
- To add the Kos examples to your VSCode workspace:
- code -a /opt/toolchains/dc/kos/examples
- To go to the kos folder:
- cd /opt/toolchains/dc
- To compile an example & send the .elf to your broadband adapter (BBA): something like:
- cd /opt/toolchains/dc/kos/examples/dreamcast/hello
- make
- dc-tool-ip -t 192.168.1.200 -x hello.elf
- (with 192.168.1.200 being the ip address of your BBA)
- Notes:
- By default, Codespaces can only access the BBA if it is reachable via the internet (ie, addresses like 192.168.0.xxx, 192.168.1.xxx or 10.0.0.xxx, ... are not reachable)
- If you want Codespaces to be able to access the BBA when it is only reachable via your internal network, check this link
- To add the Kos examples to your VSCode workspace:
- When you have finished working with your codespace, click on the green "Code" button again, and on the 3 dots next to your codespace to stop your container from running. This will save you some free execution minutes (default idle timeout is 30 minutes, and you get 120 free core hours per month).
- This is just a very simple test (by somebody who just started using Docker & Codespaces), hence could be improved a lot, eg by:
- including (regular) gcc, dc-tool-ip, gdb, ... in the docker image
- trying to keep the docker image as small as possible, and/or use several separate images
- automate the building of the toolchain / kos on a regular base, and put that in docker image(s), to benefit from the latest changes
- adding extra VSCode configuration
- adding integration with an emulator to be able to test things without real hardware
- adding compilation for Naomi
- adding a prebuild
- selecting a more powerful machine with more cores (default = 2 cores)
- If you want to use Codespaces in your own github repository, just
- add a ".devcontainer" folder, with
- at least a "devcontainer.json" file,
- (optionally, a Dockerfile if you want to specify your commands to build a container, instead of using a pre-built Docker image)
- Tip: when launching your codespace for a 2nd time, be sure to do a git pull at the start inside your codespace to be in line with your repo, it will save you some problems.
- add a ".devcontainer" folder, with
- To Kazade for providing the Docker image !
- To Sizious for adding a Dockerfile to Kos