I guess I'm here...

Work prioritization by the chipKIT core development team
User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

I guess I'm here...

Post by majenko » Thu Apr 11, 2013 9:47 pm

I wasn't planning on working on chipKIT development, but it seems I have inadvertantly started doing things in the internals of the IDE...

So... I have kind of tackled task #5 (boards menu) in that the boards menu now has submenus in it to make it much easier to find your board, and I have a local version in testing for task #9 (command line programmers) that I intend to push up in the next day or so. Just gotta test it on a few more operating systems.

Since I have been platying wth the boards.txt system already I am thinking I may tackle task #10 (boards.txt in variants folders) as well. I am thinking as well to make things in the variants as overrides for all other files, including a variants-level tools folder that will be picked in preference to the system tools dir (if the file requested is in there).
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: I guess I'm here...

Post by majenko » Thu Apr 11, 2013 11:43 pm

Ok, I have a working (on Linux at least) task #10 solution.

It has the boards.txt, the bootloaders.txt, the tools directory, and the linker script all able to be put into the variant directory and it picks them up.

I'll test more tomorrow on my noisy Windows machine, and see about pushing it p by the weekend.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

User avatar
Jacob Christ
Posts: 723
Joined: Sat May 28, 2011 6:34 am
Location: Southern California
Contact:

Re: I guess I'm here...

Post by Jacob Christ » Sat Apr 13, 2013 3:49 am

Kudos and thank you.

Jacob
PONTECH Quick240 an industrial form factor platform for chipKIT and Arduino users.

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: I guess I'm here...

Post by majenko » Sat Apr 13, 2013 10:44 am

Call me sick if you like, but I am actually quite enjoying programming Java.

Considering I'd never touched it before now on general principal (it's not the language I'm against, but how the language gets abused), it's actually been quite pleasurable to work with.

Right now I am experimenting with a complete ground-up re-working of the whole boards / platforms system. Separating out the "variants" from the platforms (Target), and making them into "boards" instead. These boards (the Board object) will be in their own separate area away from the Target structures, and will internally point to the Target for the Board. The Board object will contain all the code to deal with board level things, like the bootloading process. So, a user has a new board, they just drop their board folder into ~/sketchbook/boards (or something similar - not decided yet) and it picks it up and ties it in with the right Target.

That is if it all works ;)

Should clean up the internals a little methinks.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

User avatar
Jacob Christ
Posts: 723
Joined: Sat May 28, 2011 6:34 am
Location: Southern California
Contact:

Re: I guess I'm here...

Post by Jacob Christ » Sat Apr 13, 2013 2:52 pm

I have been an advocate of making it easy to add a new board in this manner for sometime. My lack of time is the only thing that has kept me from working on this myself. What would be really great is if mpide could hit a web site to look for new variants. It should be able to support hundreds of variants imho and yet allow for easy picking such as how mikes suggests.

Also another issue that I don't have answer for is how to support different versions of boards, maybe its a simple as just putting a rev in the variant name. We currently have three different revs of the Quick-240 in the field and all have slightly different variants. Additional the variant for the board currently is mostly a clone of the Max32 yet could benefit from refactoring the pin out (creating yet a fourth rev).

Libraries also suffer from this rev issue as well. In addition we like to track our libs with out app all in git. The inability of mpide to handle libs properly in the project directory is very frustrating.

Jacob
PONTECH Quick240 an industrial form factor platform for chipKIT and Arduino users.

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: I guess I'm here...

Post by majenko » Sat Apr 13, 2013 3:07 pm

My experiments seem to be being successful...

I have completely done away with AvrdudeUploader.java and Uploader.java and replaced them with a generic Board.java. Works a charm. Much cleaner. There's also a boardsTable with all the boards listed in it within Base.

I don't have any bootloader burning support yet though. That needs abstracting into some config file(s) somehow - maybe as part of the bootloaders.txt file - so that different ways of burning the bootloader (e.g., with a pickit2 and pic32prog) can be easily supported.

