BartmanAbyss / vscode-amiga-debug

One-stop Visual Studio Code Extension to compile, debug and profile Amiga C/C++ programs compiled by the bundled gcc 12.2 with the bundled WinUAE/FS-UAE.
GNU General Public License v3.0
318 stars 40 forks source link

Make it easy to set up an Assembler project #24

Closed sebastianbergmann closed 4 years ago

sebastianbergmann commented 4 years ago

Right now it is very easy and convenient to create a C/C++ project: simply press Ctrl+Shift+P, select Amiga: Init Project, and you're all set. This is awesome!

But unless I am missing something (in which case: sorry!), there is no such easy way to create an Assembler project.

BartmanAbyss commented 4 years ago

What exactly are you trying to do? The default project is already set up for assembly. Just delete main.c and add a .s file (if that doesn't work with the 1.0 version from the Marketplace, try downloading a 1.1 preview from the Github releases)

sebastianbergmann commented 4 years ago

I tried that with the latest stable and now with the latest preview of 1.1: open empty directory, Ctrl+Shift+P, select Amiga: Init Project, delete main.c, create main.s, copy&paste http://coppershade.org/asmskool/Tut5.S into main.s, save, configure ROM in launch.json, and F5:

> Executing task: c:\Users\sb\.vscode\extensions\bartmanabyss.amiga-debug-1.1.0-preview21\bin\gnumake.exe -j4 <

Compiling support/gcc8_c_support.c
Assembling support/gcc8_a_support.s
Assembling support/depacker_doynax.s
Linking a.mingw.elf
c:/users/sb/.vscode/extensions/bartmanabyss.amiga-debug-1.1.0-preview21/bin/opt/bin/../lib/gcc/m68k-amiga-elf/10.1.0/../../../../m68k-amiga-elf/bin/ld.exe: obj/gcc8_c_support.o: in function `KPrintF':
C:/Users/sb/Downloads/Amiga/example/support/gcc8_c_support.c:67: undefined reference to `SysBase'
c:/users/sb/.vscode/extensions/bartmanabyss.amiga-debug-1.1.0-preview21/bin/opt/bin/../lib/gcc/m68k-amiga-elf/10.1.0/../../../../m68k-amiga-elf/bin/ld.exe: C:/Users/sb/Downloads/Amiga/example/support/gcc8_c_support.c:64: undefined reference to `SysBase'
c:/users/sb/.vscode/extensions/bartmanabyss.amiga-debug-1.1.0-preview21/bin/opt/bin/../lib/gcc/m68k-amiga-elf/10.1.0/../../../../m68k-amiga-elf/bin/ld.exe: obj/gcc8_c_support.o: in function `_start':
C:/Users/sb/Downloads/Amiga/example/support/gcc8_c_support.c:93: undefined reference to `main'
collect2.exe: error: ld returned 1 exit status 
gnumake: *** [Makefile:33: a.mingw.elf] Error 1
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command c:\Users\sb\.vscode\extensions\bartmanabyss.amiga-debug-1.1.0-preview21\bin\gnumake.exe -j4" terminated with exit code: 1.

This looks to me like the build script tries to compile a C program.

BartmanAbyss commented 4 years ago

I made this example assembler project using the source you provided. asm-test.zip But please note, that this extension does use GNU assembler which has a different syntax than the tutorials from coppershade.org, have a look at main.s for the changes. If that doesn't suit you, maybe try the amiga-assembly extension instead.

sebastianbergmann commented 4 years ago

Thank you.