MIOS programming platform released
#1
Posted 27 July 2008 - 21:32
Big thanks to everybody who contributed! :)
Basically it unifies the way how assembly and C based MIOS applications are built under different operating systems (Windows, Linux, MacOS) for different PIC processors (PIC18F452/PIC18F4620/PIC18F4685), and it allows to share code modules between different projects without copying source files to improve the collaboration of people who are interested to contribute.
The file structures and build procedures have been defined for the special needs of this community. Most important intention was to ensure, that end-users without programming skills are still able to customize and recompile an application safely without running into issues like file inconsistencies, missing packages or wrong tool configuration.
In order to achieve this, the file structure exists in different "views" for users and programmers (more about this topic below).
Application Release Packages
All applications have been re-released and they are now available in the MIOS download section.
They contain the prebuilt .hex file + source code as before, but the file structure inside the package has been changed. There are subdirectories for include files (include/), low-level drivers (modules/), libraries (lib/), scripts (bin/), documentation (doc/), and mostly also a separate source directory for the main program (src/).
Each package contains a README.txt file, where an introduction and sometimes also links to websites with more informations can be found.
A "Makefile" and "Makefile.orig" is part of the package as well. "Makefile.orig" contains the original instructions to build the application, and the "Makefile" includes this file after setting MIOS_PATH and MIOS_BIN_PATH to the local release directory. This approach ensures, that users will always re-compile an application with the same resources used (and tested) by the programmer during a release.
To rebuild an application different open source tools are required.
Details are eplained in the Wiki (installation docs mainly written by StrydOne and Audiocommander - thank you!)
http://www.midibox.o...ion_development
Windows users: see especially this page
http://www.midibox.o...hain_quickstart
After installation of the toolchain, all you need to do for recompiling an application is to
- open a command shell
- change to the release directory "cd <dir>"
- type "make"
It's identical for all operating systems.
MIOS Base Package
Those who don't intend to program applications can stop reading here!
While application releases only contain the used files/directories (a small part) of the programming platform, the base package contains all available include files, libraries, modules which were available at a given released date. It also includes programming examples and templates in the apps/ directory.
In order to create a new application, just copy a template into a new directory and start with programming (e.g., try the MIOS C programming examples).
To build a .hex file, the MIOS_PATH and MIOS_BIN_PATH environment variables have to point to the base package directory (MIOS_BIN_PATH points to the bin directory inside the base package). These variables can be set in the command shell; Linux/MacOS users can insert them into a ~/.bash_login (or similar) file, Windows users can add them to the system properties (one of those well hidden GUIs) so that the variables are already set correctly when a new command shell is opened.
Example for DOS:
set MIOS_PATH=C:\mios_base
set MIOS_BIN_PATH=C:\mios_base\bin
Example for Linux/MacOS:
export MIOS_PATH=~/mios_base
export MIOS_BIN_PATH=~/mios_base/bin
To share an application with other users, copy it into a new directory, type "make dist" and follow the instructions.
And/or bring it into the repository! (see below)
MIOS Repository
Alternatively to using the MIOS base package, it's also possible to download the current sources of MIOS base + all applications from the midibox server via SVN.
This method could also be interesting for users who want to try out new features of applications, before they have been released.
Once the complete repository is on your harddisk, you are able to keep it up-to-date by using the SVN sync mechanism ("svn update") - monthly/weekly/daily/hourly/whenever you want. Only the differences will be downloaded.
The SVN URL (for read access only) is: svn://svnmios.midibox.org/mios
Linux/MacOS user: "svn" is (mostly) already installed on your computer. Just type "svn co svn://svnmios.midibox.org/mios"
Windows users: see http://www.midibox.o...s_toolchain_svn
There is also a SVN web frontend installed which allows you to follow the progress without installing SVN:
http://svnmios.midibox.org
Write access to MIOS Repository
Every programmer who want to contribute is invited to get write access to the repository. Just contact me!
With SVN write access, you are able to:
- publish new code modules (low-level drivers) and applications for other programmers
- collaborate with other programmers on a single application (subversion supports file merging)
- provide bugfixes for existing code (after agreement with the original programmers/copyright holder(s) of course)
- fix typos and provide translations for ucapps.de (ucapps.de is part of the repository as well)
- provide circuit diagrams under schematics/ (e.g. in xcircuit format)
Have fun! :)
Best Regards, Thorsten.
#2
Posted 27 July 2008 - 21:41
Quote
thanks!!
have i said wow ... and thanks ?
#4
Posted 28 July 2008 - 10:30
Lots of work went into this, all the way from TK who obviously did all the hard work, to various forum members who have done everything from testing, to moral support in the chatroom ;) BIG THANKS to everyone who had a hand in it!!
And a special congratulations to TK on the success of all his hard work!
For those not familiar with the new structure, if you get confused by anything feel free to post or drop by the chat. This new way is awesome when it comes to modifying/customising apps, and especially for developing your own, I'm sure you'll love it once you get to know it ;)
#5
Posted 28 July 2008 - 14:07
#6
Posted 29 July 2008 - 20:21
ERROR: ./bin/mios-sdcc: MIOS_BIN_PATH variable not set
Fortunately Stryd_One found a proper solution - all packages have been re-released again (version number not changed), mios_base package is now available as v1_0a (only bin/mk-dist.pl has been changed)
Best Regards, Thorsten.
#7
Posted 10 August 2008 - 23:48
I guess i'm a geek to.
#8
Posted 11 August 2008 - 23:42
MacPro:MidiBoxStuff ggb$ svn co svn://svnmios.midibox.org/mios
svn: Can't connect to host 'svnmios.midibox.org': Operation timed out
Not sure if i beeez doing something incorrectly, followed the 'if you run Linux/MacOS then svn is (mostly) installed.
Opened terminal in my midibox directory/folder and got the above message.
any ideas midibudz?
TIA
gb
#9
Posted 12 August 2008 - 00:08
Best Regards, Thorsten.
#11
Posted 21 August 2008 - 17:50
I have been playing with this for the last two days and WOW, amazing work. The documentation is first class and the implementation is super, well done all ;D
But, (there's always a but) I have a small question. Is it possible to adjust the make process to include a customised setupXXXX.asm? I ask because I have a different setup for my MBSEQ hardware to the supplied files. What I was hoping to do was just to have my own setupXXXXmyHW.asm file and then make.
Just putting the file in the folder obviously didn't work so I tried adding my file to the Makefile.orig and it gave the following error:
make: *** No rule to make target `setup_mbseq_v3_3b_dejfHW', needed by `all'. Stop.
Is there any other way to do this? Or should I just replace the original setup_mbseq_v3.asm with my customised file using the same name and leave well alone? ::)
Thanks in advance
Dave mK
#12
Posted 21 August 2008 - 18:45
#13
Posted 21 August 2008 - 18:58
Quote
make: *** No rule to make target `setup_mbseq_v3_3b_dejfHW', needed by `all'. Stop.
Is there any other way to do this? Or should I just replace the original setup_mbseq_v3.asm with my customised file using the same name and leave well alone? ::)
If you change makefile.orig so it looks like this:
# default rule that defines the .hex files which should be created # note: always require a "cleanall", since dependencies (e.g. on .h and .inc files) are not properly declared all: cleanall setup_mbseq_v3.hex setup_mbseq_cd_cd.hex setup_mbseq_tk.hex setup_mbseq_v3_3b_dejfHW.hex
Then it will try to create setup_mbseq_v3_3b_dejfHW.hex, from setup_mbseq_v3_3b_dejfHW.asm. Did you have the asm file by that name, in the same directory? Did you put the .hex extension on that line in makefile.orig?
#14
Posted 23 August 2008 - 12:23
Bingo that fixed it perfectly, I had forgotten to put the .hex extension after the name of the .asm file in Makefile.orig!
I just compiled it with no problems at all. I do like make :)
Thanks for the help
D



Help



