I'm thinking I may push this experiment up to my own repo as a special branch so that people can take a look and experiment with it, see what they think.

https://github.com/majenkotech/chipKIT3 ... _structure

When you checkout / pull be sure to specify the new_board_structure branch...
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: I guess I'm here...

Post by majenko » Sun Apr 14, 2013 11:58 am

Fair play, this is a bigger task than I was thinking - It's like wallpapering while drunk ;)

No offence intended to anyone at all - this is just what happens when software evolves over the years when worked on by different teams, each with different ideas and priorities (first Processing, then Arduino, then chipKIT).

My "new_board_structure" branch's changes are now too numerous to list. But in summary (i.e., those that I can remember off hand ;) ):

The system is leaning towards being "board centric". Most requests for file / folder locations are made through the board, and the board passes it on to the target if needed. Libraries, examples, bootloaders, etc all go through the board.

I have overhauled the menus somewhat, mainly due to the fact that most stuff now goes through the Board class, so the imports menu is cleaned up, the examples menu has proper sub-menus, the menu labels (where appropriate) now actually make sense, etc.

The compiler system is starting to make more sense. A key in the platforms.txt file (compiler.masterinclude) specifies what the "head of the sketch" include file should be - WProgram.h for pic32 core, and Arduino.h for avr core. This is really a transitional feature to get Arduino 1.0.4 core working for avr targets. Once the pic32 core is up to version 1.0.x it can be dropped as that would use Arduino.h. Well, it could stay I guess, for flexibility...

I have started a proper bootloader burning system. Instead of it burning for the current board with the programmer you select in the menu (which is always a bit dodgy, especially if you are programming with Arduino ISP to a different target board to the one you loaded the programmer sketch on), it brings up a proper window to select the target board and the programmer you want to use. Doesn't do anything yet, but it's a start ;)

Oh, and I have tested this commit as compiling from clean, which I suspect some of the earlier ones didn't... :oops:

Oh, and for reference:

$ git clone -b new_board_structure git://github.com/majenkotech/chipKIT32-MAX.git
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: I guess I'm here...

Post by majenko » Sun Apr 14, 2013 10:19 pm

ooooh.... I just used my new version of MPIDE to burn the bootloader to my UNO32 using a pickit2 and pic32prog... Smooth as silk.

I just looked at the git commit statistics for this branch...
Showing 921 changed files with 225,671 additions and 15,582 deletions.
I think I've been a tad busy...
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

W4GNS
Posts: 12
Joined: Mon Mar 26, 2012 6:14 pm

Re: I guess I'm here...

Post by W4GNS » Mon Apr 15, 2013 4:17 am

majenko wrote:I think I've been a tad busy...
Yup, and we appreciate your work !! :D

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: I guess I'm here...

Post by majenko » Mon Apr 15, 2013 10:10 am

W4GNS wrote:
majenko wrote:I think I've been a tad busy...
Yup, and we appreciate your work !! :D
Appreciation is all very well (my bread and butter ;) ) but it can't beat a bit of feedback from the powers that be to say if I'm heading in the right direction and this isn't just an exercise in learning java / mpide internals (which is still a worthwhile activity) :P

It's such a departure from the way it's all working at the moment, and the changes are so big, that it may be too over the top and extreme for mainstream adoption ;)

If you like I could create some test packages for Linux and Windows (I don't have OS X, and still no feedback on my question about cross-compiling / packaging for OS X on Linux) so you don't have to have a development system set up to try it out...

http://autobuild.majenko.co.uk/mpide/

Edit: I have "managed" to compile mpide for OS X on Linux. It won't package, due to a lack of DMG manipulation tools, but the .app is there. It might work, or it might not. Being Java it should work (since that is the whole original point of Java), but who knows...? Give it a try, let me know.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

Post Reply