English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 30 September 2018, 15:48   #21
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
@Steve, the VASM binary configuration is set in the .vscode/settings.json file.
Code:
    "amiga-assembly.vasm": {
        "enabled": true,
        "file": "bin\\windows_x64\\vasmm68k_mot.exe",
        "options": [
            "-m68000",
            "-Fhunk",
            "-linedebug"
        ]
    }
The "enabled" parameter must be "true" and the "file" parameter must have the path to the vasm executable.

VASM is used to check errors in the assembly and to build the binaries to run and debug in FS-UAE.
It may not be mandatory, if you do not want to build the amiga executable, so if there is errors while vasm configuration is set to "false", tell me.

Last edited by prb28; 30 September 2018 at 16:17. Reason: Not answered all the questions
prb28 is offline  
Old 30 September 2018, 18:51   #22
Steve
I Identify as an Ewok
 
Steve's Avatar
 
Join Date: Jul 2001
Location: North Lincolnshire
Age: 45
Posts: 2,356
Okay thanks. Do I have to rename the files like this to get it to work properly:

`.vscode\settings-windows_x64.json -> .vscode\settings.json`

`.vscode\launch-windows_x64.json -> .vscode\launch.json`

Can the rest of the settings files then be deleted?
Steve is offline  
Old 30 September 2018, 18:54   #23
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
@Steve if you have downloaded this zip file vscode-amiga-wks-example-windows_x64.zip it is already done for Windows 10.
prb28 is offline  
Old 30 September 2018, 19:39   #24
Steve
I Identify as an Ewok
 
Steve's Avatar
 
Join Date: Jul 2001
Location: North Lincolnshire
Age: 45
Posts: 2,356
Quote:
Originally Posted by prb28 View Post
@Steve if you have downloaded this zip file vscode-amiga-wks-example-windows_x64.zip it is already done for Windows 10.
Oh thanks, you're right. I was already using that zipped setup. Just a bit confused as to why when I run the debugger it keeps asking me 'Please configure the VASM compiler'. Also it doesn't seem to take any notice of the breakpoint and just goes ahead and runs the program.

Actually I'm not sure what its executing but it certainly isn't compiling the code. I deleted a big chunk of code to break it and it still ran fine. Hmmm, somethings not right.

EDIT: Oops it looks like I haven't setup a correct path in the workspace settings. No that didn't fix it.

Last edited by Steve; 30 September 2018 at 20:06.
Steve is offline  
Old 30 September 2018, 20:16   #25
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
My test machine is the same that I used to compile the binaries, it may have some special configuration due to all the build tools... I will test it tomorrow in a empty window 10 install.

Are you sure you selected the debug configuration in the debug launch drop box ? You can choose between run and debug (run is selected by default).

Could you try these steps :
  • run the vasm executable (vasmm68k_mot.exe) in a dos box, just to see if it is functional
  • set absolute paths in the .vscode/settings.json
  • delete all the "*.o" files in the build directory
  • delete the fs-uae/hd0/gencop file
  • click on the build word in the bottom status bar of vscode and verify that the fs-uae/hd0/gencop file has been generated

Hope this helps,
I will try to add some error reporting in the next release to help to diagnose the configuration problems.
prb28 is offline  
Old 30 September 2018, 20:43   #26
Steve
I Identify as an Ewok
 
Steve's Avatar
 
Join Date: Jul 2001
Location: North Lincolnshire
Age: 45
Posts: 2,356
Quote:
Originally Posted by prb28 View Post
My test machine is the same that I used to compile the binaries, it may have some special configuration due to all the build tools... I will test it tomorrow in a empty window 10 install.

Are you sure you selected the debug configuration in the debug launch drop box ? You can choose between run and debug (run is selected by default).

Could you try these steps :
  • run the vasm executable (vasmm68k_mot.exe) in a dos box, just to see if it is functional
  • set absolute paths in the .vscode/settings.json
  • delete all the "*.o" files in the build directory
  • delete the fs-uae/hd0/gencop file
  • click on the build word in the bottom status bar of vscode and verify that the fs-uae/hd0/gencop file has been generated

