Jump to content

Notepad++ How to Convert .asm file to .hex


cosmosuave

Recommended Posts

Ok I have really screwed up my SIDbox trying to get the menu encoder to work... The DOS CMD window will no longer make the hex file... Somewhere I read that you can edit the asm file in Notepad++ and then ccompile it as a hex file... Is this the case?

This is the error I'm getting with the DOS cmd window it worked before midibox_sid_v2_rc17 but now that I uploaded the midibox_sid_v2_rc18 it does not work... My SID is completly dead in the water I can't control it and the 2x40lcd is 2x20...

DOS cmd window error...

C:\Documents adn Settings\Cosmosuave\Desktop\MIDIbox SID\midibox_sid_v2_rc18>make

is not recognized as an external or internal command

I'm lost at least with a soldering iron I know which end to hold...

Link to comment
Share on other sites

Edit: Short answer for you- you need to make sure that the paths are set correctly

got the same problem here. i'm not able to create a .hex-file for the new RC18 using WinXP and Posix . instead of the gputils-path i put the posix-path into the path-variable. is that a mistake ? could you help with the corect path ?

best regards

Link to comment
Share on other sites

Could you please type following commands, and copy&paste the results here?

[tt]

D:\>[red]set PATH=D:\posix_bin;%PATH%[/red]

D:\>[red]set PATH[/red]

Path=D:\posix_bin;C:\Programme\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\P

rogramme\Intel\DMIX;C:\Programme\Gemeinsame Dateien\Roxio Shared\DLLShared\;C:\Programme\Java\jdk1.5.

0_10\bin;C:\Programme\QuickTime\QTSystem\;C:\Programme\SDCC\bin;C:\Programme\gputils\bin

PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

D:\>[red]cd midibox_sid_v2_0_rc18[/red]

D:\midibox_sid_v2_0_rc18>[red]make[/red]

rm -rf *.cod *.lst *.err

rm -rf *.hex

gpasm  -p p18f4685  -I./src -I ./include/asm -I ./modules/j5_io  -I ./modules/aout  setup_6581.asm

gpasm  -p p18f4685  -I./src -I ./include/asm -I ./modules/j5_io  -I ./modules/aout  setup_8580.asm

gpasm  -p p18f4685  -I./src -I ./include/asm -I ./modules/j5_io  -I ./modules/aout  setup_tk.asm

gpasm  -p p18f4685  -I./src -I ./include/asm -I ./modules/j5_io  -I ./modules/aout  setup_mb6582.asm

D:\midibox_sid_v2_0_rc18>

[/tt]

(replace "D:\posix_bin" by the directory, into which the posix_bin package has been copied)

Note that gputils has to be in the path as well - this has already been done by the gputils installer, don't remove this entry!

Best Regards, Thorsten.

Link to comment
Share on other sites

http://www.midibox.org/dokuwiki/windows_toolchain_core

Get into it.

And cosmo, please, pretty please, with fricken sugar on top - use the code tag, and copy and paste errors. I won't help you again in future if you don't, because I figure that if I have to ask more than once, you don't really want my help anyway. Please see the Golden Rules of Troubleshooting #1 #4 #5 and #6.

Edit: I'm still wiriting that doc, so if you finrd any problems please let me know and I'll fix it right up and walk you through it. I'll jump into the chat room now and will be there for a few hours.

Link to comment
Share on other sites

Just an interim note so that you don't waste any time - TK spotted a problem with one of the tools. The instructions you see there will work for you, but this one tool may need to be replaced later. Or you can just wait a little longer until I sort it out :)

Back soon...

Edit: I broke rule #1 and posted before I finished testing hehehhe

Link to comment
Share on other sites

http://www.midibox.org/dokuwiki/windows_toolchain_core

Get into it.

And cosmo, please, pretty please, with fricken sugar on top - use the code tag, and copy and paste errors. I won't help you again in future if you don't, because I figure that if I have to ask more than once, you don't really want my help anyway. Please see the Golden Rules of Troubleshooting #1 #4 #5 and #6.

Edit: I'm still wiriting that doc, so if you finrd any problems please let me know and I'll fix it right up and walk you through it. I'll jump into the chat room now and will be there for a few hours.

My apologies... I'll use the code tags from now on... I know I can be a pain in the ass... Thanks for efforts and when I get the time I'll go thru the rest of this thread for the procedure...

Link to comment
Share on other sites

ok i'm using posix instead of msys. tested the like tk wrote. but ended up with a stop  ???

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Dokumente und Einstellungen\el>cd..

C:\Dokumente und Einstellungen>cd.

C:\Dokumente und Einstellungen>cd..

C:\>set PATH=C:\posix_bin;%PATH%

