graham

asm to hex

22 posts in this topic

Hi, I've got my hardware working but I can't find anything on how to edit an asm file and save it as a hex. I've googled it and downloaded mplab and tried to follow the instuctions and got lost, can anyone point me in the right direction?

Share this post


Link to post
Share on other sites

I'm using windows 10 and have built a midi cv converter all the menus work but the Aout ng board needs to the asm file to be changed, this is where 'im stuck. thanks for your reply

Share this post


Link to post
Share on other sites

I looked at the link but it not sure what I'm looking for?

Share this post


Link to post
Share on other sites

I've built the hardware and programmed the PICs and loaded hex files from mios studio all ok but stuck on editing and saveing an asm file to a hex to load into the core.

Share this post


Link to post
Share on other sites

You have to setup the build environment on your computer. Follow the instructions given on the wiki page. Then run MSYS, point the path to the directory containing your .asm and run the "make" command. This converts the coded file into a hex ready for transmitting using MIOS Studio.

Share this post


Link to post
Share on other sites

You could also try the following:

not sure if it's different for MIOS8.

Share this post


Link to post
Share on other sites

Ive found the wiki page but cant find anything on a build environment? thanks for your help

Share this post


Link to post
Share on other sites

I thought it would be simple to convert an asm file to hex but it appears to be out of my depth.

Share this post


Link to post
Share on other sites

Have you done everything written on the page? Come back when you have.

Share this post


Link to post
Share on other sites
Just now, graham said:

I thought it would be simple to convert an asm file to hex but it appears to be out of my depth.


Come now, don't be lazy! You're so close! Otherwise the MBCV will sit around wondering what it could have done with its life.

Share this post


Link to post
Share on other sites

Been trying to use MPLAB followed some youtube videos to create a new project but when I try to build it I get the following

 

Debug build of project `C:\Users\gra\Desktop\New folder\tes.mcp' started. Preprocessor symbol `__DEBUG' is defined. Sun Dec 10 12:08:04 2017 ---------------------------------------------------------------------- Make: The target "C:\Users\gra\Desktop\New folder\setup_j5_enabled.o" is out of date. Executing: "C:\Program Files (x86)\Microchip\MPASM Suite\MPASMWIN.exe" /q /p18F452 "setup_j5_enabled.asm" /l"setup_j5_enabled.lst" /e"setup_j5_enabled.err" /d__DEBUG=1 Error[105]   C:\USERS\GRA\DESKTOP\NEW FOLDER\SETUP_J5_ENABLED.ASM 95 : Cannot open file (Include File "src/main.inc" not found) Error[129]   C:\USERS\GRA\DESKTOP\NEW FOLDER\SETUP_J5_ENABLED.ASM 96 : Expected (END) Halting build on first failure as requested. ---------------------------------------------------------------------- Debug build of project `C:\Users\gra\Desktop\New folder\tes.mcp' failed. Preprocessor symbol `__DEBUG' is defined. Sun Dec 10 12:08:04 2017 ---------------------------------------------------------------------- BUILD FAILED

Share this post


Link to post
Share on other sites

Have abandoned MPLAB and read the 

Quick Start Guide Toolchain Setup

I can load the asm file in wordpad and edit and save it but which program do I need from those listed to create the Hex file from the ASM?

Share this post


Link to post
Share on other sites

I have downloaded docuwiki seems to be a collection of files, dont know what to do with any of them.

Share this post


Link to post
Share on other sites
Just now, graham said:

I can load the asm file in wordpad and edit and save it but which program do I need from those listed to create the Hex file from the ASM?

MSYS

Share this post


Link to post
Share on other sites

I have MSYS, when I run it it brings up a screen like CMD but with a flashing $, don't know what to do with it? thanks again for your reply, I've ltterally spent about 5 hours reading last night and 3 this morning going round in circles and feeling totally dejected as to how I cant do a simple task

Share this post


Link to post
Share on other sites

in MSYS

cd %PATH%

is the command to change directories, where %PATH% is the location of your .asm

ls

lists the directories and files

cd can be run for one folder at a time, using ls to see what else is there

cd C: //opens C: drive

or as a path

cd C:\2487\trunk\apps\controllers\midibox_ng_v1

 

In your case, use cd until you are in the correct folder, then run make. If you have set up the dependencies and system variables correctly, your .asm will be used to build a .hex. If you haven't followed the other instructions to setup the system properly you get no file and a list of error messages.

Share this post


Link to post
Share on other sites

Thanks again for your reply.

I've called my asm file test and saved it straight to C drive to make it easier.

i then typed cd C: //

now after the green writting it says /c

so I think I'm at the C directory and i typed

make setup

but got the message

make: ***  No rule to make target "test. stop.

 

Share this post


Link to post
Share on other sites

I suggest to unzip all of the files here http://www.ucapps.de/mios/midibox_cv_v1_3.zip

into something easy like C:\CV\

you would then navigate as 

cd C:\CV

make

perhaps you just have the asm in which case there is no command available. All of the subfolders (src etc.) are required to build a hex.

Share this post


Link to post
Share on other sites

Wow thanks, that was it, I was just putting the asm file on its own. I didnt realise you needed the other folders

make has generated a hex file from my wordpad edited asm

I am so happy I've tried most of the weekend, thanks for your help and perseverance 

this is the hardest thing I've done 

building the midibox seq3 was easier

I guess I'm more of a hardware person thanks once again.

Graham

Share this post


Link to post
Share on other sites

Well done! I hope the customisations worked okay. Let's see some build photos of the MBCV!

Best,
Andy

Share this post


Link to post
Share on other sites

you would laugh at the constuction, all on bits of boards my seq 3 is even worse, lots of ribbon cables hard wired and the switches are from an old IBM pc keyboard, works beautifully though, now I can integrate the d to a board on it now I know how to edit asms, thanks to you, I'll put some pics up,  and thanks again, Graham

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now