Area 451 Parts Support Forum
February 04, 2012, 11:14:24 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Calendar Login Register  
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: Help! Mac user needs help with V1.30.x firmware package usage (mac terminal)  (Read 654 times)
0 Members and 1 Guest are viewing this topic.
mvaldes
Customer

Offline Offline

Gender: Male


« on: May 06, 2010, 08:41:49 PM »

Good news is I ordered the programmer from Steve earlier this evening. The bad news is I'm a Mac user. I downloaded the Mac file from Microchip. After unzipping it, I read the "read me" file and realize that I have no clue what they're talking about. I've never used the terminal utility before. Are there any terminally sophisticated (sorry, had to say it  ::)) Mac users who can tell me how to actually use the damn thing? Thanks in Advance, Michael
admin
Administrator

Offline Offline




« Reply #1 on: May 06, 2010, 09:23:26 PM »

Wow, I just read their read me file too... and you're right, that's a whole lot of "huh???".  But most of it you can just ignore.  They don't help you with the basics, like finding and using terminal - they assume you know that.  I can't help you that either because I have zero mac experience, sorry.

One thing I did glean from the help file is that Mac's must use slashes (/) instead of dashes (-) for parameters.  So you're type this instead:

Code: [Select]
pk2cmd /P /FV1.30.X.hex /M /Z
Also, if that gives you any sort of trouble, try running this one first:
Code: [Select]
pk2cmd /P /EThat erases the chip first.

Essentially, the "pk2cmd" part is just telling it to run the application.  Everything else are options and commands.  "/P" tells it to auto-detect the kind of chip (and if it can't for some reason, you can force it by replacing /P with /PPIC18F4480, which is the chip that's on the cruise control).  "/E" is erase.  "/F" tells it to look for the file, and the name of the file immediately follows (no space).  "/M" tells it to program memory (as if there's anything else) and "/Z" tell it to do it in a special way that we need.  So cryptic? yes... absolutely.  And most of the readme file they give you just goes into all the specific options.  None of it tells you how to access terminal so you can type the appropriate command.

I'll try to find a mac and try it myself.

Art.
mvaldes
Customer

Offline Offline

Gender: Male


« Reply #2 on: May 07, 2010, 06:22:12 AM »

I do know how to get into terminal, it's in the "Utilities" folder inside the "Applications" folder. You just navigate to it and double click on "terminal" and it opens.
I did try using it once about 10 years ago with a total lack of success. If the line you came up with is all I need to type into it, then I'm golden. But, the reason I've stayed away from it is that, I tried typing another "simple" line I was given for doing something or other and then ended up spending hours with Mac tech support undoing the damage. :'(
admin
Administrator

Offline Offline




« Reply #3 on: May 07, 2010, 06:28:05 AM »

There should be no "damage" :)  But while it is the only command you'll have to run... you have to run it in the right place.  So yes, you have to get to terminal, but then once in terminal you have to navigate to the appropriate folder (the one that contains the downloaded package) and then run the command.  If you're in the wrong folder, there still shouldn't be a problem other than an error saying it didn't work.

I hope someone familar with Mac's terminal can help.

I'm moving this Mac discussion into its own thread.

Art.
Horseman
Customer

Offline Offline

Gender: Male



« Reply #4 on: May 14, 2010, 12:25:10 PM »

I am a Mac professional and would be happy to help. Can you send me the instructions that you're having trouble with?
mvaldes
Customer

Offline Offline

Gender: Male


« Reply #5 on: May 14, 2010, 03:19:39 PM »

Hooray, the cavalry to the rescue, thank you Horseman!  :) The directions are a pdf file on the Microchip page that Art posted (http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023805. About 3/4 of the way down the page is the download link for the pdf file "PK2CMD V1.20 Mac OS 10.4 & 10.5 Universal Binary" which is supposed to explain how to use the programmer in the terminal application on the Mac. I'm really terminally illiterate (sorry, couldn't stop myself)  and would like to know how to actually use "Terminal" to program my cruise control. I can launch terminal, but after that I'm lost. If you can explain how to do it, I'll probably I'll just program in the BOOH pedal map but I'd appreciate learning how to change to other maps as well. (I think the programmer arrived today but I had to leave for the weekend before I got to open the Canada Post packet.)
Thank you again for any help you can provide,
Michael
Horseman
Customer

Offline Offline

Gender: Male



« Reply #6 on: May 29, 2010, 09:33:28 PM »

Eeek... sorry for the delay. Been really busy and completely forgot to check in here. I'll take a look at this and get back to you post haste.
Horseman
Customer

Offline Offline

Gender: Male



« Reply #7 on: May 29, 2010, 09:47:35 PM »

Okay, the skinny on this is pretty simple, I think. It makes reference to installing the program and doing all this stuff to make it work. However, if you're just going to use it one time or very rarely, the easiest solution would be to simply run the program directly. Open Terminal and then drag the pk2cmd file into the terminal window. If you then press return, you'll get PICkit 2 COMMAND LINE HELP. If you do, then all you have to do is drag the file to the terminal again, and then append whatever commands you need to that entry before you press return. Regarding Art's directions to replace dashes (-) with slashes (/), I think that's incorrect. In my experience, parameters and options in the Terminal require dashes. Slashes represent directory separations. DOS typically uses slashes to specify parameters and options. So the command Art was referring to earlier might actually end up looking something like this:

[Alex-MacBook-Pro:~] alex% /Users/alex/Downloads/PK2CMDv1-20MacOSX/pk2cmd -P -FV1.30.X.hex -M -Z

The "[Alex-MacBook-Pro:~] alex%" part is my prompt and is put up on the screen automatically by the Terminal, the "/Users/alex/Downloads/PK2CMDv1-20MacOSX/pk2cmd" part is what gets entered in when you drag the pk2cmd file into the terminal window. Your result will be slightly different but should look pretty similar. Then you can copy and paste the " -P -FV1.30.X.hex -M -Z" part (don't forget the space at the beginning). If I understand that correctly, then you can press return and you're in business. Same deal with the "pk2cmd /P /E" command. In my case, that command would look like this on my screen:

[Alex-MacBook-Pro:~] alex% /Users/alex/Downloads/PK2CMDv1-20MacOSX/pk2cmd -P -E

If you have any problems with this or want me to clarify anything, please let me know, and I'll endeavor to answer quicker!

Alex

PS-> I'm not sure, but you may need to precede the commands with sudo (super user do) and then enter your password to the computer when prompted. For example, the first command would then look like this:

[Alex-MacBook-Pro:~] alex% sudo /Users/alex/Downloads/PK2CMDv1-20MacOSX/pk2cmd -P -FV1.30.X.hex -M -Z

I'd only do that if you have to. Try it without sudo first, and if it doesn't work, then try it with.
mvaldes
Customer

Offline Offline

Gender: Male


« Reply #8 on: May 30, 2010, 04:33:30 AM »

 Alex, that sounds like something I can handle. Being too impatient, I borrowed an old PC (actually it was old, my friend just gave it to me since it was just gathering dust) and used that. It worked perfectly with Art's updated instructions. When I decide it's time to change from the BOOH pedal map to play with another one, I'll give your method a try.It would be nice to just stick with the Mac and not have to drag out the PC paperweight ever time I want to change the program. ::)
It's very thoughtful and kind of you to share your expertise with us.
Thanks,
Michael
Pages: [1]   Go Up
  Send this topic  |  Print  
 
 

Powered by MySQL Powered by PHP Powered by SMF 2.0 Beta 3.1 Public | SMF © 2006–2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!