Hope this helps,
I will try to add some error reporting in the next release to help to diagnose the configuration problems.
Thanks for your help. I managed to run vasm in the windows CLI okay. It just complained about no file being selected but it seemed to be working. I added the absolute paths like so:
Code:
{
    //"[m68k]": {
    //    "files.encoding": "iso88591"
    //},
    "amiga-assembly.cstool": "F:\\TEMPS\\vscode-amiga-wks-example\\bin\\windows_x64\\cstool.exe",
    "amiga-assembly.vasm": {
        "enabled": true,
        "file": "F:\\TEMPS\\vscode-amiga-wks-example\\bin\\windows_x64\\vasmm68k_mot.exe",
        "options": [
            "-m68000",
            "-Fhunk",
            "-linedebug"
        ]
    },
    "amiga-assembly.vlink": {
        "enabled": true,
        "file": "F:\\TEMPS\\vscode-amiga-wks-example\\bin\\windows_x64\\vlink.exe",
        "includes": "*.s",
        "excludes": "",
        "exefilename": "..\\fs-uae\\hd0\\gencop",
        "options": [
            "-bamigahunk",
            "-Bstatic"
        ]
    }
}
I deleted the object files and ran build but I keep getting the same response:

'Please configure VASM compiler'

No object files were generated.
Steve is offline  
Old 30 September 2018, 21:38   #27
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
That's weird...

This message only appears when the configuration is not found or vasm is disabled.

It must be looking for the settings file in another location than the .vscode directory, maybe are you using workspaces ? (I never tried it)

So could you please try to edit the settings using the dedicated gui of vscode ?
https://code.visualstudio.com/docs/getstarted/settings
prb28 is offline  
Old 30 September 2018, 21:56   #28
Steve
I Identify as an Ewok
 
Steve's Avatar
 
Join Date: Jul 2001
Location: North Lincolnshire
Age: 45
Posts: 2,356
Quote:
Originally Posted by prb28 View Post
That's weird...

This message only appears when the configuration is not found or vasm is disabled.

It must be looking for the settings file in another location than the .vscode directory, maybe are you using workspaces ? (I never tried it)

So could you please try to edit the settings using the dedicated gui of vscode ?
https://code.visualstudio.com/docs/getstarted/settings
It's strange, I've looked at those settings but it does seem to be using the external JSON settings files. The internal settings are set to read-only. I didn't install Visual Studio Code in the usual C:/Program files etc. I installed it onto my F: partition. Maybe that has something to do with it? It could be looking in the User folder?
Steve is offline  
Old 30 September 2018, 22:03   #29
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
You are right, it can be a user/security problem.
Microsoft has a new installer in user mode it may help :
https://code.visualstudio.com/docs/?dv=win64user
prb28 is offline  
Old 30 September 2018, 22:18   #30
Steve
I Identify as an Ewok
 
Steve's Avatar
 
Join Date: Jul 2001
Location: North Lincolnshire
Age: 45
Posts: 2,356
Quote:
Originally Posted by prb28 View Post
You are right, it can be a user/security problem.
Microsoft has a new installer in user mode it may help :
https://code.visualstudio.com/docs/?dv=win64user
Thanks tried that but still the same issue. Maybe this screen could be the culprit?

Notice it says 'enabled: false'
Attached Thumbnails
Click image for larger version

Name:	amiga_visual_studio_test.png
Views:	323
Size:	120.1 KB
ID:	60058  
Steve is offline  
Old 30 September 2018, 22:32   #31
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Thanks for the screenshot it helps !

You are using a workspace in vscode - I never used it, I will try to fix it for the next release
I shouldn't have called the project 'workspace' - sorry about that, it's confusing.

Please use a new window and the "file"/"open Folder" option to open the folder containing the sources.
Attached Thumbnails
Click image for larger version

Name:	wksscreen.png
Views:	355
Size:	273.4 KB
ID:	60059  
prb28 is offline  
Old 30 September 2018, 23:04   #32
Steve
I Identify as an Ewok
 
