• AVR Freaks

Helpful ReplyCan i build MPLAB.X projects from the command line?

Page: < 12 Showing page 2 of 2
Author
Jose Diaz
Administrator
  • Total Posts : 1676
  • Reward points : 0
  • Joined: 2010/06/23 11:10:56
  • Location: 0
  • Status: offline
Re:Can i build MPLAB.X projects from the command line? 2013/05/07 10:16:44 (permalink)
0
Thanks for the feedback. I think this has to do with the fact that the v1.80 plugin for xc8 now knows about 'elf' for the next version of xc8 that is soon to be released. Somehow, when the makefiles are generated from the command line, the default value is being applied even though the version of the compiler does not support elf.
I created a bug report.
Jose
 
#21
pflieger
New Member
  • Total Posts : 26
  • Reward points : 0
  • Joined: 2012/12/03 22:24:27
  • Location: Fort Wayne, IN
  • Status: offline
Re:Can i build MPLAB.X projects from the command line? 2013/05/08 07:25:56 (permalink)
0
This works perfectly.
 
We're developing (PIC32) on Windows machines and the build is run on a Linux server with Jenkins. Of course, it seems like a waste to have to install a massive IDE on a headless box just to generate a set of makefiles.
#22
DuncanM
New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2013/07/08 11:30:48
  • Location: 0
  • Status: offline
Re:Can i build MPLAB.X projects from the command line? 2013/07/08 12:15:52 (permalink)
0
Jose, I'm trying to use prjMakefilesGenerator.sh on OS X and getting the error
SEVERE: Unable to find hostinfo.sh script!
That file is in a different directory. Is there any way I can point the script to it?
 
After that error the script can't find the toolchain:
error: Configuration "dev" builds with "C32", but no toolchains of that type are installed.
I'd appreciate any pointers on getting this working.

#23
ukoda
New Member
  • Total Posts : 13
  • Reward points : 0
  • Joined: 2014/09/14 15:37:52
  • Location: 0
  • Status: offline
Re:Can i build MPLAB.X projects from the command line? 2015/10/08 19:19:48 (permalink)
0
Jose Diaz
We are working on a utility which you can run from the command line that will take an MPLAB X project and will regenerate the makefiles without having to open the IDE.
It'll be done in the first half of this year. So, you will not have to run the whole IDE in some special GUI-less mode. A light weight utility will do it.
...

I have this issue and came across this old thread.  It has now been over two years so I assume this utility is now available?  If so can you provide some information on where to find it and how to use it?
#24
ric
Super Member
  • Total Posts : 28365
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re:Can i build MPLAB.X projects from the command line? 2015/10/08 19:46:01 (permalink) ☄ Helpfulby ukoda 2015/10/08 20:38:00
+2 (2)
prjMakefilesGenerator.bat is located in C:\Program Files (x86)\Microchip\MPLABX\v3.10\mplab_ide\bin
 
I've not tried it, but it looks pretty straightforward.
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#25
ukoda
New Member
  • Total Posts : 13
  • Reward points : 0
  • Joined: 2014/09/14 15:37:52
  • Location: 0
  • Status: offline
Re:Can i build MPLAB.X projects from the command line? 2015/10/08 20:42:53 (permalink)
+1 (1)
Thanks ric, I found the Linux equivalent script which appeared to build the missing make files.  The build itself fails as it seems to try and build the wrong configuration.  I will dig into that a bit more and may create a post in a new thread if I can't fix it as it may be getting of topic to try and address it in this thread.
#26
ch
Starting Member
  • Total Posts : 50
  • Reward points : 0
  • Joined: 2011/04/19 02:06:27
  • Location: Autriche
  • Status: offline
Re:Can i build MPLAB.X projects from the command line? 2015/10/09 02:35:36 (permalink)
0
I believe you can call `make CONF=confname` to build only the configuration named confname.
 
#27
pflieger
New Member
  • Total Posts : 26
  • Reward points : 0
  • Joined: 2012/12/03 22:24:27
  • Location: Fort Wayne, IN
  • Status: offline
Re:Can i build MPLAB.X projects from the command line? 2015/10/09 07:13:32 (permalink)
0
ric
prjMakefilesGenerator.bat is located in C:\Program Files (x86)\Microchip\MPLABX\v3.10\mplab_ide\bin

I've used it in Linux. I had a Jenkins CI system that would use that for automated builds. It worked really well, but I'm not on that project so I can't help you too much.
#28
ukoda
New Member
  • Total Posts : 13
  • Reward points : 0
  • Joined: 2014/09/14 15:37:52
  • Location: 0
  • Status: offline
Re:Can i build MPLAB.X projects from the command line? 2015/10/11 13:27:27 (permalink)
0
Just tried that, the CONF argument has solved my last problem, thanks :-)  I now have a working build server that can build software releases via an SSH log in to the server.
#29
amvasat
New Member
  • Total Posts : 1
  • Reward points : 0
  • Status: offline
Re:Can i build MPLAB.X projects from the command line? 2017/06/13 22:48:20 (permalink)
+2 (2)
I know this thread is old. But I have been through the situation. And I wanted to share a solution on a single point since I had to fetch pieces from different locations.
This guide explains the steps needed to get a build environment with XC16 compiler in a 64 bit Linux (Debian Jessie) up and running.
What you will need to install (and how)GIT 
su
apt-get update
apt-get install git-core
32 bit libraries 
apt-get install lib32z1 lib32ncurses5 lib32stdc++6 libx11-6:i386 libexpat1:i386 libXext6:i386
Java 
apt-get install default-jre
make 
apt-get install make
tarball 
apt-get install tar
XC16 Compiler 
wget http://www.microchip.com/mplabxc16linux
chmod +x mplabxc16linux
./mplabxc16linux --mode text
<follow instructions given on command line>
MPlab X IDE 
wget http://www.microchip.com/mplabx-ide-linux-installer
tar -xvf mplabx-ide-linux-installer
chmod +x MPLABX-v3.61-linux-installer.sh
./MPLABX-v3.61-linux-installer.sh
<follow instrutions given on command line>
legacy peripheral library for PIC24 & dsPIC 2.0 
wget http://ww1.microchip.com/downloads/en//softwarelibrary/pic24%20mcu%20dspic%20peripheral%20lib/peripheral-libraries-for-pic24-and-dspic-v2.00-linux-installer.run
chmod +x peripheral-libraries-for-pic24-and-dspic-v2.00-linux-installer.run
./peripheral-libraries-for-pic24-and-dspic-v2.00-linux-installer.run
<follow instrutions given on command line>
prepare location 
mkdir /usr/src/CODE
change to code location 
cd /usr/src/CODE
setup git 
git config --global user.name "XXXX"
git config --global user.email "XXXX@XXX.XXX"
get code from repo 
git clone XXXX.XXXX.git
change to project base dir 
cd XXXXX
generate linux makefile 
/opt/microchip/mplabx/v3.61/mplab_ide/bin/prjMakefilesGenerator.sh .
make project 
make
#30
Page: < 12 Showing page 2 of 2
Jump to:
© 2020 APG vNext Commercial Version 4.5