IDE set up for 6809 on VS-code

Post Reply
Retro_Geek
Posts: 2
Joined: Thu Feb 08, 2024 7:35 pm

IDE set up for 6809 on VS-code

Post by Retro_Geek »

Hi

Thanks for producing some fascinating videos on your 6809 project.

I noticed you’re using VS code on windows with the 6x09 extension. I think this is a really great assembly programming environment for the 6809. I’ve successfully used vs-code to produce bin files with Retro-Assembler for the 6502 etc.

However, in order to compile for the 6809 I’ve tried to use the 6x09 extension myself and downloaded the pre-built windows binaries for LWTools (assembler) for which 6x09 is supposed to work with. Unfortunately despite my best efforts I cannot get
the vscode to work with the LWTOOLS lwasm assembler. I keep getting command editor errors. I’ve tried updating the path in the 6x09 extension settings and also the widows path setting in environment variables but sadly no joy. I’m certainly not a PC expert and am disappointed as the vs code with 6x09 extension editor works so well yet sadly won’t build the code for me to burn on to an eeprom. :cry:

Any ideas would be gratefully received! I even wonder if you’d be kind enough to produce a YouTube video on how you set up and configure your PC for programming environment for the 6809?! That would be really cool! ;)
User avatar
Editor
Posts: 249
Joined: Fri Nov 17, 2023 10:36 pm
Contact:

Re: IDE set up for 6809 on VS-code

Post by Editor »

Hi. Yes, I've also found VS Code, in combination with the 6x09 extension, to be a nice programming environment for my 6809 code.

I'm however currently using asm6809 as my preferred assembler (which supports both the 6809 and 6309).

You can find asm6809 here: https://www.6809.org.uk/asm6809/

To assemble, I've simply configured some "Tasks" to allow me to just select "Run Build Task..." (Xtrl+Shift+B), to run my external asm6809 command-lines (or "Run Task...").

e.g. I have added the following two "tasks" to tasks.json (for my particular workspace folder layout).

Code: Select all

        {
            "label": "Build with asm6809 - S19 output",
            "type": "shell",
            "windows": {
                "command": "..\\..\\asm6809\\asm6809.exe -S -o build\\${fileBasenameNoExtension}.S19 -l build\\${fileBasenameNoExtension}.lst ${relativeFile}"
            },
            "group": "build",
            "presentation": {
                "reveal": "never"
            },
            "problemMatcher": []
        },
        {
            "label": "Build with asm6809 - Bin output",
            "type": "shell",
            "windows": {
                "command": "..\\..\\asm6809\\asm6809.exe -B -o build\\${fileBasenameNoExtension}.bin -l build\\${fileBasenameNoExtension}.lst ${relativeFile}"
            },
            "group": {
                "kind": "build",
                "isDefault": false
            },
            "presentation": {
                "reveal": "never"
            },
            "problemMatcher": []
        }
I've setup as 2 different tasks, as I just want .s19 output for transfering to the CPU Card for testing in RAM, but I also wanted just a .bin when I'm targeting a ROM (or doing ROM image compares to verify I have original source etc.).

Hope this is of some assistance.
Retro_Geek
Posts: 2
Joined: Thu Feb 08, 2024 7:35 pm

Re: IDE set up for 6809 on VS-code

Post by Retro_Geek »

Hi

Thanks for the swift reply and helpful answer to my question. Interesting to see you’ve used the asm6809 assembler. I shall give that a go in the next few days. I’m new to VS code and certainly no expert on it but I will attempt to reconfigure the task json files as you have done.

Many thanks for your advice, much appreciated.

Cheers.
User avatar
Editor
Posts: 249
Joined: Fri Nov 17, 2023 10:36 pm
Contact:

Re: IDE set up for 6809 on VS-code

Post by Editor »

Retro_Geek wrote: Thu Feb 08, 2024 10:32 pm ... Interesting to see you’ve used the asm6809 assembler. I shall give that a go in the next few days. I’m new to VS code and certainly no expert on it but I will attempt to reconfigure the task json files as you have done. ...
I'm no VS Code expert either, but I have used it across various languages in the past.

Let us know how you get on, as I suspect this topic thread may potentially be helpful to others as well.

Have fun!
Post Reply