English Amiga Board


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

 
 
Thread Tools
Old 30 September 2018, 16:48   #21
prb28
Registered User

 
Join Date: May 2018
Location: France
Posts: 27
@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 17:17. Reason: Not answered all the questions
prb28 is offline  
Old 30 September 2018, 19:51   #22
Steve
Truth seeker...
Steve's Avatar
 
Join Date: Jul 2001
Location: UK
Age: 40
Posts: 2,206
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, 19:54   #23
prb28
Registered User

 
Join Date: May 2018
Location: France
Posts: 27
@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, 20:39   #24
Steve
Truth seeker...
Steve's Avatar
 
Join Date: Jul 2001
Location: UK
Age: 40
Posts: 2,206
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 21:06.
Steve is offline  
Old 30 September 2018, 21:16   #25
prb28
Registered User

 
Join Date: May 2018
Location: France
Posts: 27
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, 21:43   #26
Steve
Truth seeker...
Steve's Avatar
 
Join Date: Jul 2001
Location: UK
Age: 40
Posts: 2,206
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, 22:38   #27
prb28
Registered User

 
Join Date: May 2018
Location: France
Posts: 27
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, 22:56   #28
Steve
Truth seeker...
Steve's Avatar
 
Join Date: Jul 2001
Location: UK
Age: 40
Posts: 2,206
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, 23:03   #29
prb28
Registered User

 
Join Date: May 2018
Location: France
Posts: 27
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, 23:18   #30
Steve
Truth seeker...
Steve's Avatar
 
Join Date: Jul 2001
Location: UK
Age: 40
Posts: 2,206
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:	34
Size:	120.1 KB
ID:	60058  
Steve is offline  
Old 30 September 2018, 23:32   #31
prb28
Registered User

 
Join Date: May 2018
Location: France
Posts: 27
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:	39
Size:	273.4 KB
ID:	60059  
prb28 is offline  
Old 01 October 2018, 00:04   #32
Steve
Truth seeker...
Steve's Avatar
 
Join Date: Jul 2001
Location: UK
Age: 40
Posts: 2,206
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 01 October 2018, 00:08   #33
prb28
Registered User

 
Join Date: May 2018
Location: France
Posts: 27
Happy to ear that !

I will fix it in the next release thanks !
prb28 is offline  
Old 01 October 2018, 23:45   #34
Steve
Truth seeker...
Steve's Avatar
 
Join Date: Jul 2001
Location: UK
Age: 40
Posts: 2,206
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, 23:51   #35
prb28
Registered User

 
Join Date: May 2018
Location: France
Posts: 27
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 02 October 2018, 00:17   #36
Steve
Truth seeker...
Steve's Avatar
 
Join Date: Jul 2001
Location: UK
Age: 40
Posts: 2,206
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  
 


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 28 December 2017 00:16
very basic C/ASM/Visual Studio hand holding Sephnroth Coders. C/C++ 2 08 March 2016 21:15
Amiga Audio/Visual KhneFr request.Other 6 03 January 2015 11:25
Profiling WinUAE with Visual Studio 2013 mark_k support.WinUAE 3 14 January 2014 21:26
amiga visual editor thinlega request.Apps 1 22 January 2003 16: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 03:59.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.09307 seconds with 15 queries