C:\>set PATH
Path=C:\posix_bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;P:\Bin
\;C:/Program Files/Easy Software Products/HTMLDOC;C:\posix_bin;C:\Programme\Util
s\DIY-Tools\gputils\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

C:\>cd mios

C:\MIOS>cd sid_v2rc18

C:\MIOS\sid_v2rc18>make
rm -rf *.cod *.lst *.err
rm -rf *.hex
make: *** No rule to make target `setup_6581.hex', needed by `all'.  Stop.

C:\MIOS\sid_v2rc18>

thats all. and there is no more setup_6581.asm in the setup-path. so why does it search for it ??

Link to comment
Share on other sites

Have you edited makefile. ? Normally, running the makefile should build all four of the asm files in the zip...

For the sake of testing, can you try running make on a freshly unzipped file, with no edits?

I'll be in the chat for a while, you're welcome to come by there to do the troubleshooting thing.

Edit: Can you also run "make --version" and paste the output here? Just to make sure it's getting the right version of make :)

Link to comment
Share on other sites

the message


make: *** No rule to make target `setup_6581.hex', needed by `all'.  Stop.
[/code] is normal if you deleted the setup_6581.asm file So, I think that your tool setup is working perfectly, the mistake was to remove files of the original release. Background: Makefile includes Makefile.orig, and in this file you find following line:
[code]
all: cleanall setup_6581.hex setup_8580.hex setup_tk.hex setup_mb6582.hex
The rules for creating .hex files is located in include/makefile/asm_only.mk

# rule for all .asm file(s)
# output: .hex file
%.hex: %.asm
        gpasm $(GPASM_FLAGS) $(GPASM_INCLUDE) $(GPASM_DEFINES) $<
[/code]

It tells us: whenever a rule ("all") depends on an .hex file, the .hex will be built from an .asm file

In other words: if "setup_6581.hex" is specified in the dependency list, you need the appr. .asm file as well

My proposal: don't remove files - just let them in the directory - otherwise you have to delete dependencies in the Makefile (or Makefile.orig)

Best Regards, Thorsten.

Link to comment
Share on other sites

So far I have followed the procedure as per the wiki and have gotten up to the section to install MinGW and have hit a roadblock...

Is there anyway to install MinGW without an internet connection? Reason I ask is that I have 2 laptops... One for internet and one for music production which all my SIDbox apps MIOS, Notepad++, MSYS) are on... When I run the MinGW exe it is asking for an internet connection which I don't have... Gonna lose sleep over this...

Link to comment
Share on other sites

FWIW, I'd be building the apps on the internet connected box and transferrng the built app (hex file) to your DAW/production box. Internet connections are kinda needed when you're doing the DIY electronics thing.

Well you didn't mention which part of MinGW you want....

If you just need the 'make' upgrade (IE, you don't want to use AC-Sim, so you don't need GCC) then you can cheat, and grab the file from

http://sourceforge.net/project/downloading.php?group_id=2435&filename=mingw32-make-3.81-20080326.tar.gz

You'll get a file named mingw32-make-3.81-20080326.tar.gz. Open it with your compression tool.

Inside, is another file named mingw32-make-3.81-20080326.tar. Open it with your compression tool.

Inside that file are two directories. Go into the \bin directory. You should see a file named make.exe. Copy it somewhere handy.

AFTER you install MSYS,

Copy the make.exe file from your handy location, to the C:\MSYS\1.0\bin directory. OVERWRITE that old version.

Perform the make version check from the doco to make sure it works.

That should take care of it.

Now, if you want GCC as well... it can be kinda big. Have a look here and grab all the files you need:

http://sourceforge.net/project/showfiles.php?group_id=2435

For information (ignore this, it's just for the record and wil only cause confusion)

The above build of make v3.81 is from mingw. You could just as well use the MSYS build of make 3.81 which can be found here:

http://downloads.sourceforge.net/mingw/make-3.81-MSYS-1.0.11-2.tar.bz2

One of these days, the MinGW guys will include MSYS - the latest, and working version - in the MinGW installer, and all this BS will go away ;)

Link to comment
Share on other sites

Oh yeh.... Crap, there's a GUI way to do it! Oops!!

Run the MinGW installer, and choose "Download only" instead of "download and install".

Continue as normal.

When completed, you will see the needed files in your C:\temp directory (or whatever your temp directory is set to). They'll be *.tar.gz

Copy all those files from your internet PC's temp directory to the music PC's temp dir

Copy the installer to the music PC too, and any files it has created (like .ini file)

Go to your music PC

Run the installer as per the instructions (this time do it normally, with  "download and install".)

The installer will see the files in the temp dir and will not need an internet connection.

Link to comment
Share on other sites

the message