Steve's Avatar
 
Join Date: Jul 2001
Location: North Lincolnshire
Age: 45
Posts: 2,356
Quote:
Originally Posted by prb28 View Post
Thanks for the screenshot it helps !

You are using a workspace in vscode - I never used it, I will try to fix it for the next release
I shouldn't have called the project 'workspace' - sorry about that, it's confusing.

Please use a new window and the "file"/"open Folder" option to open the folder containing the sources.


Yep, that was the problem alright! Thanks for getting it fixed in the next release.

Good work by the way - I've been looking for something like this for a while.
Steve is offline  
Old 30 September 2018, 23:08   #33
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Happy to ear that !

I will fix it in the next release thanks !
prb28 is offline  
Old 01 October 2018, 22:45   #34
Steve
I Identify as an Ewok
 
Steve's Avatar
 
Join Date: Jul 2001
Location: North Lincolnshire
Age: 45
Posts: 2,356
I'm just wondering why, when the code is assembled by vasm and the debugger starts, how come it seems to always pause on line 25 even though I haven't set a break point?

Code:
Line 25:   clr.l      d0
Can I prevent it from pausing at the start every time the debugger is run?
Steve is offline  
Old 01 October 2018, 22:51   #35
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
By default the stop on entry option is set in the .vscode/launch.json file :
Code:
{
    "version": "0.2.0",
    "configurations": [
        {
...
        {
            "type": "fs-uae",
            "request": "launch",
            "name": "Debug",
            "stopOnEntry": true,
...
        }
    ]
}
Set it to false :
Code:
{
...
            "stopOnEntry": false,
...
}
and the program will run until you press pause.
prb28 is offline  
Old 01 October 2018, 23:17   #36
Steve
I Identify as an Ewok
 
Steve's Avatar
 
Join Date: Jul 2001
Location: North Lincolnshire
Age: 45
Posts: 2,356
Quote:
Originally Posted by prb28 View Post
By default the stop on entry option is set in the...and the program will run until you press pause.
So it does, thanks again!
Steve is offline  
Old 02 April 2019, 18:26   #37
yesplease
Registered User
 
yesplease's Avatar
 
Join Date: May 2012
Location: moon
Posts: 208
This extension is totally great! Merci beaucoup. Just tried it on my old aztec Asm code. I mounted a macos folder as a harddrive in FSUAE and started visual code with AmigaAssembly extension on that folder. Now I have a very cool editor with syntax highlighting and all the modern comforts. It even shows the semantics of the custom chip registers. Very cool!
yesplease is offline  
Old 02 April 2019, 19:20   #38
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Danke ! Happy you like it.
I'm working on the copper debugger, it will be in the next release (still some bugs to fix...).
prb28 is offline  
Old 02 April 2019, 23:56   #39
MartinW
Registered User
 
Join Date: Mar 2017
Location: Minehead / UK
Posts: 608
Just wanted to say thank you too for this extension. I've not used it all that much yet but I did try it out and thought it was particularly awesome. I especially like the fact that you have bundled up the required EXE's which make it a nice relatively small and self-contained package.
MartinW is offline  
Old 03 April 2019, 02:23   #40
arcanist
Registered User
 
Join Date: Dec 2017
Location: Austin, TX
Age: 41
Posts: 405
How did I not know about this, and why does this thread only have 2 pages?

That's some crazy good integration! I love VS Code, will definitely be playing with this.
arcanist is online now  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
assembly code to test for assign (2.0+) jotd Coders. System 2 27 December 2017 23:16
very basic C/ASM/Visual Studio hand holding Sephnroth Coders. C/C++ 2 08 March 2016 20:15
Amiga Audio/Visual KhneFr request.Other 6 03 January 2015 10:25
Profiling WinUAE with Visual Studio 2013 mark_k support.WinUAE 3 14 January 2014 20:26
amiga visual editor thinlega request.Apps 1 22 January 2003 15:48

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:59.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10956 seconds with 14 queries