make: *** No rule to make target `setup_6581.hex', needed by `all'.  Stop.
is normal if you deleted the setup_6581.asm file So, I think that your tool setup is working perfectly, the mistake was to remove files of the original release. Background: Makefile includes Makefile.orig, and in this file you find following line:
all: cleanall setup_6581.hex setup_8580.hex setup_tk.hex setup_mb6582.hex
The rules for creating .hex files is located in include/makefile/asm_only.mk
# rule for all .asm file(s)
# output: .hex file
%.hex: %.asm
        gpasm $(GPASM_FLAGS) $(GPASM_INCLUDE) $(GPASM_DEFINES) $<

It tells us: whenever a rule ("all") depends on an .hex file, the .hex will be built from an .asm file

In other words: if "setup_6581.hex" is specified in the dependency list, you need the appr. .asm file as well

My proposal: don't remove files - just let them in the directory - otherwise you have to delete dependencies in the Makefile (or Makefile.orig)

Best Regards, Thorsten.

Success at last!!

I edited the makefile.orig to have the dependency to my setup-file. Now it works. Thanks TK

Link to comment
Share on other sites

Gave up and went back to the the midibox_sid_v2_0_rc17.... Managed to install the 6581.asm file and got my control surface working but still having an issue with erratic behaviour on the menu encoder... I did manage to eliminate the the previous line 408 error...

stryd_one I followed your instructions on the MinGW download but have no idea where the mingw32-make-3.81-20080326.tar.gz.  file is being dl'd to... I searched the temp directory, windows file find and nothing... I am using Opera as a browser and under ...

Tools--->Preferences--->Advanced--->Downloads---> The files are dl'd to this directory

C:\Documents and Settings\cosmosuave\My Documents\ 
Upon opening the directory there is no mingw32-make-3.81-20080326.tar.gz. I'm just not savvy enough when it comes to this sort of stuff... Below is the code for my menu encoder... Is there anything that maybe causing the erratic behaviour code wise? I think it is physically the encoder and have ordered some new ones from Smash... The encoder is wired to SR2 Pins 4 & 5
CS_MENU_DIN_TABLE
	;;		Function name		SR#	Pin#
	DIN_ENTRY	CS_MENU_BUTTON_Dec,	 2,	 5	; only valid if rotary encoder not assigned to these pins
	DIN_ENTRY	CS_MENU_BUTTON_Inc,	 2,	 4	; (see mios_tables.inc) and CS_MENU_USE_INCDEC_BUTTONS == 1
ENC_ENTRY MACRO sr, din_0, mode
	dw	(mode << 8) | (din_0 + 8*(sr-1))
	ENDM	
ENC_EOT	MACRO
	dw	0xffff
	ENDM

MIOS_ENC_PIN_TABLE
	;;        SR  Pin  Mode
#if CS_MENU_USE_INCDEC_BUTTONS == 0
	ENC_ENTRY  2,  4,  MIOS_ENC_MODE_DETENTED2	; menu encoder
#endif

Thanks again for everyone's help on this...

Link to comment
Share on other sites

  • 4 months later...

Sorry for bumping this up but i came across a contradiction........if i look at the PATH variables of TK for example, previously in this thread, i noticed that he doesn't have have the variables of MSYS etc. as first like it's described in the dokuwiki toolchain for windows setup.

Like this:

C:\MSYS\1.0\bin;C:\Program Files\gputils\bin;C:\Program Files\SDCC\bin;C:\MinGW\bin;C:\Program Files\Windows Resource Kits\Tools\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\Symantec\pcAnywhere\;C:\Program Files\ActivCard\ActivCard Gold\resources;c:\program files\MSSQL7\BINN;c:\Program Files\Microsoft SQLServer\90\Tools\binn\;C:\Program Files\MKVtoolnix;  

TK's:

Path=D:\posix_bin;C:\Programme\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\P

rogramme\Intel\DMIX;C:\Programme\Gemeinsame Dateien\Roxio Shared\DLLShared\;C:\Programme\Java\jdk1.5.

0_10\bin;C:\Programme\QuickTime\QTSystem\;C:\Programme\SDCC\bin;C:\Programme\gputils\bin

PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

He has the system32 etc before the MSYS etc.

Does this make any difference?

If i type >set path in cmd DOS i get this:

C:\>set PATH=D:\posix_bin;%PATH%

C:\>set path

Path=D:\posix_bin;C:\MSYS\1.0\bin;C:\Program Files\gputils\bin;C:\Program Files\

SDCC\bin;C:\MinGW\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;

PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

Which is the right one and should i change my system path variable?

Link to comment
Share on other sites

Everything is working fine over here so it should be allright ;D had a mayor harddisk lockup under windows so re-installing the lot now in the windows partition. Came across this post because after the first install it didn't work.......so then you have to read some more and look for similar problems with other users. So when things where running i compared my cmd read out with Thorsten's and found it to be different. Just wondering, now i know. ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...